[Bug] Bot is demultiplied when restarted using `/restart`
Juknum opened this issue · 5 comments
Juknum commented
What happened?
When using /restart
to restart the bot, the bot is actually restarted without being correctly killed first, leading to an infinite loop of errors such as: DiscordAPIError: Interaction has already been acknowledged
because the bot is trying to respond to interactions for each instance of itself (but it works 1 time only)
To reproduce
- Be a developer and do
/restart
- The bot restart, yeet
- Do
/ping
- Observes the
DiscordAPIError: Interaction has already been acknowledged
error loop
Screenshot(s)
Notes
- This might be related to this line of code which is weird because the destroy object instantiates itself again and again
- I put the security flag on it since it could lead to API spam which could lead to the bot being banned from using the API? (Maybe idk)
Juknum commented
Did you fix it in your commit? @nick-1666
Have you committed? xd
fami-fish commented
No I didn’t cause I did it messily. Will do today tho sorry
fami-fish commented
It was completely fixed but I was making wierd functions and variables and it all can be done much better
Juknum commented
Can't reproduce in v2.4.0 (seems to be fixed)