diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-07-20 21:00:08 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-07-20 21:00:08 -0400 |
| commit | 3747ae17c14127e0dd68ea443755c4850b968690 (patch) | |
| tree | c8cf150755cd03b7c42699dfc70c49af617e048f | |
| parent | 9f3b0e9a68ff2529ddc974c29614cc575b5a26c5 (diff) | |
| download | DLAP-3747ae17c14127e0dd68ea443755c4850b968690.tar.gz DLAP-3747ae17c14127e0dd68ea443755c4850b968690.tar.bz2 DLAP-3747ae17c14127e0dd68ea443755c4850b968690.zip | |
Fixes on leave
| -rw-r--r-- | bot.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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(); } |
