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
If code changes were made then they have been tested.
I have updated the documentation to reflect the changes.
This PR fixes an issue.
This PR adds something new (e.g. new method or parameters).
This PR is a breaking change (e.g. methods or parameters removed/renamed)
This PR is not a code change (e.g. documentation, README, ...)
## Summary
Adds support for [channel_types](https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure) 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
<!-- Put an x inside [ ] to check it, like so: [x] -->
- [x] If code changes were made then they have been tested.
- [ ] I have updated the documentation to reflect the changes.
- [x] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is **not** a code change (e.g. documentation, README, ...)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds support for channel_types in the option (Allows to restrict
CHANNELslash 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
e84cef2Fixed in
e84cef2