await a little before quiting channel

This commit is contained in:
Loic Bersier 2018-12-09 01:44:44 +01:00
parent 2cb9e3ae09
commit 657980d6eb
2 changed files with 2 additions and 1 deletions

View file

@ -67,7 +67,7 @@ module.exports = class ttsvcCommand extends Command {
const stream = "./tts.mp3" const stream = "./tts.mp3"
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
dispatcher.on('end', () => voiceChannel.leave()); await dispatcher.on('end', () => voiceChannel.leave());
}); });
}); });
}); });

View file

@ -26,6 +26,7 @@
"google-tts-api": "0.0.4", "google-tts-api": "0.0.4",
"node-fetch": "^2.2.0", "node-fetch": "^2.2.0",
"node-gyp": "^3.8.0", "node-gyp": "^3.8.0",
"node-opus": "^0.3.1",
"printer": "^0.2.2", "printer": "^0.2.2",
"self-reload-json": "^0.4.0", "self-reload-json": "^0.4.0",
"superagent": "^4.0.0-beta.5", "superagent": "^4.0.0-beta.5",