Skip to content

Commit 3e2ac13

Browse files
Fix mentionable
1 parent ece5469 commit 3e2ac13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

discord/app/commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ def __init__(
510510
else:
511511
self.input_type = input_type
512512

513+
print(self.input_type)
513514
self.required: bool = kwargs.pop("required", True)
514515
self.choices: List[OptionChoice] = [
515516
o if isinstance(o, OptionChoice) else OptionChoice(o)

discord/enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,12 @@ class SlashCommandOptionType(Enum):
603603

604604
@classmethod
605605
def from_datatype(cls, datatype):
606-
606+
print(datatype)
607607
if isinstance(datatype, tuple): # typing.Union has been used
608608
datatypes = [cls.from_datatype(op) for op in datatype]
609609
if all([x == cls.channel for x in datatypes]):
610610
return cls.channel
611-
elif set(datatypes) <= {cls.role, cls.channel}:
611+
elif set(datatypes) <= {cls.role, cls.user}:
612612
return cls.mentionable
613613
else:
614614
raise TypeError('Invalid usage of typing.Union')

0 commit comments

Comments
 (0)