-
I have my bot setup on latest 3.2.3 discord.py module, however I keep getting error while trying to use Modals. Simple example from repo's example: After running the following command from discord chat: @bot.command(description="Submit feedback") I get error: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'response' Which means, that interaction isn't of type discord.Interaction like defined in input arguments, but of type Context. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is because what you defined here is not a slash command but a prefix command Look at the examples of the repository for how this is supposed to work or refer to these blog post |
Beta Was this translation helpful? Give feedback.
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()
decoratorLook at the examples of the repository for how this is supposed to work or refer to these blog post