From c41cadfa91a2e490c3d42cdf19412cbcef190f3c Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 28 Aug 2024 15:22:35 -0400 Subject: [PATCH] Fix introduced potential TypeError with _get_command_error --- discord/app_commands/errors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/app_commands/errors.py b/discord/app_commands/errors.py index 87a5dbb59..abdc9f2f0 100644 --- a/discord/app_commands/errors.py +++ b/discord/app_commands/errors.py @@ -498,7 +498,8 @@ def _get_command_error( else: errors = {key: ' '.join(x.get('message', '') for x in inner_errors)} - messages.extend(f'{indentation} {k}: {v}' for k, v in errors.items()) + if isinstance(errors, dict): + messages.extend(f'{indentation} {k}: {v}' for k, v in errors.items()) class CommandSyncFailure(AppCommandError, HTTPException):