From ee4206b48e1a1a33491b98b0f5f200f1bfbd2ce5 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Thu, 20 Dec 2018 16:54:43 +0100 Subject: [PATCH] --- commands/fun/ttsvc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/fun/ttsvc.js b/commands/fun/ttsvc.js index c324a6c1..645befac 100644 --- a/commands/fun/ttsvc.js +++ b/commands/fun/ttsvc.js @@ -60,14 +60,14 @@ module.exports = class ttsvcCommand extends Command { } else // If user say "stop" make the bot leave voice channel if (text == 'stop') { - voiceChannel.leave() + voiceChannel.end() message.say('I leaved the channel'); } else voiceChannel.join().then(connection => { const dispatcher = connection.playStream('./ttsvc.mp3'); // End at then end of the audio stream dispatcher.on('end', () => setTimeout(function(){ - voiceChannel.leave(); + voiceChannel.end(); }, 2000)); }); });