From 5cf7488cf9db3e7212a6270c481dc4c4d1788731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 8 Dec 2018 01:19:36 +0000 Subject: [PATCH] added tts --- commands/fun/tts.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/commands/fun/tts.js b/commands/fun/tts.js index 73e8639..a0e9430 100644 --- a/commands/fun/tts.js +++ b/commands/fun/tts.js @@ -27,6 +27,10 @@ module.exports = class BadMemeCommand extends Command { if(blacklistJson[message.author.id]) return blacklist(blacklistJson[message.author.id] , message) - speak(text, {format:'mp3', filename:'./tts'}); + speak(text, {format:'mp3', filename:'./tts'}) + .catch(err => message.say('An error has occured, you probably used an invalid char.')) + setTimeout(function(){ message.say({files: ['./tts.mp3']}) -}} \ No newline at end of file + .catch(err => message.say('An error has occured, you probably used invalid char.')) +}, 2000) +}}