it caused problem

This commit is contained in:
Loic Bersier 2018-12-09 01:54:02 +01:00
parent c376cce0a8
commit c003e27609

View file

@ -66,9 +66,7 @@ module.exports = class ttsvcCommand extends Command {
voiceChannel.join().then(connection => { voiceChannel.join().then(connection => {
const dispatcher = connection.playStream('./tts.mp3'); const dispatcher = connection.playStream('./tts.mp3');
// End at then end of the audio stream // End at then end of the audio stream
setTimeout(function(){
dispatcher.on('end', () => voiceChannel.leave()); dispatcher.on('end', () => voiceChannel.leave());
}, 2000);
}); });
}); });
}); });