From 3747ae17c14127e0dd68ea443755c4850b968690 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Jul 2020 21:00:08 -0400 Subject: Fixes on leave --- bot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index 986ba19..548b632 100644 --- a/bot.js +++ b/bot.js @@ -98,7 +98,6 @@ client.on('message', async msg => { // Bot owner exclusive - if (command == 'join') { msg.reply('Joining voice channel.'); console.log('Connected to the voice channel.'); @@ -108,7 +107,7 @@ client.on('message', async msg => { if (command == 'skip') { msg.reply('Skipping `' + audio + '`...'); dispatcher.pause(); - dispatcher = null + dispatcher = null; playAudio(); } @@ -117,6 +116,8 @@ client.on('message', async msg => { if (!channel) return console.error('The channel does not exist!'); msg.reply('Leaving voice channel.'); console.log('Leaving voice channel.'); + dispatcher.pause(); + dispatcher = null; channel.leave(); } -- cgit v1.2.3