aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bot.js5
1 files changed, 3 insertions, 2 deletions
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();
}