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:
jack1142
2021-02-01 14:49:50 +01:00
committed by GitHub
parent d6de9c1b94
commit 8139587e5e
5 changed files with 20 additions and 26 deletions

View File

@@ -485,15 +485,22 @@ class Command(CogCommandMixin, DPYCommand):
if not await self.can_run(ctx, change_permission_state=True):
raise CheckFailure(f"The check functions for command {self.qualified_name} failed.")
if self.cooldown_after_parsing:
await self._parse_arguments(ctx)
self._prepare_cooldowns(ctx)
else:
self._prepare_cooldowns(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)
try:
if self.cooldown_after_parsing:
await self._parse_arguments(ctx)
self._prepare_cooldowns(ctx)
else:
self._prepare_cooldowns(ctx)
await self._parse_arguments(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(
self, ctx: "Context", converter, argument: str, param: inspect.Parameter

View File

@@ -188,7 +188,7 @@ class Context(DPYContext):
else:
try:
await self.channel.delete_messages((query, resp))
except (discord.HTTPException, AttributeError):
except discord.HTTPException:
# In case the bot can't delete other users' messages,
# or is not a bot account
# or channel is a DM