Skip to content

Commit

Permalink
Prevent Option.__init__() completing with a null input type
Browse files Browse the repository at this point in the history
  • Loading branch information
nexy7574 committed May 27, 2024
1 parent 9fc3d7b commit 9f9dfb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions discord/commands/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ def __init__(
"description_localizations", MISSING
)

if input_type is None:
raise TypeError("input_type cannot be NoneType.")

def to_dict(self) -> dict:
as_dict = {
"name": self.name,
Expand Down

0 comments on commit 9f9dfb1

Please sign in to comment.