Faithful-Resource-Pack/CompliBot

[Bug] Bot is demultiplied when restarted using `/restart`

Juknum opened this issue · 5 comments

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

  1. Be a developer and do /restart
  2. The bot restart, yeet
  3. Do /ping
  4. Observes the DiscordAPIError: Interaction has already been acknowledged error loop

Screenshot(s)

image
image

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)

Did you fix it in your commit? @nick-1666
Have you committed? xd

No I didn’t cause I did it messily. Will do today tho sorry

It was completely fixed but I was making wierd functions and variables and it all can be done much better

is this not fixed by my commit @Juknum

Can't reproduce in v2.4.0 (seems to be fixed)