Add Channel types support #100
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "ChannelTypes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds support for channel_types in the option (Allows to restrict
CHANNEL
slash command options to specific channel types).Note: Separates only TextChannel, VoiceChannel, Threads and StageChannels. Further separation (news, game channnels etc) is not done.
Checklist
Good idea, needs some changes before merge though.
Please undo this change, it seems to be #98
@ -1265,12 +1273,19 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
for python_type, discord_type in application_option_type_lookup.items():
Please use descriptive variable names here
If I am not mistaken, you can just check if all of the annotation args are in
application_option_channel_types
@ -1265,12 +1273,19 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
for python_type, discord_type in application_option_type_lookup.items():
Fixed in
e84cef2
@ -1265,12 +1273,19 @@ class Command(_BaseCommand, Generic[CogT, P, T]):
for python_type, discord_type in application_option_type_lookup.items():
Fixed in
e84cef2
Fixed in
e84cef2