DerDomee / discordbot-alexxoffi

The main Discord bot for the communityserver of AlexxOffi
GNU General Public License v3.0
0 stars 0 forks source link

Bot loses track of DynVC when owner leaves directly after creating the channel #27

Open DerDomee opened 3 years ago

DerDomee commented 3 years ago

Describe the bug Joining a channel with the key key_bot_new*voicechannel creates a new voice channel by the bot. Leaving immediately normally deletes the channel, but instead the bot loses track of opened channels. From the current log behaviour I am not perfectly sure if "instantly leaving" is the real cause.

To Reproduce Steps to reproduce the behavior:

  1. Join key_bot_new*voicechannel
  2. Either leave VC immediately before DynVC is created, or leave after DynVC is created but before you are moved by the bot, or leave after full DynVC creation cycle is finished, or change to an already existing DynVC before cycle is finished

Expected behavior The newly created DynVC should be deleted by the bot, including the text channel and the server role designated to it

Actual behavior The bot fails deleting the whole DynVC packet. It loses track of currently opened channels due to a possible rupture in the vc-bufferdict, causing 3 more sideeffects:

  1. All currently opened DynVCs are immediately untracked
  2. All currently opened or closing DynVCs cannot be deleted by the bot, making them orphaned
  3. All DynVCs created after this bug can not be set into the tracker, therefore all DynVC in existance are untrackable until the bot fully restarts

This bug forces a cold restart to get the bot in an operating state. This causes even more data loss and is not acceptable.