Reputation: 173
I want to implement a check to see if there are no members in the voice channel the bot is in, so it can automatically disconnect and not stay there till I disconnect it or someone else does.
I had been searching around for any example, but found no relevant answers to my questions.
Anyone that can help?
Upvotes: 0
Views: 1234
Reputation: 380
I suggest using the voiceStateUpdate
event. In the event, check if there are members in the voicechannel. If not, then make the bot leave.
Check if user is in an specific voice Channel - Stackoverflow
Upvotes: 1