Fix parameter descriptions being serialised as locale_str

This commit is contained in:
Rapptz 2022-08-08 21:14:52 -04:00
parent cc0c261925
commit 0e386ec2cc

View File

@ -137,9 +137,6 @@ class CommandParameter:
if translation is not None:
description_localizations[locale.value] = translation
if isinstance(self.description, locale_str):
base['description'] = self.description.message
if self.choices:
base['choices'] = [await choice.get_translated_payload(translator) for choice in self.choices]
@ -155,7 +152,7 @@ class CommandParameter:
base = {
'type': self.type.value,
'name': self.display_name,
'description': self.description,
'description': str(self.description),
'required': self.required,
}