Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndcl committed Feb 3, 2022
1 parent 68e9cf3 commit b288cf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/commands/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def __init__(self, input_type: Any, /, description: str = None, **kwargs) -> Non
self.channel_types.append(channel_type)
input_type = _type
self.input_type = input_type
self.default = kwargs.pop("default", None)
self.required: bool = (
kwargs.pop("required", True) if self.default is None else False
kwargs.pop("required", True) if "default" not in kwargs else False
)
self.default = kwargs.pop("default", None)
self.choices: List[OptionChoice] = [
o if isinstance(o, OptionChoice) else OptionChoice(o)
for o in kwargs.pop("choices", list())
Expand Down

0 comments on commit b288cf7

Please sign in to comment.