From 70d2522e7eaae5bf5bd54b87ca0c2e8d9b9fd3cd Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 12 Apr 2022 00:55:38 -0400 Subject: [PATCH] [commands] Unwrap CommandInvokeError if the cause is CommandError --- discord/ext/commands/hybrid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/ext/commands/hybrid.py b/discord/ext/commands/hybrid.py index e552fbeba..e554796a6 100644 --- a/discord/ext/commands/hybrid.py +++ b/discord/ext/commands/hybrid.py @@ -294,7 +294,7 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]): return await self._do_call(ctx, ctx.kwargs) # type: ignore except app_commands.CommandSignatureMismatch: raise - except app_commands.TransformerError as e: + except (app_commands.TransformerError, app_commands.CommandInvokeError) as e: if isinstance(e.__cause__, CommandError): exc = e.__cause__ else: