mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user