From faee0b49681f40a2679bc78cd0bd0cc9313344f8 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 25 Jan 2023 03:05:17 -0500 Subject: [PATCH] [commands] Explicit set traceback for hybrid invoke Fix #9205 --- discord/ext/commands/hybrid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ext/commands/hybrid.py b/discord/ext/commands/hybrid.py index 03fa726d4..fb6d39b31 100644 --- a/discord/ext/commands/hybrid.py +++ b/discord/ext/commands/hybrid.py @@ -445,11 +445,11 @@ class HybridAppCommand(discord.app_commands.Command[CogT, P, T]): else: exc = HybridCommandError(e) exc.__cause__ = e - await command.dispatch_error(ctx, exc) + await command.dispatch_error(ctx, exc.with_traceback(e.__traceback__)) except app_commands.AppCommandError as e: exc = HybridCommandError(e) exc.__cause__ = e - await command.dispatch_error(ctx, exc) + await command.dispatch_error(ctx, exc.with_traceback(e.__traceback__)) except CommandError as e: await command.dispatch_error(ctx, e) finally: