forked from Supositware/Haha-Yes
tryna something else
This commit is contained in:
parent
8c085d9e57
commit
41eed9fef2
1 changed files with 4 additions and 2 deletions
|
@ -27,8 +27,6 @@ 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},
|
||||
|
@ -67,6 +65,10 @@ 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', () => setTimeout(function(){
|
||||
voiceChannel.leave();
|
||||
}, 2000));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue