Fix autocomplete translations calling unnecessary locales

This commit is contained in:
Rapptz committed 2022-08-14 17:35:43 -04:00
1 parent 32c5a0cec1
commit 49e6fe9a0c
2 files changed
+12 -1

No files matched your search

+2 -1
View File
@@ -880,8 +880,9 @@ class InteractionResponse:
translator = self._parent._state._translator
if translator is not None:
user_locale = self._parent.locale
payload: Dict[str, Any] = {
'choices': [await option.get_translated_payload(translator) for option in choices],
'choices': [await option.get_translated_payload_for_locale(translator, user_locale) for option in choices],
}
else:
payload: Dict[str, Any] = {