leave discord channel when stopped

This commit is contained in:
KGT1 2020-09-18 02:44:47 +02:00
parent e3e6768481
commit eb3928bd02

View File

@ -139,7 +139,9 @@ function handleChannelMessage(message) {
} else if (message.content.startsWith(CONFIG["discord-prefix"] + 'stop')) { } else if (message.content.startsWith(CONFIG["discord-prefix"] + 'stop')) {
getAudioDispatcher().pause() getAudioDispatcher().pause()
setAudioDispatcher(undefined) setAudioDispatcher(undefined)
discordClient.user.client.voice.connections.forEach((element) => {
element.disconnect();
});
} else if (message.content.startsWith(CONFIG["discord-prefix"] + 'help')) { } else if (message.content.startsWith(CONFIG["discord-prefix"] + 'help')) {
const reply = new Discord.MessageEmbed() const reply = new Discord.MessageEmbed()