Fixed typo "occured" to "occurred" (holy shit there was a lot)

This commit is contained in:
loicbersier 2020-07-16 09:42:07 +02:00
parent c97342e516
commit 05c3cf5f76
26 changed files with 41 additions and 41 deletions

View file

@ -55,13 +55,13 @@ class BanCommand extends Command {
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}".`))
//.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));
} else {
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}".`))
//.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));
}
}

View file

@ -90,7 +90,7 @@ class FourchanCommand extends Command {
.catch((err) => {
if (err.type == 'invalid-json') return message.channel.send('Could not find the board! Try again!');
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!');
});
}
}

View file

@ -56,7 +56,7 @@ class audio2imageCommand extends Command {
.output(`${os.tmpdir()}/${message.id}1.sw`)
.on('error', (err, stdout, 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', () => {
ffmpeg()
@ -68,7 +68,7 @@ class audio2imageCommand extends Command {
.output(`${os.tmpdir()}/a2i${message.id}.png`)
.on('error', (err, stdout, 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', () => {
console.log('finished');

View file

@ -52,7 +52,7 @@ class image2audioCommand extends Command {
.output(`${os.tmpdir()}/${message.id}1.png`)
.on('error', (err, stdout, 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', () => {
ffmpeg()
@ -63,7 +63,7 @@ class image2audioCommand extends Command {
.output(`${os.tmpdir()}/i2a_${message.id}.${args.wav ? 'wav' : 'mp3'}`)
.on('error', (err, stdout, 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', () => {
console.log('finished');

View file

@ -22,7 +22,7 @@ class ImgurCommand extends Command {
return response.json();
}).then((response) => {
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));

View file

@ -75,7 +75,7 @@ class midifyCommand extends Command {
})
.on('error', (err, stdout, 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();
});
@ -94,7 +94,7 @@ class midifyCommand extends Command {
.catch(err => {
console.error(err);
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 => {
console.error(err);
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 => {
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 => {
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?');
});
}
}

View file

@ -38,7 +38,7 @@ class dectalkCommand extends Command {
exec(`cd .\\dectalk && .\\say.exe -w ${output} "${decMessage}"`)
.catch(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(() => {
return message.channel.send({files: [output]});
@ -50,7 +50,7 @@ class dectalkCommand extends Command {
.catch(err => {
loadingmsg.delete();
console.error(err);
return message.channel.send('Oh no! an error has occured!');
return message.channel.send('Oh no! an error has occurred!');
})
.then(() => {
loadingmsg.delete();

View file

@ -38,7 +38,7 @@ class dectalkvcCommand extends Command {
exec(`cd .\\dectalk && .\\say.exe -w ${output} "${decMessage}"`)
.catch(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 () => {
const voiceChannel = message.member.voice.channel;
@ -62,7 +62,7 @@ class dectalkvcCommand extends Command {
.catch(err => {
loadingmsg.delete();
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 () => {
const voiceChannel = message.member.voice.channel;

View file

@ -79,7 +79,7 @@ class samCommand extends Command {
})
.catch((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) => {
const outputFilename = `${os.tmpdir}/${message.id}_sam.wav`;

View file

@ -79,7 +79,7 @@ class samvcCommand extends Command {
})
.catch((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) => {

View file

@ -56,7 +56,7 @@ class TtsCommand extends Command {
fs.writeFile(output, response.audioContent, 'binary', err => {
if (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;
}

View file

@ -55,7 +55,7 @@ class TtsvcCommand extends Command {
fs.writeFile(output, response.audioContent, 'binary', async err => {
if (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;
}

View file

@ -258,7 +258,7 @@ class ytpCommand extends Command {
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
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.');
});
});
}

View file

@ -111,7 +111,7 @@ class tweetCommand extends Command {
if (err) {
console.log('OH NO AN ERROR!!!!!!!');
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 {
Tweet(data);
}
@ -126,7 +126,7 @@ class tweetCommand extends Command {
}
} catch(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) {
@ -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.
console.error('OH NO!!!!');
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;

View file

@ -49,7 +49,7 @@ class autocropCommand extends Command {
})
.catch(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?');
});

View file

@ -60,7 +60,7 @@ class blurCommand extends Command {
})
.catch(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?');
});

View file

@ -61,7 +61,7 @@ class gaussianCommand extends Command {
})
.catch(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?');
});

View file

@ -52,7 +52,7 @@ class jpegifyCommand extends Command {
})
.catch(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?');
});

View file

@ -80,7 +80,7 @@ class memeCommand extends Command {
img.format(function(err, format) {
if (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()}`;
@ -101,7 +101,7 @@ class memeCommand extends Command {
.drawText(0, BOTTOM_POS, BOTTOM_TEXT, TEXT_POS)
.write(output, function(err) {
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();
return message.channel.send(`Made by ${message.author.username}`,{files: [output]})
.catch(() => {

View file

@ -52,7 +52,7 @@ class mirrorCommand extends Command {
})
.catch(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?');
});

View file

@ -35,7 +35,7 @@ class paintCommand extends Command {
const canvas = createCanvas(488, 400);
const ctx = canvas.getContext('2d');
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);
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);
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');
});
}
}

View file

@ -93,7 +93,7 @@ class posterCommand extends Command {
img.format(function(err, format) {
if (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 output2 = `${os.tmpdir()}/poster${message.id}.${format.toLowerCase()}`;
@ -127,7 +127,7 @@ class posterCommand extends Command {
.write(output1, function(err) {
if (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
let img2 = gm(output1);
@ -136,7 +136,7 @@ class posterCommand extends Command {
loadingmsg.delete();
if (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();
return message.channel.send(`Made by ${message.author.username}`,{files: [output2]})

View file

@ -64,7 +64,7 @@ class rotateCommand extends Command {
})
.catch(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?');
});

View file

@ -26,7 +26,7 @@ class execCommand extends Command {
async exec(message, args) {
async function update() {
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 (!stderr) stderr = 'No error';

View file

@ -39,7 +39,7 @@ class rtweetCommand extends Command {
return message.channel.send('Tweet have been deleted!');
} catch(err) {
console.error(err);
return message.channel.send('Oh no, an error has occured :(');
return message.channel.send('Oh no, an error has occurred :(');
}
}

View file

@ -47,7 +47,7 @@ class translateCommand extends Command {
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/`);
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 lang = response.detected.lang;