Skip to content
Discussion options

You must be logged in to vote

Overview

I'm a bit confused to as if this is discord.py or not. The @slash.command isn't really valid unless you named your command tree "slash", but you referenced a choice with app_commands.Choice? Weird, regardless lets take a look:

How to create Choices?

There's 3 main ways you can create choices. Using the @app_commands.choices decorator, using typing.Literal as an annotation, and using enum.Enum as an annotation.

Which style is best for me?

It's all up to you and your needs! Personally speaking, I'm a fan of the @app_commands.choices decorator. I would test around with the options available and see which one fits your needs the most.

How can I use these?

Let's walk through a couple …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IIDarkNessYT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants