Unknown interaction, sometimes
The problem is that sometimes it works and sometimes it generates an error, and I've already tried it without using defer, same result.
How my Main class register commands
My interactionCreate Class
my test command
4 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!Isn't it an error related to interactionCreate or something like that?
in theory even if my connection was very bad, with defer it wouldn't be a problem
defer is not the problem, I tried without it too, just with await interaction.reply in the ping command file and I get the same result, sometimes it works and sometimes it gives the error
I'm still thinking it strange that the problem is my connection
yes
sometimes
oh, just name is wrong, its extends simple EventMap class
not is the problem
yes, in MyClient
in constructor of MyClient?
i use readdirSync in loadEvents and loadSlashCommands
If I can't use await in the constructor, then there's not much I can do about it
It's very random, sometimes I turn on the bot, try to use some command and
Unknow Interaction
, sometimes I turn on the bot and manage to use it a few times and then it fails
using Htop in linux, my cpu it is normal, network issues i can't monitoring
Then I'll try to upload it to a VPS or another machine and leave feedback hereYou could run "ping" in the background and watch for spikes in ping. When thr bot crashes, you can look at the ping logs to see if there was a massive spike in ping or not
@Qjuh Update, i just pass the bot project to Docker, and slash commands has work normally now, and in my normal machine, same host, the problem probably came from my system