From 6430af5a584b8c188d9f3a96a5e40746746849ff Mon Sep 17 00:00:00 2001 From: Loic Bersier Date: Sun, 9 Dec 2018 01:46:15 +0100 Subject: [PATCH] it work now --- commands/fun/ttsvc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/fun/ttsvc.js b/commands/fun/ttsvc.js index 43c42b4..c231cef 100644 --- a/commands/fun/ttsvc.js +++ b/commands/fun/ttsvc.js @@ -67,7 +67,9 @@ module.exports = class ttsvcCommand extends Command { const stream = "./tts.mp3" const dispatcher = connection.playStream('./tts.mp3'); // End at then end of the audio stream - await dispatcher.on('end', () => voiceChannel.leave()); + setTimeout(function(){ + dispatcher.on('end', () => voiceChannel.leave()); + }, 1000); }); }); });