Ask coding questions

← Back to all posts
Discord Commands
ReshiramWolfu (99)

I want to make a discord bot respond to commands, and i have this code so far, can anyone help me do a command so that it will respond to anything after an exclamation mark, like this !respond

xnfdeveloper (1)

eample if (message.content.startsWith('beep')) {'Boop.');

TheDrone7 (1900)

I might not be able to help you with something like that, since all you need to do is add a little logic, I can provide you with a few links for reference though: - documentation -
A tutorial:
( This is part 1 that you've probably already completed. Still you should go through it.)
Part 2 is what you really need -

You might also want to go through this if you're planning to keep your bot on -

Also, you are using , I recommend shifting to, it's newer and already better than in many aspects and is also being improved!