We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f5a04 commit 19037ceCopy full SHA for 19037ce
discord/commands/commands.py
@@ -730,12 +730,12 @@ def __init__(
730
self.channel_types.append(channel_type)
731
input_type = _type
732
self.input_type = input_type
733
- self.required: bool = kwargs.pop("required", True)
+ self.default = kwargs.pop("default", None)
734
+ self.required: bool = kwargs.pop("required", True) if self.default is None else False
735
self.choices: List[OptionChoice] = [
736
o if isinstance(o, OptionChoice) else OptionChoice(o)
737
for o in kwargs.pop("choices", list())
738
]
- self.default = kwargs.pop("default", None)
739
740
if self.input_type == SlashCommandOptionType.integer:
741
minmax_types = (int, type(None))
0 commit comments