I’m pretty confused. What I want is a command that lets users pick an option and then type some text. The bot should then send back that text. Like ‘/example choose something type your message here’.
Can anyone help me figure out what I’m doing wrong? I’m new to this and would really appreciate some guidance. Thanks!
Looks like you’re having some trouble with your Discord bot command. I’ve run into similar issues before. The problem is likely with how you’re handling the command arguments. Try modifying your code like this:
This setup allows users to input an option followed by their message. You’d use it like ‘/example cool This is my message’. The ‘option’ parameter catches the first word, and ‘message’ grabs everything else.
Make sure you’re using an up-to-date version of discord.py as well. Older versions sometimes have issues with slash commands. If you’re still stuck, the Discord.py documentation is incredibly helpful. Good luck with your bot!
I’ve been there, buddy. Discord bot commands can be tricky, especially when you’re just starting out. From what I can see, your issue is with how you’re handling the command arguments. Here’s what worked for me:
Instead of using the asterisk before ‘text’, try this:
This way, you can use it like ‘/example option1 This is my message’. The ‘option’ parameter catches the first word, and ‘message’ grabs everything else.
Also, make sure you’re using the latest version of discord.py. Some older versions had issues with slash commands. If you’re still stuck, the Discord.py documentation is a goldmine of info. Good luck!