Flush on channel leave

master
Talon 2024-04-25 01:08:11 +02:00
parent 4a371cf4d6
commit 17ba5e2048
1 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,8 @@ module.exports = function (bot, api) {
const channel = oldState.channel || newState.channel; const channel = oldState.channel || newState.channel;
if (!channel) return; if (!channel) return;
if (channel.members.size < 2) { if (channel.members.size < 2) {
return await api.leaveChannel(channel); await api.leaveChannel(channel);
api.AudioQueue.flush();
} }
await api.joinChannel(channel); await api.joinChannel(channel);
let joined = false; let joined = false;