Skip to content

Commit 65f56e1

Browse files
committed
!fix(application_commands): Fixed default values for Options
1 parent abed822 commit 65f56e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/application_commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ def __init__(self,
642642
choices[index] = SlashCommandOptionChoice(choice)
643643
self.choices: List[SlashCommandOptionChoice] = choices
644644
self.channel_types: Optional[List[Union[GuildChannel, ChannelType, int]]] = channel_types
645-
self.default: Any = default
645+
self.default: Optional[Any] = default
646646
self.converter: Union[Greedy, Converter] = converter
647647
self.ignore_conversion_failures: bool = ignore_conversion_failures
648648

@@ -1252,7 +1252,7 @@ async def _parse_arguments(self, interaction):
12521252
connector = to_invoke.connector
12531253
for o in to_invoke.options:
12541254
name = connector.get(o.name, o.name)
1255-
if name not in params and o.default is not None:
1255+
if (name not in params or params[name] is None) and o.default != None:
12561256
params[name] = o.default
12571257

12581258
interaction._command = self

0 commit comments

Comments
 (0)