-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
Rewrite options #1251
Rewrite options #1251
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Thank you clone ❤️ |
|
Getting an error when using either of the following two methods to define an option: @slash_command(name="opt_test")
async def opt_test(ctx: discord.ApplicationContext, test_option: Option(str, "Test")):
await ctx.respond("test")
@slash_command(name="opt_test")
async def opt_test(ctx: discord.ApplicationContext, test_option: str = Option(description="Test")):
await ctx.respond("test")
|
Codecov Report
@@ Coverage Diff @@
## master #1251 +/- ##
==========================================
- Coverage 33.42% 33.42% -0.01%
==========================================
Files 93 93
Lines 17615 17621 +6
==========================================
+ Hits 5888 5890 +2
- Misses 11727 11731 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Are you including |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I think someone should test it with the options
decorator.
Oh, whoops. Removing that resolves the issue. |
Decorator works great, Union[TextChannel, VoiceChannel] and all the other good stuff work as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krittick its fucking 11pm xd
But here we go
Yeet
This comment was marked as off-topic.
This comment was marked as off-topic.
@martinbndr please create a new issue here: https://github.com/Pycord-Development/pycord/issues/new/choose |
Summary
This modifies methods of slash commands related to option parsing and validation in order to optimize them and fix as many issues as possible.
Also allows a new design for creating options:
Checklist
type: ignore
comments were used, a comment is also left explaining why