From f7e562fb3772176fc3c6d48a117e80a9abf540a9 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 10 Apr 2020 16:30:43 +0200 Subject: [PATCH] Replaced outdated message.say by message.channel.send --- commands/fun/tts/dectalk.js | 2 ++ commands/fun/tts/dectalkvc.js | 4 ++-- commands/fun/tts/samvc.js | 2 +- commands/fun/tts/ttsvc.js | 2 +- commands/owner/botAvatar.js | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/commands/fun/tts/dectalk.js b/commands/fun/tts/dectalk.js index a0304ac..68042c9 100644 --- a/commands/fun/tts/dectalk.js +++ b/commands/fun/tts/dectalk.js @@ -32,6 +32,8 @@ class dectalkCommand extends Command { args.decMessage = args.decMessage.replace('\n', ' '); let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["'$`\\])/g,'\\$1'); + console.log(decMessage); + if (process.platform == 'win32') { exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`) .catch(err => { diff --git a/commands/fun/tts/dectalkvc.js b/commands/fun/tts/dectalkvc.js index 647cec8..50130f2 100644 --- a/commands/fun/tts/dectalkvc.js +++ b/commands/fun/tts/dectalkvc.js @@ -40,7 +40,7 @@ class dectalkvcCommand extends Command { }) .then(async () => { const voiceChannel = message.member.voice.channel; - if (!voiceChannel) return message.say('Please enter a voice channel first.'); + if (!voiceChannel) return message.channel.send('Please enter a voice channel first.'); try { const connection = await voiceChannel.join(); const dispatcher = connection.play('./dectalk/dectalk.wav'); @@ -64,7 +64,7 @@ class dectalkvcCommand extends Command { }) .then(async () => { const voiceChannel = message.member.voice.channel; - if (!voiceChannel) return message.say('Please enter a voice channel first.'); + if (!voiceChannel) return message.channel.send('Please enter a voice channel first.'); try { loadingmsg.delete(); const connection = await voiceChannel.join(); diff --git a/commands/fun/tts/samvc.js b/commands/fun/tts/samvc.js index 96a4efd..3c05776 100644 --- a/commands/fun/tts/samvc.js +++ b/commands/fun/tts/samvc.js @@ -82,7 +82,7 @@ class samvcCommand extends Command { fs.writeFile(outputFilename, result.data, async function(err) { if (err) console.error(err); const voiceChannel = message.member.voice.channel; - if (!voiceChannel) return message.say('Please enter a voice channel first.'); + if (!voiceChannel) return message.channel.send('Please enter a voice channel first.'); try { const connection = await voiceChannel.join(); const dispatcher = connection.play(outputFilename); diff --git a/commands/fun/tts/ttsvc.js b/commands/fun/tts/ttsvc.js index 9cb14ce..b09fdea 100644 --- a/commands/fun/tts/ttsvc.js +++ b/commands/fun/tts/ttsvc.js @@ -61,7 +61,7 @@ class TtsvcCommand extends Command { } const voiceChannel = message.member.voice.channel; - if (!voiceChannel) return message.say('Please enter a voice channel first.'); + if (!voiceChannel) return message.channel.send('Please enter a voice channel first.'); try { const connection = await voiceChannel.join(); const dispatcher = connection.play(output); diff --git a/commands/owner/botAvatar.js b/commands/owner/botAvatar.js index 979e262..0e49a03 100644 --- a/commands/owner/botAvatar.js +++ b/commands/owner/botAvatar.js @@ -25,7 +25,7 @@ class BotAvatarCommand extends Command { let Attachment = (message.attachments).array(); let image = args.image; if (!Attachment[0] && !image) - return message.say('You didn\'t provide any images'); + return message.channel.send('You didn\'t provide any images'); else if (image && !Attachment[0]) { this.client.user.setAvatar(image) .catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?'));