From 4fbafcd718b069459dec33369e0964d6c810a882 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 9 Aug 2022 10:45:12 -0400 Subject: [PATCH] Fix attribute error in TranslationError --- discord/app_commands/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/app_commands/errors.py b/discord/app_commands/errors.py index b050d03e7..1b8020a65 100644 --- a/discord/app_commands/errors.py +++ b/discord/app_commands/errors.py @@ -171,7 +171,7 @@ class TranslationError(AppCommandError): if msg: super().__init__(*msg) else: - ctx = context.name.replace('_', ' ') + ctx = context.location.name.replace('_', ' ') fmt = f'Failed to translate {self.string!r} in a {ctx}' if self.locale is not None: fmt = f'{fmt} in the {self.locale.value} locale'