Sometimes Unknown Interaction
Hey, I made a discordjs Bot that relies heavily on slash commands, sadly sometimes it gives out just unknown interaction and crashes the bot. In this example, as soon as the command is fired, it crashed. But there are multile files/commands like this. The interaction.deffer() is just experimental
8 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
In my index.js I just
import notifyCommand from './commands/notify.js';
first of all, deferReply is a promise
second, why are you creating a new listener there?
because thats your issue
What should I do instead?
use one single listener and a proper event/command handler
not create a listener for every command that you run
Do you have something like a template or sth?
thx