Browse Source

Fix attribute error in TranslationError

pull/8318/head
Rapptz 3 years ago
parent
commit
4fbafcd718
  1. 2
      discord/app_commands/errors.py

2
discord/app_commands/errors.py

@ -171,7 +171,7 @@ class TranslationError(AppCommandError):
if msg: if msg:
super().__init__(*msg) super().__init__(*msg)
else: else:
ctx = context.name.replace('_', ' ') ctx = context.location.name.replace('_', ' ')
fmt = f'Failed to translate {self.string!r} in a {ctx}' fmt = f'Failed to translate {self.string!r} in a {ctx}'
if self.locale is not None: if self.locale is not None:
fmt = f'{fmt} in the {self.locale.value} locale' fmt = f'{fmt} in the {self.locale.value} locale'

Loading…
Cancel
Save