Skip to content

How to give parameter of a command a description? #1861

Closed Answered by JustaSqu1d
coolbrett asked this question in Q&A
Discussion options

You must be logged in to vote

Using the example, we can use the option decorator to add a name and a description to the option like so:

@bot.slash_command()
@discord.option(
    name = "year"
    description = "What year will it be?"
)
async def command(ctx, year: int):
    pass

I would like to add that this discussion category should not be used for help, rather, please join our Discord server for help instead. If you require further assistance please do the same.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@coolbrett
Comment options

Answer selected by Dorukyum
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