File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -183,10 +183,13 @@ async def _on_autocomplete(
183183
184184 def _request_command_locale (self ) -> None :
185185 """Request the locale for this command."""
186- if self .name_localizations or self .description_localizations or self ._client is None :
186+ if self ._client is None or not self ._client . _provided_locales or not self ._client . _command_locale_provider :
187187 return
188188
189- if not self ._client ._provided_locales or not self ._client ._command_locale_provider :
189+ for option in self .options .values ():
190+ option ._request_option_locale (self ._client , self )
191+
192+ if self .name_localizations or self .description_localizations :
190193 return
191194
192195 name_locales : dict [hikari .Locale , str ] = {}
@@ -203,9 +206,6 @@ def _request_command_locale(self) -> None:
203206 self .name_localizations : t .Mapping [hikari .Locale , str ] = name_locales
204207 self .description_localizations : t .Mapping [hikari .Locale , str ] = desc_locales
205208
206- for option in self .options .values ():
207- option ._request_option_locale (self ._client , self )
208-
209209
210210@attr .define (slots = True , kw_only = True )
211211class SlashGroup (CommandBase [ClientT , hikari .api .SlashCommandBuilder ]):
You can’t perform that action at this time.
0 commit comments