Skip to content

Commit 56c648c

Browse files
committed
🐛 Option: Always set input_type to SlashCommandOptionType.channel when channel_types is set
1 parent a5aa21f commit 56c648c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

discord/commands/options.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ def __init__(
225225
self.description = description or "No description provided"
226226
self.channel_types: list[ChannelType] = kwargs.pop("channel_types", [])
227227

228-
if isinstance(input_type, SlashCommandOptionType):
228+
if self.channel_types:
229+
self.input_type = SlashCommandOptionType.channel
230+
elif isinstance(input_type, SlashCommandOptionType):
229231
self.input_type = input_type
230232
else:
231233
from ..ext.commands import Converter

0 commit comments

Comments
 (0)