codinglab-io / discord-bot

Discord bot for Codinglab's server.
https://discord.com/invite/codinglab-174169014568878080
MIT License
18 stars 14 forks source link

fix(voiceOnDemand): remove duplicate channel deletion related code #109

Closed tonykero closed 10 months ago

tonykero commented 10 months ago

This fixes the following bug:

  1. A user disconnects from a voice channel
  2. The channel proceeds to get deleted because there isn't anyone in the channel anymore
  3. (bug) All the voice channels gets deleted (except the lobby one)

From my understanding, channel deletion is already handled here

and the role of this handler should only to remove channel from cache if its a lobby one right ?

To me this bug is even worse because it seems that even across multiple servers, someone leaving a voice channel in a guild, would provoke the deletion of every voice channels in every guild.

Anyway, tested on a local discord server, the bug is fixed, and the channel deletion still works when no user is left.