|
|
@ -419,10 +419,12 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]): |
|
|
|
command = self.wrapped |
|
|
|
bot.dispatch('command', ctx) |
|
|
|
value = None |
|
|
|
callback_completed = False |
|
|
|
try: |
|
|
|
await command.prepare(ctx) |
|
|
|
# This lies and just always passes a Context instead of an Interaction. |
|
|
|
value = await self._do_call(ctx, ctx.kwargs) # type: ignore |
|
|
|
callback_completed = True |
|
|
|
except app_commands.CommandSignatureMismatch: |
|
|
|
raise |
|
|
|
except (app_commands.TransformerError, app_commands.CommandInvokeError) as e: |
|
|
@ -442,7 +444,8 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]): |
|
|
|
if command._max_concurrency is not None: |
|
|
|
await command._max_concurrency.release(ctx.message) |
|
|
|
|
|
|
|
await command.call_after_hooks(ctx) |
|
|
|
if callback_completed: |
|
|
|
await command.call_after_hooks(ctx) |
|
|
|
|
|
|
|
if not ctx.command_failed: |
|
|
|
bot.dispatch('command_completion', ctx) |
|
|
|