DISCORD BOT [PYTHON] - Adding user input to command using .choices() opposed to wait_for()

Viewed 55

I am currently working on a Discord bot that requires users to be able to enter the command without using a message format that will reveal private data. My idea is something like how Dyno bot does for polls. In which upon typing the command, the user is presented with options, when the user clicks on the option, they may then manually type out what the value for that respective argument/option should be, rather than using hard coded values for the options.

I have searched here and all over the web and cannot locate any documentation about how this is done. What I did find was choices:

# For example: 
@app_commands.choices(choices=[
    app_commands.Choice(name="Rock", value="rock"),
    app_commands.Choice(name="Paper", value="paper"),
    app_commands.Choice(name="Scissors", value="scissors"),
])

Here is an image that illustrates what I would like to accomplish (each time you select an option it appends it to the command to be filled out):

Example of functionality

Thanks in advance. Code is always appreciated but I don't need to be spoon fed, if you have documentation, that would work too. Just need a little push in the right direction at this crossroads.

0 Answers
Related