mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-11 12:28:03 +00:00
Fix parameter descriptions being serialised as locale_str
This commit is contained in:
parent
cc0c261925
commit
0e386ec2cc
@ -137,9 +137,6 @@ class CommandParameter:
|
|||||||
if translation is not None:
|
if translation is not None:
|
||||||
description_localizations[locale.value] = translation
|
description_localizations[locale.value] = translation
|
||||||
|
|
||||||
if isinstance(self.description, locale_str):
|
|
||||||
base['description'] = self.description.message
|
|
||||||
|
|
||||||
if self.choices:
|
if self.choices:
|
||||||
base['choices'] = [await choice.get_translated_payload(translator) for choice in self.choices]
|
base['choices'] = [await choice.get_translated_payload(translator) for choice in self.choices]
|
||||||
|
|
||||||
@ -155,7 +152,7 @@ class CommandParameter:
|
|||||||
base = {
|
base = {
|
||||||
'type': self.type.value,
|
'type': self.type.value,
|
||||||
'name': self.display_name,
|
'name': self.display_name,
|
||||||
'description': self.description,
|
'description': str(self.description),
|
||||||
'required': self.required,
|
'required': self.required,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user