Skip to content

Commit 2d3c2c0

Browse files
authored
fix: properly check if name is none for anno names (#1555)
1 parent 6592f82 commit 2d3c2c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interactions/models/internal/application_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,8 @@ def _add_option_from_anno_method(self, name: str, option: SlashCommandOption) ->
609609
if not self.options:
610610
self.options = []
611611

612-
if option.name is None:
613-
option.name = name
612+
if option.name.default is None:
613+
option.name = LocalisedName.converter(name)
614614
else:
615615
option.argument_name = name
616616

0 commit comments

Comments
 (0)