Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow typehint for TextChannel and VoiceChannel #615

Closed
MaskDuck opened this issue Apr 22, 2022 · 1 comment · Fixed by #678
Closed

allow typehint for TextChannel and VoiceChannel #615

MaskDuck opened this issue Apr 22, 2022 · 1 comment · Fixed by #678
Labels
2.1 The issue/PR should go for the 2.1 release p: medium Priority: medium - should be worked on in the near future t: enhancement Type: enhancement - new feature or request
Milestone

Comments

@MaskDuck
Copy link
Contributor

Summary

typehint for TextChannel and VoiceChannel for app cmds

What is the feature request for?

Application commands

The Problem

slash command typehint is fucked up and made me confused

The Ideal Solution

@slash_command(name="never", description="gonna give you up")
    async def _never(
        self,
        interaction: Interaction,
        channel: VoiceChannel = SlashOption(
            name="channel",
            description="rickroller should works"
        ),
    ):
        ...

The Current Solution

@slash_command(name="never", description="gonna give you up")
    async def _never(
        self,
        interaction: Interaction,
        channel: abc.GuildChannel = SlashOption(
            name="channel",
            description="rickroller should works",
            channel_types=[ChannelType.voice],
        ),
    ):
        ...

Additional Context

No response

@ooliver1
Copy link
Member

half links to #591 and the ability that would come with

@ooliver1 ooliver1 added t: enhancement Type: enhancement - new feature or request s: planned Status: the issue is planned to be worked on p: medium Priority: medium - should be worked on in the near future labels May 4, 2022
@ooliver1 ooliver1 added this to the 2.1 milestone Jun 13, 2022
@ooliver1 ooliver1 added s: awaiting review Status: the issue or PR is awaiting reviews 2.1 The issue/PR should go for the 2.1 release and removed s: planned Status: the issue is planned to be worked on labels Jun 13, 2022
@ooliver1 ooliver1 removed the s: awaiting review Status: the issue or PR is awaiting reviews label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1 The issue/PR should go for the 2.1 release p: medium Priority: medium - should be worked on in the near future t: enhancement Type: enhancement - new feature or request
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants