mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-11 00:09:47 +00:00
Fix attribute error in TranslationError
This commit is contained in:
parent
df54da8bc9
commit
4fbafcd718
@ -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…
x
Reference in New Issue
Block a user