mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-14 17:59:48 +00:00
Fix auto_locale_strings when no choices are given
This commit is contained in:
parent
87c9c95bb8
commit
842d6b4fbb
@ -185,9 +185,10 @@ class CommandParameter:
|
|||||||
if isinstance(self.description, str):
|
if isinstance(self.description, str):
|
||||||
self.description = locale_str(self.description)
|
self.description = locale_str(self.description)
|
||||||
|
|
||||||
for choice in self.choices:
|
if self.choices:
|
||||||
if choice._locale_name is None:
|
for choice in self.choices:
|
||||||
choice._locale_name = locale_str(choice.name)
|
if choice._locale_name is None:
|
||||||
|
choice._locale_name = locale_str(choice.name)
|
||||||
|
|
||||||
def is_choice_annotation(self) -> bool:
|
def is_choice_annotation(self) -> bool:
|
||||||
return getattr(self._annotation, '__discord_app_commands_is_choice__', False)
|
return getattr(self._annotation, '__discord_app_commands_is_choice__', False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user