Update dependencies and copyright year (#2436)

- aiohttp 3.5
- websockets 7
- Rapptz/discord.py@700dbb5
- A few others

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine
2019-02-13 10:49:11 +11:00
committed by GitHub
parent c87286d3c6
commit 9869f95bd6
54 changed files with 439 additions and 294 deletions

View File

@@ -6,7 +6,7 @@ discord.ext.commands
An extension module to facilitate creation of bot commands.
:copyright: (c) 2017 Rapptz
:copyright: (c) 2019 Rapptz
:license: MIT, see LICENSE for more details.
"""

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -443,9 +443,9 @@ class BotBase(GroupMixin):
Parameters
-----------
func : :ref:`coroutine <coroutine>`
The extra event to listen to.
The function to call.
name : Optional[str]
The name of the command to use. Defaults to ``func.__name__``.
The name of the event to listen for. Defaults to ``func.__name__``.
Example
--------

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -523,7 +523,7 @@ class clean_content(Converter):
result = pattern.sub(repl, argument)
if self.escape_markdown:
transformations = {re.escape(c): "\\" + c for c in ("*", "`", "_", "~", "\\")}
transformations = {re.escape(c): "\\" + c for c in ("*", "`", "_", "~", "\\", "||")}
def replace(obj):
return transformations.get(re.escape(obj.group(0)), "")

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -385,22 +385,18 @@ class Command:
# for use with a manual undo
previous = view.index
# parsing errors get propagated
view.skip_ws()
argument = quoted_word(view)
try:
value = await self.do_conversion(ctx, converter, argument, param)
except CommandError:
if not result:
if required:
raise
else:
view.index = previous
return param.default
view.index = previous
break
else:
result.append(value)
if not result and not required:
return param.default
return result
async def _transform_greedy_var_pos(self, ctx, param, converter):
@@ -750,9 +746,9 @@ class Command:
If that lookup leads to an empty string then the first line of the
:attr:`help` attribute is used instead.
"""
if self.brief:
if self.brief is not None:
return self.brief
if self.help:
if self.help is not None:
return self.help.split("\n", 1)[0]
return ""
@@ -771,7 +767,7 @@ class Command:
name = self.name if not parent else parent + " " + self.name
result.append(name)
if self.usage:
if self.usage is not None:
result.append(self.usage)
return " ".join(result)

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -26,6 +26,7 @@ DEALINGS IN THE SOFTWARE.
import itertools
import inspect
import discord.utils
from .core import GroupMixin, Command
from .errors import CommandError
@@ -183,7 +184,9 @@ class HelpFormatter:
if commands:
return max(
map(
lambda c: len(c.name) if self.show_hidden or not c.hidden else 0,
lambda c: discord.utils._string_width(c.name)
if self.show_hidden or not c.hidden
else 0,
commands.values(),
)
)
@@ -272,8 +275,10 @@ class HelpFormatter:
if name in command.aliases:
# skip aliases
continue
entry = " {0:<{width}} {1}".format(name, command.short_doc, width=max_width)
width_gap = discord.utils._string_width(name) - len(name)
entry = " {0:<{width}} {1}".format(
name, command.short_doc, width=max_width - width_gap
)
shortened = self.shorten(entry)
self._paginator.add_line(shortened)

View File

@@ -3,7 +3,7 @@
"""
The MIT License (MIT)
Copyright (c) 2015-2017 Rapptz
Copyright (c) 2015-2019 Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),