Skip to content

Commit

Permalink
Set option.input_type when OptionType is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorukyum committed Jul 28, 2022
1 parent 02ed0a5 commit cf5f6d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion discord/commands/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ def __init__(self, input_type: InputType = str, /, description: Optional[str] =
self._raw_type: Union[InputType, tuple] = input_type
self.channel_types: List[ChannelType] = kwargs.pop("channel_types", [])

if not isinstance(input_type, SlashCommandOptionType):
if isinstance(input_type, SlashCommandOptionType):
self.input_type = input_type
else:
from ..ext.commands import Converter
if isinstance(input_type, Converter) or input_type_is_class and issubclass(input_type, Converter):
self.converter = input_type
Expand Down

0 comments on commit cf5f6d2

Please sign in to comment.