samuelsogbesan / leetbot

LeetCode Question Bot for Discord.
Apache License 2.0
1 stars 0 forks source link

Detect when user leaves/joins designated queue ⛷️ #6

Closed samuelsogbesan closed 3 years ago

samuelsogbesan commented 3 years ago

Listen to the voiceStateUpdate event to see when a user joins / leaves a channel. Then we check if the channel they left/joined is one of the queue channels.

Next step is to implement queue logic right

samuelsogbesan commented 3 years ago

@bailslearnsstuff I think we should make the queue part more future proof. Instead of checking one ID, lets maintain a set of queue channels, and then see if the channel is in the set. That way a channel could have mulitple queues for whatever reason.

Does moving from one queue to another count as leaving the queue? Cause then the logic would have to change slightly.