mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Update d.py to 1.6.0, aiohttp to 3.7.3, Red-Lavalink to 0.7.2 (#4728)
* Bump d.py, aiohttp, Red-Lavalink * Remove deprecation warnings that are no longer relevant * Max concurrency things in `Command.prepare()` * Two random things that date back to times older than d.py 1.1...
This commit is contained in:
parent
d6de9c1b94
commit
8139587e5e
@ -204,12 +204,3 @@ if "--debug" not in _sys.argv:
|
|||||||
# Individual warnings - tracked in https://github.com/Cog-Creators/Red-DiscordBot/issues/3529
|
# Individual warnings - tracked in https://github.com/Cog-Creators/Red-DiscordBot/issues/3529
|
||||||
# DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
|
# DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
|
||||||
_warnings.filterwarnings("ignore", category=DeprecationWarning, module="importlib", lineno=219)
|
_warnings.filterwarnings("ignore", category=DeprecationWarning, module="importlib", lineno=219)
|
||||||
# DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
|
|
||||||
# def noop(*args, **kwargs): # type: ignore
|
|
||||||
_warnings.filterwarnings("ignore", category=DeprecationWarning, module="aiohttp", lineno=107)
|
|
||||||
# DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
|
|
||||||
# hosts = await asyncio.shield(self._resolve_host(..
|
|
||||||
_warnings.filterwarnings("ignore", category=DeprecationWarning, module="aiohttp", lineno=964)
|
|
||||||
# DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10.
|
|
||||||
# self._event = asyncio.Event(loop=loop)
|
|
||||||
_warnings.filterwarnings("ignore", category=DeprecationWarning, module="aiohttp", lineno=21)
|
|
||||||
|
|||||||
@ -485,15 +485,22 @@ class Command(CogCommandMixin, DPYCommand):
|
|||||||
if not await self.can_run(ctx, change_permission_state=True):
|
if not await self.can_run(ctx, change_permission_state=True):
|
||||||
raise CheckFailure(f"The check functions for command {self.qualified_name} failed.")
|
raise CheckFailure(f"The check functions for command {self.qualified_name} failed.")
|
||||||
|
|
||||||
|
if self._max_concurrency is not None:
|
||||||
|
await self._max_concurrency.acquire(ctx)
|
||||||
|
|
||||||
|
try:
|
||||||
if self.cooldown_after_parsing:
|
if self.cooldown_after_parsing:
|
||||||
await self._parse_arguments(ctx)
|
await self._parse_arguments(ctx)
|
||||||
self._prepare_cooldowns(ctx)
|
self._prepare_cooldowns(ctx)
|
||||||
else:
|
else:
|
||||||
self._prepare_cooldowns(ctx)
|
self._prepare_cooldowns(ctx)
|
||||||
await self._parse_arguments(ctx)
|
await self._parse_arguments(ctx)
|
||||||
if self._max_concurrency is not None:
|
|
||||||
await self._max_concurrency.acquire(ctx)
|
|
||||||
await self.call_before_hooks(ctx)
|
await self.call_before_hooks(ctx)
|
||||||
|
except:
|
||||||
|
if self._max_concurrency is not None:
|
||||||
|
await self._max_concurrency.release(ctx)
|
||||||
|
raise
|
||||||
|
|
||||||
async def do_conversion(
|
async def do_conversion(
|
||||||
self, ctx: "Context", converter, argument: str, param: inspect.Parameter
|
self, ctx: "Context", converter, argument: str, param: inspect.Parameter
|
||||||
|
|||||||
@ -188,7 +188,7 @@ class Context(DPYContext):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
await self.channel.delete_messages((query, resp))
|
await self.channel.delete_messages((query, resp))
|
||||||
except (discord.HTTPException, AttributeError):
|
except discord.HTTPException:
|
||||||
# In case the bot can't delete other users' messages,
|
# In case the bot can't delete other users' messages,
|
||||||
# or is not a bot account
|
# or is not a bot account
|
||||||
# or channel is a DM
|
# or channel is a DM
|
||||||
|
|||||||
@ -546,15 +546,11 @@ class Case:
|
|||||||
if message is None:
|
if message is None:
|
||||||
message_id = data.get("message")
|
message_id = data.get("message")
|
||||||
if message_id is not None:
|
if message_id is not None:
|
||||||
try:
|
|
||||||
message = discord.utils.get(bot.cached_messages, id=message_id)
|
message = discord.utils.get(bot.cached_messages, id=message_id)
|
||||||
except AttributeError:
|
|
||||||
# bot.cached_messages didn't exist prior to discord.py 1.1.0
|
|
||||||
message = None
|
|
||||||
if message is None:
|
if message is None:
|
||||||
try:
|
try:
|
||||||
message = await mod_channel.fetch_message(message_id)
|
message = await mod_channel.fetch_message(message_id)
|
||||||
except (discord.HTTPException, AttributeError):
|
except discord.HTTPException:
|
||||||
message = None
|
message = None
|
||||||
else:
|
else:
|
||||||
message = None
|
message = None
|
||||||
|
|||||||
@ -32,7 +32,7 @@ classifiers =
|
|||||||
packages = find_namespace:
|
packages = find_namespace:
|
||||||
python_requires = >=3.8.1,<3.9
|
python_requires = >=3.8.1,<3.9
|
||||||
install_requires =
|
install_requires =
|
||||||
aiohttp==3.6.2
|
aiohttp==3.7.3
|
||||||
aiohttp-json-rpc==0.13.2
|
aiohttp-json-rpc==0.13.2
|
||||||
aiosqlite==0.15.0
|
aiosqlite==0.15.0
|
||||||
appdirs==1.4.4
|
appdirs==1.4.4
|
||||||
@ -45,7 +45,7 @@ install_requires =
|
|||||||
colorama==0.4.3
|
colorama==0.4.3
|
||||||
commonmark==0.9.1
|
commonmark==0.9.1
|
||||||
contextlib2==0.6.0.post1
|
contextlib2==0.6.0.post1
|
||||||
discord.py==1.5.1
|
discord.py==1.6.0
|
||||||
distro==1.5.0; sys_platform == "linux"
|
distro==1.5.0; sys_platform == "linux"
|
||||||
fuzzywuzzy==0.18.0
|
fuzzywuzzy==0.18.0
|
||||||
idna==2.10
|
idna==2.10
|
||||||
@ -56,7 +56,7 @@ install_requires =
|
|||||||
python-Levenshtein-wheels==0.13.1
|
python-Levenshtein-wheels==0.13.1
|
||||||
pytz==2020.1
|
pytz==2020.1
|
||||||
PyYAML==5.3.1
|
PyYAML==5.3.1
|
||||||
Red-Lavalink==0.7.1
|
Red-Lavalink==0.7.2
|
||||||
rich==9.5.1
|
rich==9.5.1
|
||||||
schema==0.7.2
|
schema==0.7.2
|
||||||
six==1.15.0
|
six==1.15.0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user