forked from Supositware/Haha-Yes
Fixed typo "occured" to "occurred" (holy shit there was a lot)
This commit is contained in:
parent
c97342e516
commit
05c3cf5f76
26 changed files with 41 additions and 41 deletions
|
@ -55,13 +55,13 @@ class BanCommand extends Command {
|
||||||
|
|
||||||
return user.ban({reason: `Banned by : ${message.author.username} for the following reasons : ${reasons}`})
|
return user.ban({reason: `Banned by : ${message.author.username} for the following reasons : ${reasons}`})
|
||||||
.then(() => message.reply(`${user.user.username} was succesfully banned with the following reasons "${reasons}".`))
|
.then(() => message.reply(`${user.user.username} was succesfully banned with the following reasons "${reasons}".`))
|
||||||
//.catch(() => message.reply('Uh oh, an error has occured! can the bot ban this user?'));
|
//.catch(() => message.reply('Uh oh, an error has occurred! can the bot ban this user?'));
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
message.guild.members.ban(user, {reason: `Banned by : ${message.author.username} for the following reasons : ${reasons}`})
|
message.guild.members.ban(user, {reason: `Banned by : ${message.author.username} for the following reasons : ${reasons}`})
|
||||||
.then(() => message.reply(`user ID ${args.user} was succesfully hackbanned with the following reasons "${reasons}".`))
|
.then(() => message.reply(`user ID ${args.user} was succesfully hackbanned with the following reasons "${reasons}".`))
|
||||||
//.catch(() => message.reply('Uh oh, an error has occured! can the bot ban this user?'));
|
//.catch(() => message.reply('Uh oh, an error has occurred! can the bot ban this user?'));
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ class FourchanCommand extends Command {
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (err.type == 'invalid-json') return message.channel.send('Could not find the board! Try again!');
|
if (err.type == 'invalid-json') return message.channel.send('Could not find the board! Try again!');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Uh-oh, an error has occured! Try again! If this keeps happening, tell the developers!');
|
return message.channel.send('Uh-oh, an error has occurred! Try again! If this keeps happening, tell the developers!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ class audio2imageCommand extends Command {
|
||||||
.output(`${os.tmpdir()}/${message.id}1.sw`)
|
.output(`${os.tmpdir()}/${message.id}1.sw`)
|
||||||
.on('error', (err, stdout, stderr) => {
|
.on('error', (err, stdout, stderr) => {
|
||||||
console.error(`${err}\n${stdout}\n${stderr}`);
|
console.error(`${err}\n${stdout}\n${stderr}`);
|
||||||
return message.channel.send('Uh oh, an error has occured!');
|
return message.channel.send('Uh oh, an error has occurred!');
|
||||||
})
|
})
|
||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
ffmpeg()
|
ffmpeg()
|
||||||
|
@ -68,7 +68,7 @@ class audio2imageCommand extends Command {
|
||||||
.output(`${os.tmpdir()}/a2i${message.id}.png`)
|
.output(`${os.tmpdir()}/a2i${message.id}.png`)
|
||||||
.on('error', (err, stdout, stderr) => {
|
.on('error', (err, stdout, stderr) => {
|
||||||
console.error(`${err}\n${stdout}\n${stderr}`);
|
console.error(`${err}\n${stdout}\n${stderr}`);
|
||||||
return message.channel.send('Uh oh, an error has occured! The image size is most likely bigger than the content! Try again!');
|
return message.channel.send('Uh oh, an error has occurred! The image size is most likely bigger than the content! Try again!');
|
||||||
})
|
})
|
||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
console.log('finished');
|
console.log('finished');
|
||||||
|
|
|
@ -52,7 +52,7 @@ class image2audioCommand extends Command {
|
||||||
.output(`${os.tmpdir()}/${message.id}1.png`)
|
.output(`${os.tmpdir()}/${message.id}1.png`)
|
||||||
.on('error', (err, stdout, stderr) => {
|
.on('error', (err, stdout, stderr) => {
|
||||||
console.error(`${err}\n${stdout}\n${stderr}`);
|
console.error(`${err}\n${stdout}\n${stderr}`);
|
||||||
return message.channel.send('Uh oh, an error has occured!');
|
return message.channel.send('Uh oh, an error has occurred!');
|
||||||
})
|
})
|
||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
ffmpeg()
|
ffmpeg()
|
||||||
|
@ -63,7 +63,7 @@ class image2audioCommand extends Command {
|
||||||
.output(`${os.tmpdir()}/i2a_${message.id}.${args.wav ? 'wav' : 'mp3'}`)
|
.output(`${os.tmpdir()}/i2a_${message.id}.${args.wav ? 'wav' : 'mp3'}`)
|
||||||
.on('error', (err, stdout, stderr) => {
|
.on('error', (err, stdout, stderr) => {
|
||||||
console.error(`${err}\n${stdout}\n${stderr}`);
|
console.error(`${err}\n${stdout}\n${stderr}`);
|
||||||
return message.channel.send('Uh oh, an error has occured!');
|
return message.channel.send('Uh oh, an error has occurred!');
|
||||||
})
|
})
|
||||||
.on('end', () => {
|
.on('end', () => {
|
||||||
console.log('finished');
|
console.log('finished');
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ImgurCommand extends Command {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
if (response.success == 'false')
|
if (response.success == 'false')
|
||||||
return message.channel.send('An error has occured');
|
return message.channel.send('An error has occurred');
|
||||||
|
|
||||||
const i = Math.floor((Math.random() * response.data.length));
|
const i = Math.floor((Math.random() * response.data.length));
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ class midifyCommand extends Command {
|
||||||
})
|
})
|
||||||
.on('error', (err, stdout, stderr) => {
|
.on('error', (err, stdout, stderr) => {
|
||||||
console.error(`${err}\n${stdout}\n${stderr}`);
|
console.error(`${err}\n${stdout}\n${stderr}`);
|
||||||
return message.channel.send('Oh no! an error has occured during the conversion, are you sure it is a valid file?');
|
return message.channel.send('Oh no! an error has occurred during the conversion, are you sure it is a valid file?');
|
||||||
})
|
})
|
||||||
.run();
|
.run();
|
||||||
});
|
});
|
||||||
|
@ -94,7 +94,7 @@ class midifyCommand extends Command {
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
return message.channel.send('On no! an error just occured! perhaps the file is too big?');
|
return message.channel.send('On no! an error just occurred! perhaps the file is too big?');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,17 +114,17 @@ class midifyCommand extends Command {
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
return message.channel.send('On no! an error just occured! perhaps the file is too big?');
|
return message.channel.send('On no! an error just occurred! perhaps the file is too big?');
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no! an error has occured during the conversion, are you sure it is a valid file?');
|
return message.channel.send('Oh no! an error has occurred during the conversion, are you sure it is a valid file?');
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no! an error has occured during the conversion, are you sure it is a valid file?');
|
return message.channel.send('Oh no! an error has occurred during the conversion, are you sure it is a valid file?');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ class dectalkCommand extends Command {
|
||||||
exec(`cd .\\dectalk && .\\say.exe -w ${output} "${decMessage}"`)
|
exec(`cd .\\dectalk && .\\say.exe -w ${output} "${decMessage}"`)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no! an error has occured!');
|
return message.channel.send('Oh no! an error has occurred!');
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return message.channel.send({files: [output]});
|
return message.channel.send({files: [output]});
|
||||||
|
@ -50,7 +50,7 @@ class dectalkCommand extends Command {
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no! an error has occured!');
|
return message.channel.send('Oh no! an error has occurred!');
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
|
|
|
@ -38,7 +38,7 @@ class dectalkvcCommand extends Command {
|
||||||
exec(`cd .\\dectalk && .\\say.exe -w ${output} "${decMessage}"`)
|
exec(`cd .\\dectalk && .\\say.exe -w ${output} "${decMessage}"`)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no! an error has occured!');
|
return message.channel.send('Oh no! an error has occurred!');
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const voiceChannel = message.member.voice.channel;
|
const voiceChannel = message.member.voice.channel;
|
||||||
|
@ -62,7 +62,7 @@ class dectalkvcCommand extends Command {
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no! an error has occured!');
|
return message.channel.send('Oh no! an error has occurred!');
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
const voiceChannel = message.member.voice.channel;
|
const voiceChannel = message.member.voice.channel;
|
||||||
|
|
|
@ -79,7 +79,7 @@ class samCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send(`Uh oh, an error has occured! please try again later.\n${err}`);
|
return message.channel.send(`Uh oh, an error has occurred! please try again later.\n${err}`);
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
const outputFilename = `${os.tmpdir}/${message.id}_sam.wav`;
|
const outputFilename = `${os.tmpdir}/${message.id}_sam.wav`;
|
||||||
|
|
|
@ -79,7 +79,7 @@ class samvcCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send(`Uh oh, an error has occured! please try again later.\n${err}`);
|
return message.channel.send(`Uh oh, an error has occurred! please try again later.\n${err}`);
|
||||||
})
|
})
|
||||||
|
|
||||||
.then(async (result) => {
|
.then(async (result) => {
|
||||||
|
|
|
@ -56,7 +56,7 @@ class TtsCommand extends Command {
|
||||||
fs.writeFile(output, response.audioContent, 'binary', err => {
|
fs.writeFile(output, response.audioContent, 'binary', err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error('ERROR:', err);
|
console.error('ERROR:', err);
|
||||||
message.channel.send('An error has occured, the message is probably too long');
|
message.channel.send('An error has occurred, the message is probably too long');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ class TtsvcCommand extends Command {
|
||||||
fs.writeFile(output, response.audioContent, 'binary', async err => {
|
fs.writeFile(output, response.audioContent, 'binary', async err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error('ERROR:', err);
|
console.error('ERROR:', err);
|
||||||
message.channel.send('An error has occured, the message is probably too long');
|
message.channel.send('An error has occurred, the message is probably too long');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,7 +258,7 @@ class ytpCommand extends Command {
|
||||||
return message.reply({files: [Math.random() < 0.5 ? './asset/ytp/error1.mp4' : './asset/ytp/error2.mp4']})
|
return message.reply({files: [Math.random() < 0.5 ? './asset/ytp/error1.mp4' : './asset/ytp/error2.mp4']})
|
||||||
.catch(err => { // In case it can't send the video for some reason
|
.catch(err => { // In case it can't send the video for some reason
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no, an error has occured! please try again. If this happens alot, you should report this to the developers.');
|
return message.channel.send('Oh no, an error has occurred! please try again. If this happens alot, you should report this to the developers.');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ class tweetCommand extends Command {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log('OH NO AN ERROR!!!!!!!');
|
console.log('OH NO AN ERROR!!!!!!!');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('OH NO!!! AN ERROR HAS OCCURED!!! please hold on while i find what\'s causing this issue! ');
|
return message.channel.send('OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ');
|
||||||
} else {
|
} else {
|
||||||
Tweet(data);
|
Tweet(data);
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ class tweetCommand extends Command {
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no, an error has occured :(');
|
return message.channel.send('Oh no, an error has occurred :(');
|
||||||
}
|
}
|
||||||
|
|
||||||
function Tweet(data) {
|
function Tweet(data) {
|
||||||
|
@ -153,7 +153,7 @@ class tweetCommand extends Command {
|
||||||
if (err.code == 326) return message.channel.send(err.message); // To protect our users from spam and other malicious activity, this account is temporarily locked.
|
if (err.code == 326) return message.channel.send(err.message); // To protect our users from spam and other malicious activity, this account is temporarily locked.
|
||||||
console.error('OH NO!!!!');
|
console.error('OH NO!!!!');
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('OH NO!!! AN ERROR HAS OCCURED!!! please hold on while i find what\'s causing this issue! ');
|
return message.channel.send('OH NO!!! AN ERROR HAS occurred!!! please hold on while i find what\'s causing this issue! ');
|
||||||
}
|
}
|
||||||
|
|
||||||
const tweetid = response.id_str;
|
const tweetid = response.id_str;
|
||||||
|
|
|
@ -49,7 +49,7 @@ class autocropCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
return message.channel.send('Oh no, an error just occurred! Maybe the format of your image don\'t work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class blurCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
return message.channel.send('Oh no, an error just occurred! Maybe the format of your image don\'t work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class gaussianCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
return message.channel.send('Oh no, an error just occurred! Maybe the format of your image don\'t work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class jpegifyCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
return message.channel.send('Oh no, an error just occurred! Maybe the format of your image don\'t work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ class memeCommand extends Command {
|
||||||
img.format(function(err, format) {
|
img.format(function(err, format) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('An error has occured, is it an image?');
|
return message.channel.send('An error has occurred, is it an image?');
|
||||||
}
|
}
|
||||||
let output = `${os.tmpdir()}/meme${message.id}.${format.toLowerCase()}`;
|
let output = `${os.tmpdir()}/meme${message.id}.${format.toLowerCase()}`;
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ class memeCommand extends Command {
|
||||||
.drawText(0, BOTTOM_POS, BOTTOM_TEXT, TEXT_POS)
|
.drawText(0, BOTTOM_POS, BOTTOM_TEXT, TEXT_POS)
|
||||||
.write(output, function(err) {
|
.write(output, function(err) {
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
if (err) return message.channel.send('An error just occured! is it a static image?');
|
if (err) return message.channel.send('An error just occurred! is it a static image?');
|
||||||
message.delete();
|
message.delete();
|
||||||
return message.channel.send(`Made by ${message.author.username}`,{files: [output]})
|
return message.channel.send(`Made by ${message.author.username}`,{files: [output]})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
|
|
@ -52,7 +52,7 @@ class mirrorCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
return message.channel.send('Oh no, an error just occurredred! Maybe the format of your image don\'t work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class paintCommand extends Command {
|
||||||
const canvas = createCanvas(488, 400);
|
const canvas = createCanvas(488, 400);
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
const background = await loadImage(image).catch(() => {
|
const background = await loadImage(image).catch(() => {
|
||||||
return message.channel.send('An error as occured, please try again');
|
return message.channel.send('An error as occurred, please try again');
|
||||||
});
|
});
|
||||||
ctx.drawImage(background, 65, 30, 405, 280);
|
ctx.drawImage(background, 65, 30, 405, 280);
|
||||||
const { body: buffer } = await superagent.get('https://cdn.discordapp.com/attachments/488483518742134794/542633779601342476/260293545019212.png');
|
const { body: buffer } = await superagent.get('https://cdn.discordapp.com/attachments/488483518742134794/542633779601342476/260293545019212.png');
|
||||||
|
@ -43,7 +43,7 @@ class paintCommand extends Command {
|
||||||
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
|
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
|
||||||
|
|
||||||
message.channel.send({files: [canvas.toBuffer()]}).catch(() => {
|
message.channel.send({files: [canvas.toBuffer()]}).catch(() => {
|
||||||
message.channel.send('an error as occured. Check the bot/channel permissions');
|
message.channel.send('an error as occurred. Check the bot/channel permissions');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ class posterCommand extends Command {
|
||||||
img.format(function(err, format) {
|
img.format(function(err, format) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('An error has occured, is it an image?');
|
return message.channel.send('An error has occurred, is it an image?');
|
||||||
}
|
}
|
||||||
let output1 = `${os.tmpdir()}/poster${message.author.id}.${format.toLowerCase()}`;
|
let output1 = `${os.tmpdir()}/poster${message.author.id}.${format.toLowerCase()}`;
|
||||||
let output2 = `${os.tmpdir()}/poster${message.id}.${format.toLowerCase()}`;
|
let output2 = `${os.tmpdir()}/poster${message.id}.${format.toLowerCase()}`;
|
||||||
|
@ -127,7 +127,7 @@ class posterCommand extends Command {
|
||||||
.write(output1, function(err) {
|
.write(output1, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('An error just occured! is it a static image?');
|
return message.channel.send('An error just occurred! is it a static image?');
|
||||||
}
|
}
|
||||||
// Chop the top part of the image
|
// Chop the top part of the image
|
||||||
let img2 = gm(output1);
|
let img2 = gm(output1);
|
||||||
|
@ -136,7 +136,7 @@ class posterCommand extends Command {
|
||||||
loadingmsg.delete();
|
loadingmsg.delete();
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('An error just occured! is it a static image?');
|
return message.channel.send('An error just occurred! is it a static image?');
|
||||||
}
|
}
|
||||||
message.delete();
|
message.delete();
|
||||||
return message.channel.send(`Made by ${message.author.username}`,{files: [output2]})
|
return message.channel.send(`Made by ${message.author.username}`,{files: [output2]})
|
||||||
|
|
|
@ -64,7 +64,7 @@ class rotateCommand extends Command {
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return message.channel.send('Oh no, an error just occured! Maybe the format of your image don\'t work?');
|
return message.channel.send('Oh no, an error just vidshittyfiered! Maybe the format of your image don\'t work?');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ class execCommand extends Command {
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
async function update() {
|
async function update() {
|
||||||
let { stdout, stderr } = await exec(args.exec).catch(err => {
|
let { stdout, stderr } = await exec(args.exec).catch(err => {
|
||||||
return message.channel.send(`Oh no, an error has occured\n${err}`);
|
return message.channel.send(`Oh no, an error has occurred\n${err}`);
|
||||||
});
|
});
|
||||||
if (!stdout) stdout = 'Nothing';
|
if (!stdout) stdout = 'Nothing';
|
||||||
if (!stderr) stderr = 'No error';
|
if (!stderr) stderr = 'No error';
|
||||||
|
|
|
@ -39,7 +39,7 @@ class rtweetCommand extends Command {
|
||||||
return message.channel.send('Tweet have been deleted!');
|
return message.channel.send('Tweet have been deleted!');
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return message.channel.send('Oh no, an error has occured :(');
|
return message.channel.send('Oh no, an error has occurred :(');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class translateCommand extends Command {
|
||||||
if (response.code == '502')
|
if (response.code == '502')
|
||||||
return message.channel.send(`${response.message}, you probably didn't input the correct language code, you can check them here! https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/`);
|
return message.channel.send(`${response.message}, you probably didn't input the correct language code, you can check them here! https://tech.yandex.com/translate/doc/dg/concepts/api-overview-docpage/`);
|
||||||
else if (response.code != '200')
|
else if (response.code != '200')
|
||||||
return message.channel.send('An error has occured');
|
return message.channel.send('An error has occurred');
|
||||||
let description = response.text[0];
|
let description = response.text[0];
|
||||||
let lang = response.detected.lang;
|
let lang = response.detected.lang;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue