it work now

This commit is contained in:
Loic Bersier 2018-12-09 01:46:15 +01:00
parent 657980d6eb
commit 6430af5a58

View file

@ -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);
});
});
});