Skip to content

Issue with Interactions and Modals #9744

Answered by tailoric
baremixas asked this question in Q&A
Discussion options

You must be logged in to vote

This is because what you defined here is not a slash command but a prefix command
Prefix commands get a context object not an interaction
to define a slash command you need to use the @bot.tree.command() decorator

Look at the examples of the repository for how this is supposed to work or refer to these blog post

  1. https://about.abstractumbra.dev/discord.py/2023/01/30/app-command-basics.html
  2. https://about.abstractumbra.dev/discord.py/2023/01/30/app-command-examples.html

Replies: 1 comment 1 reply

Comment options

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

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