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 toolkit•16mo 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/luna•16mo ago
do you have an interactionCreate event or an event handler at all
Dãrķ Søŭł
yeah I have as usual
treble/luna
treble/luna•16mo ago
show the code
Dãrķ Søŭł
thats the starting code to check that everything works and the interactionCreate doesn't work
treble/luna
treble/luna•16mo ago
you return if your interaction is a ChatInputCommand
Dãrķ Søŭł
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 docs•16mo 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øŭł
oh okay thank you!
treble/luna
treble/luna•16mo ago
yw!
Dãrķ Søŭł
I will close the thread.
Want results from more Discord servers?
Add your server