From 8c085d9e57802513b446d8d0fa04bfeb909aabf4 Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Sun, 9 Dec 2018 01:58:00 +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 f437a55a..6967d370 100644 --- a/commands/fun/ttsvc.js +++ b/commands/fun/ttsvc.js @@ -27,6 +27,8 @@ module.exports = class ttsvcCommand extends Command { if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) + voiceChannel.leave(); + // Construct the request const request = { input: {text: text}, @@ -65,8 +67,6 @@ module.exports = class ttsvcCommand extends Command { } else voiceChannel.join().then(connection => { const dispatcher = connection.playStream('./tts.mp3'); - // End at then end of the audio stream - dispatcher.on('end', () => voiceChannel.leave()); }); }); });