1
0
Fork 0

Replaced outdated message.say by message.channel.send

akairo
loicbersier 5 years ago
parent 0be495c9f9
commit f7e562fb37

@ -32,6 +32,8 @@ class dectalkCommand extends Command {
args.decMessage = args.decMessage.replace('\n', ' '); args.decMessage = args.decMessage.replace('\n', ' ');
let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["'$`\\])/g,'\\$1'); let decMessage = '[:phoneme on] ' + args.decMessage.replace(/(["'$`\\])/g,'\\$1');
console.log(decMessage);
if (process.platform == 'win32') { if (process.platform == 'win32') {
exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`) exec(`cd .\\dectalk && .\\say.exe -w dectalk.wav "${decMessage}"`)
.catch(err => { .catch(err => {

@ -40,7 +40,7 @@ class dectalkvcCommand extends Command {
}) })
.then(async () => { .then(async () => {
const voiceChannel = message.member.voice.channel; 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 { try {
const connection = await voiceChannel.join(); const connection = await voiceChannel.join();
const dispatcher = connection.play('./dectalk/dectalk.wav'); const dispatcher = connection.play('./dectalk/dectalk.wav');
@ -64,7 +64,7 @@ class dectalkvcCommand extends Command {
}) })
.then(async () => { .then(async () => {
const voiceChannel = message.member.voice.channel; 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 { try {
loadingmsg.delete(); loadingmsg.delete();
const connection = await voiceChannel.join(); const connection = await voiceChannel.join();

@ -82,7 +82,7 @@ class samvcCommand extends Command {
fs.writeFile(outputFilename, result.data, async function(err) { fs.writeFile(outputFilename, result.data, async function(err) {
if (err) console.error(err); if (err) console.error(err);
const voiceChannel = message.member.voice.channel; 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 { try {
const connection = await voiceChannel.join(); const connection = await voiceChannel.join();
const dispatcher = connection.play(outputFilename); const dispatcher = connection.play(outputFilename);

@ -61,7 +61,7 @@ class TtsvcCommand extends Command {
} }
const voiceChannel = message.member.voice.channel; 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 { try {
const connection = await voiceChannel.join(); const connection = await voiceChannel.join();
const dispatcher = connection.play(output); const dispatcher = connection.play(output);

@ -25,7 +25,7 @@ class BotAvatarCommand extends Command {
let Attachment = (message.attachments).array(); let Attachment = (message.attachments).array();
let image = args.image; let image = args.image;
if (!Attachment[0] && !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]) { else if (image && !Attachment[0]) {
this.client.user.setAvatar(image) this.client.user.setAvatar(image)
.catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?')); .catch(() => message.channel.send('The link you provided dosen\'t work... is it a picture?'));

Loading…
Cancel
Save