send message when error

This commit is contained in:
Loic Bersier 2018-12-08 21:17:19 +01:00
parent 28cf4430d7
commit 2db0e2ef8d

View file

@ -47,6 +47,7 @@ module.exports = class BadMemeCommand extends Command {
fs.writeFile('tts.mp3', response.audioContent, 'binary', err => { fs.writeFile('tts.mp3', response.audioContent, 'binary', err => {
if (err) { if (err) {
console.error('ERROR:', err); console.error('ERROR:', err);
message.say('An error has occured, the message is probably too long')
return; return;
} }
console.log('Audio content written to file: tts.mp3'); console.log('Audio content written to file: tts.mp3');