Slash Command Interactions Doesn't Work

Hello, So I am creating a new bot and for one reason the doesn't respond to the slash commands at all, the slash commands are registered correctly. But when I run them it does nothing and no errors pop up in console. For more information about the problem please tell me and I will provide it. Thank you!
11 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
treble/luna
treble/luna2y ago
do you have an interactionCreate event or an event handler at all
Dãrķ Søŭł
Dãrķ SøŭłOP2y ago
yeah I have as usual
treble/luna
treble/luna2y ago
show the code
Dãrķ Søŭł
Dãrķ SøŭłOP2y ago
thats the starting code to check that everything works and the interactionCreate doesn't work
treble/luna
treble/luna2y ago
you return if your interaction is a ChatInputCommand
Dãrķ Søŭł
Dãrķ SøŭłOP2y ago
oh yeah silly me, I forgot to remove it. thank you! Also one more question how can I make it so when the bot doesn't trigger itself while I have !ip some commands might have !ip in the text of the reply so it will create kinda a reply loop
d.js docs
d.js docs2y ago
It's good practice to make your bots ignore other bots, including itself. This can be done through a single line of code:
if (<message>.author.bot) return;
if (<message>.author.bot) return;
<message> being whatever you defined message as.
Dãrķ Søŭł
Dãrķ SøŭłOP2y ago
oh okay thank you!
treble/luna
treble/luna2y ago
yw!
Dãrķ Søŭł
Dãrķ SøŭłOP2y ago
I will close the thread.
Want results from more Discord servers?
Add your server