Unknown interaction
Hello i keep getting the "unknown interaction" error like 7 out of 10 times every time i run a slash command or use any component i'll share my InteractionCreate event and one of my slash commands:
ping.js:
i can share my event handler or more code if needed
9 Replies
discord.js -> 14.21.0
node -> v22.17.1
what actually happens when you receive the error?
does your bot respond anyways, or do you receive "The application did not respond" in client (or something to that effect)?
i receive "The application did not respond" error
then sounds like your bot just isn't responding to the interaction fast enough, even with
deferReply being the first thing you do in the shown command
this can happen for a variety of reasons, usually due to your host's network/resources
side note deferReply has a withResponse option for which deferReply will resolve in an InteractionCallbackResponse
with this you can access <InteractionCallbackResponse>.resource.message without needing to fetchReply afterwardswell i do have a really slow internet but iam not sure if that's the issue because i have been working on the bot for the past 2 weeks and i just started getting this error about 2 days ago and it's honestly driving me crazy
ah i see, thanks
regardless of the reason, the issue is that your bot isn't responding within 3 seconds
if you don't believe it to be your network, it's still up to you to determine why your bot isn't reaching
deferReply fast enoughokay i'll do more debugging
okay i think it's probably and issue with my commands handler or events handlers, because i put the ping command directly inside index.js like this and i no longer get the error:
what ðŸ˜
okay iam still a beginner tho ðŸ˜
oh you mean DisTube?
i just searched about it and i found that it violates tos... i had no idea...
The thread owner has marked this issue as solved.