Small changes, reply to some things

This commit is contained in:
Daniel Odendahl Jr
2017-10-24 19:02:27 +00:00
parent e0594c8749
commit c225ea4659
141 changed files with 251 additions and 254 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = class YearsCommand extends Command {
ctx.drawImage(avatar, 461, 127, 200, 200);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: '3000-years.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = class ApprovedCommand extends Command {
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'approved.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -53,7 +53,7 @@ module.exports = class AvatarFusionCommand extends Command {
ctx.drawImage(overlayAvatar, 0, 0, baseAvatar.width, baseAvatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'avatar-fusion.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = class BeautifulCommand extends Command {
ctx.drawImage(avatar, 343, 301, 117, 135);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'beautiful.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -47,7 +47,7 @@ module.exports = class BobRossCommand extends Command {
ctx.drawImage(base, 0, 0);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'bob-ross.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -65,7 +65,7 @@ module.exports = class CardCommand extends Command {
ctx.fillText(`#${user.discriminator}`, 313, 355);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'card.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = class ChallengerCommand extends Command {
ctx.drawImage(avatar, 484, 98, 256, 256);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'challenger.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class ChristmasHatCommand extends Command {
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'christmas-hat.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = class DexterCommand extends Command {
ctx.rotate(11 * (Math.PI / 180));
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'dexter.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = class FoodBrokeCommand extends Command {
ctx.drawImage(avatar, 117, 382, 75, 75);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'food-broke.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class GreyscaleCommand extends Command {
greyscale(ctx, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'greyscale.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class HeLivesInYouCommand extends Command {
ctx.rotate(24 * (Math.PI / 180));
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'he-lives-in-you.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class IHaveThePowerCommand extends Command {
ctx.rotate(-18.3 * (Math.PI / 180));
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'i-have-the-power.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -41,7 +41,7 @@ module.exports = class InvertCommand extends Command {
invert(ctx, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'invert.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
@@ -45,7 +45,7 @@ module.exports = class LookAtThisPhotographCommand extends Command {
ctx.rotate(13.5 * (Math.PI / 180));
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'look-at-this-photograph.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class PixelizeCommand extends Command {
ctx.drawImage(avatar, 0, 0, 512, 512);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pixelize.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = class RainbowCommand extends Command {
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rainbow.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = class RejctedCommand extends Command {
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rejected.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class RIPCommand extends Command {
greyscale(ctx, 158, 51, 200, 200);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'rip.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -41,7 +41,7 @@ module.exports = class SepiaCommand extends Command {
sepia(ctx, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'sepia.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -41,7 +41,7 @@ module.exports = class SilhouetteCommand extends Command {
silhouette(ctx, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'silhouette.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -51,7 +51,7 @@ module.exports = class SteamCardCommand extends Command {
ctx.fillText(member.displayName, 35, 48);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-card.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -59,7 +59,7 @@ module.exports = class SteamNowPlayingCommand extends Command {
ctx.fillText(shorten ? `${game}...` : game, 63, 54);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'steam-now-playing.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = class ThugLifeCommand extends Command {
ctx.drawImage(base, 0, 0, avatar.width, avatar.height);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'thug-life.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -47,7 +47,7 @@ module.exports = class TriggeredCommand extends Command {
ctx.drawImage(base, 0, 0);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'triggered.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class WantedCommand extends Command {
sepia(ctx, 150, 360, 430, 430);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'wanted.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = class YuGiOhTokenCommand extends Command {
ctx.drawImage(avatar, 45, 102, 293, 294);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'yu-gi-oh-token.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+3 -3
View File
@@ -19,7 +19,7 @@ module.exports = class AkinatorCommand extends Command {
}
async run(msg) {
if (this.sessions.has(msg.channel.id)) return msg.say('Only one game may be occuring per channel.');
if (this.sessions.has(msg.channel.id)) return msg.reply('Only one game may be occuring per channel.');
try {
let ans = null;
this.sessions.set(msg.channel.id, { progress: null });
@@ -55,12 +55,12 @@ module.exports = class AkinatorCommand extends Command {
await msg.embed(embed);
const verification = await verify(msg.channel, msg.author);
this.sessions.delete(msg.channel.id);
if (verification === 0) return msg.reply('I guess your silence means I have won.');
if (verification === 0) return msg.say('I guess your silence means I have won.');
if (!verification) return msg.say('Bravo, you have defeated me.');
return msg.say('Guessed right one more time! I love playing with you!');
} catch (err) {
this.sessions.delete(msg.channel.id);
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
+3 -3
View File
@@ -25,8 +25,8 @@ module.exports = class BattleCommand extends Command {
async run(msg, { opponent }) { // eslint-disable-line complexity
if (!opponent) opponent = this.client.user;
if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.');
if (this.fighting.has(msg.channel.id)) return msg.say('Only one fight may be occurring per channel.');
if (opponent.id === msg.author.id) return msg.reply('You may not fight yourself.');
if (this.fighting.has(msg.channel.id)) return msg.reply('Only one fight may be occurring per channel.');
this.fighting.add(msg.channel.id);
try {
if (!opponent.bot) {
@@ -100,7 +100,7 @@ module.exports = class BattleCommand extends Command {
forfeit();
break;
} else {
await msg.say(`${user}, I do not understand what you want to do.`);
await msg.say('I do not understand what you want to do.');
}
}
this.fighting.delete(msg.channel.id);
+3 -3
View File
@@ -25,9 +25,9 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command {
}
async run(msg, { opponent }) {
if (opponent.bot) return msg.say('Bots may not be played against.');
if (opponent.id === msg.author.id) return msg.say('You may not play against yourself.');
if (this.playing.has(msg.channel.id)) return msg.say('Only one fight may be occurring per channel.');
if (opponent.bot) return msg.reply('Bots may not be played against.');
if (opponent.id === msg.author.id) return msg.reply('You may not play against yourself.');
if (this.playing.has(msg.channel.id)) return msg.reply('Only one fight may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
await msg.say(`${opponent}, do you accept this challenge?`);
+3 -3
View File
@@ -24,9 +24,9 @@ module.exports = class GunfightCommand extends Command {
}
async run(msg, { opponent }) {
if (opponent.bot) return msg.say('Bots may not be fought.');
if (opponent.id === msg.author.id) return msg.say('You may not fight yourself.');
if (this.fighting.has(msg.channel.id)) return msg.say('Only one fight may be occurring per channel.');
if (opponent.bot) return msg.reply('Bots may not be fought.');
if (opponent.id === msg.author.id) return msg.reply('You may not fight yourself.');
if (this.fighting.has(msg.channel.id)) return msg.reply('Only one fight may be occurring per channel.');
this.fighting.add(msg.channel.id);
try {
await msg.say(`${opponent}, do you accept this challenge?`);
+2 -2
View File
@@ -16,7 +16,7 @@ module.exports = class HangmanCommand extends Command {
}
async run(msg) {
if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.');
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
const { body } = await snekfetch
@@ -73,7 +73,7 @@ module.exports = class HangmanCommand extends Command {
return msg.say(`Too bad... It was ${word}...`);
} catch (err) {
this.playing.delete(msg.channel.id);
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+3 -3
View File
@@ -30,9 +30,9 @@ module.exports = class HungerGamesCommand extends Command {
async run(msg, { tributes }) {
if (tributes.length < 2) return msg.say(`...${tributes[0]} wins, as they were the only tribute.`);
if (tributes.length > 24) return msg.say('Please do not enter more than 24 tributes.');
if (new Set(tributes).size !== tributes.length) return msg.say('Please do not enter the same tribute twice.');
if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.');
if (tributes.length > 24) return msg.reply('Please do not enter more than 24 tributes.');
if (new Set(tributes).size !== tributes.length) return msg.reply('Please do not enter the same tribute twice.');
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
let sun = true;
+2 -2
View File
@@ -12,7 +12,7 @@ module.exports = class LotteryCommand extends Command {
run(msg) {
const lottery = Math.floor(Math.random() * 100) + 1;
if (lottery === 1) return msg.say('Nice job! 10/10! You deserve some cake!');
return msg.say('Nope, sorry, you lost.');
if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!');
return msg.reply('Nope, sorry, you lost.');
}
};
+2 -2
View File
@@ -49,7 +49,7 @@ module.exports = class QuizCommand extends Command {
encode: 'url3986',
difficulty
});
if (!body.results) return msg.say('Oh no, a question could not be fetched. Try again later!');
if (!body.results) return msg.reply('Oh no, a question could not be fetched. Try again later!');
const answers = body.results[0].incorrect_answers.map(answer => decodeURIComponent(answer.toLowerCase()));
const correct = decodeURIComponent(body.results[0].correct_answer.toLowerCase());
answers.push(correct);
@@ -67,7 +67,7 @@ module.exports = class QuizCommand extends Command {
if (msgs.first().content.toLowerCase() !== correct) return msg.say(`Nope, sorry, it's ${correct}.`);
return msg.say('Nice job! 10/10! You deserve some cake!');
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+3 -3
View File
@@ -22,9 +22,9 @@ module.exports = class TicTacToeCommand extends Command {
}
async run(msg, { opponent }) { // eslint-disable-line complexity
if (opponent.bot) return msg.say('Bots may not be played against.');
if (opponent.id === msg.author.id) return msg.say('You may not play against yourself.');
if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.');
if (opponent.bot) return msg.reply('Bots may not be played against.');
if (opponent.id === msg.author.id) return msg.reply('You may not play against yourself.');
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
await msg.say(`${opponent}, do you accept this challenge?`);
+1 -1
View File
@@ -61,7 +61,7 @@ module.exports = class WhosThatPokemonCommand extends Command {
if (!names.includes(msgs.first().content.toLowerCase())) return msg.say(`Nope, sorry, it's ${displayName}.`);
return msg.say('Nice job! 10/10! You deserve some cake!');
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+8 -6
View File
@@ -18,10 +18,10 @@ module.exports = class WizardConventionCommand extends Command {
}
async run(msg) { // eslint-disable-line complexity
if (this.playing.has(msg.channel.id)) return msg.say('Only one game may be occurring per channel.');
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
await msg.say('You will need at least 2 more players. To join, type `join game`.');
await msg.say('You will need at least 2 more players, at maximum 15. To join, type `join game`.');
const joined = [];
joined.push(msg.author.id);
const filter = res => {
@@ -30,7 +30,10 @@ module.exports = class WizardConventionCommand extends Command {
joined.push(res.author.id);
return true;
};
const verify = await msg.channel.awaitMessages(filter, { time: 30000 });
const verify = await msg.channel.awaitMessages(filter, {
max: 15,
time: 30000
});
if (verify.size < 2) {
this.playing.delete(msg.channel.id);
return msg.say('Failed to start the game...');
@@ -51,7 +54,7 @@ module.exports = class WizardConventionCommand extends Command {
i++;
}
let turn = 1;
while (players.size > 2) {
while (players.size > 2 && players.exists('role', 'dragon')) {
let eaten = null;
let healed = null;
await msg.say(`Night ${turn}, sending DMs...`);
@@ -140,7 +143,6 @@ module.exports = class WizardConventionCommand extends Command {
const expelled = counts.sort((a, b) => b.votes - a.votes).first();
await msg.say(`${expelled.user} will be expelled.`);
players.delete(expelled.id);
if (!players.exists('role', 'dragon')) break;
++turn;
}
this.playing.delete(msg.channel.id);
@@ -149,7 +151,7 @@ module.exports = class WizardConventionCommand extends Command {
return msg.say(`Oh no, the dragon wasn't caught in time... Nice job, ${dragon.user}!`);
} catch (err) {
this.playing.delete(msg.channel.id);
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+2 -3
View File
@@ -37,15 +37,14 @@ module.exports = class BeLikeBillCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.font = '23px Noto';
const text = stripIndents`
ctx.fillText(stripIndents`
This is ${name}.
${texts[Math.floor(Math.random() * texts.length)].replace(/{{name}}/gi, name)}
${name} is smart.
Be like ${name}.
`;
ctx.fillText(text, 31, 80);
`, 31, 80);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'be-like-bill.png' }] });
}
};
+1 -1
View File
@@ -47,7 +47,7 @@ module.exports = class MemeCommand extends Command {
const { body } = await snekfetch.get(search.body[0].template.blank.replace(/\/_/, `/${top}/${bottom}`));
return msg.say({ files: [{ attachment: body, name: 'meme.jpg' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports = class RobohashCommand extends Command {
const { body } = await snekfetch.get(`https://robohash.org/${text}`);
return msg.say({ files: [{ attachment: body, name: 'robohash.png' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+5 -5
View File
@@ -33,11 +33,11 @@ module.exports = class BanCommand extends Command {
}
async run(msg, { member, reason }) {
if (member.id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...');
if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?');
if (member.id === msg.author.id) return msg.reply('I don\'t think you want to ban yourself...');
if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
if (!member.bannable) return msg.reply('This member is not bannable. Perhaps they have a higher role than me?');
if (member.highestRole.position > msg.member.highestRole.position - 1) {
return msg.say('Your roles are too low to ban this member.');
return msg.reply('Your roles are too low to ban this member.');
}
await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`);
const verification = await verify(msg.channel, msg.author);
@@ -56,7 +56,7 @@ module.exports = class BanCommand extends Command {
reason: `${msg.author.tag}: ${reason}`
});
} catch (err) {
return msg.say(`Failed to ban ${member.user.tag}: \`${err.message}\`.`);
return msg.reply(`Failed to ban ${member.user.tag}: \`${err.message}\`.`);
}
return msg.say(`Successfully banned ${member.user.tag}.`);
}
+1 -1
View File
@@ -19,7 +19,7 @@ module.exports = class ClearChannelCommand extends Command {
}
async run(msg) {
if (!msg.channel.deletable) return msg.say('This channel cannot be deleted.');
if (!msg.channel.deletable) return msg.reply('This channel cannot be deleted.');
const channel = await msg.channel.clone();
if (msg.channel.parent) await channel.setParent(msg.channel.parent);
await msg.channel.delete();
+4 -4
View File
@@ -32,13 +32,13 @@ module.exports = class HackbanCommand extends Command {
}
async run(msg, { id, reason }) {
if (id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...');
if (id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
if (id === msg.author.id) return msg.reply('I don\'t think you want to ban yourself...');
if (id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
let user;
try {
user = await this.client.users.fetch(id);
} catch (err) {
return msg.say('Could not resolve user.');
return msg.reply('Could not resolve user.');
}
await msg.say(`Are you sure you want to hackban ${user.tag} (${user.id})?`);
const verification = await verify(msg.channel, msg.author);
@@ -49,7 +49,7 @@ module.exports = class HackbanCommand extends Command {
reason: `${msg.author.tag}: ${reason}`
});
} catch (err) {
return msg.say(`Failed to hackban ${user.tag}: \`${err.message}\`.`);
return msg.reply(`Failed to hackban ${user.tag}: \`${err.message}\`.`);
}
return msg.say(`Successfully hackbanned ${user.tag}.`);
}
+5 -5
View File
@@ -33,11 +33,11 @@ module.exports = class KickCommand extends Command {
}
async run(msg, { member, reason }) {
if (member.id === msg.author.id) return msg.say('I don\'t think you want to kick yourself...');
if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?');
if (member.id === msg.author.id) return msg.reply('I don\'t think you want to kick yourself...');
if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
if (!member.kickable) return msg.reply('This member is not kickable. Perhaps they have a higher role than me?');
if (member.highestRole.position > msg.member.highestRole.position - 1) {
return msg.say('Your roles are too low to kick this member.');
return msg.reply('Your roles are too low to kick this member.');
}
await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`);
const verification = await verify(msg.channel, msg.author);
@@ -53,7 +53,7 @@ module.exports = class KickCommand extends Command {
try {
await member.kick(`${msg.author.tag}: ${reason}`);
} catch (err) {
return msg.say(`Failed to kick ${member.user.tag}: \`${err.message}\`.`);
return msg.reply(`Failed to kick ${member.user.tag}: \`${err.message}\`.`);
}
return msg.say(`Successfully kicked ${member.user.tag}.`);
}
+2 -2
View File
@@ -34,10 +34,10 @@ module.exports = class PruneCommand extends Command {
try {
const messages = await msg.channel.messages.fetch({ limit: count + 1 });
const msgs = await msg.channel.bulkDelete(messages, true);
if (!msgs.size) return msg.say('There are no messages younger than two weeks that can be deleted.');
if (!msgs.size) return msg.reply('There are no messages younger than two weeks that can be deleted.');
return null;
} catch (err) {
return msg.say('There are no messages younger than two weeks that can be deleted.');
return msg.reply('There are no messages younger than two weeks that can be deleted.');
}
}
};
+5 -5
View File
@@ -33,11 +33,11 @@ module.exports = class SoftbanCommand extends Command {
}
async run(msg, { member, reason }) {
if (member.id === msg.author.id) return msg.say('I don\'t think you want to softban yourself...');
if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
if (!member.bannable) return msg.say('This member is not softbannable. Perhaps they have a higher role than me?');
if (member.id === msg.author.id) return msg.reply('I don\'t think you want to softban yourself...');
if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
if (!member.bannable) return msg.reply('This member is not softbannable. Perhaps they have a higher role than me?');
if (member.highestRole.position > msg.member.highestRole.position - 1) {
return msg.say('Your roles are too low to softban this member.');
return msg.reply('Your roles are too low to softban this member.');
}
await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`);
const verification = await verify(msg.channel, msg.author);
@@ -57,7 +57,7 @@ module.exports = class SoftbanCommand extends Command {
});
await msg.guild.unban(member.user, 'Softban');
} catch (err) {
return msg.say(`Failed to softban ${member.user.tag}: \`${err.message}\`.`);
return msg.reply(`Failed to softban ${member.user.tag}: \`${err.message}\`.`);
}
return msg.say(`Successfully softbanned ${member.user.tag}.`);
}
+2 -2
View File
@@ -33,7 +33,7 @@ module.exports = class UnbanCommand extends Command {
async run(msg, { id, reason }) {
const bans = await msg.guild.fetchBans();
if (!bans.has(id)) return msg.say('This ID is not in the server banlist.');
if (!bans.has(id)) return msg.reply('This ID is not in the server banlist.');
const member = bans.get(id).user;
await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`);
const verification = await verify(msg.channel, msg.author);
@@ -41,7 +41,7 @@ module.exports = class UnbanCommand extends Command {
try {
await msg.guild.unban(member, `${msg.author.tag}: ${reason}`);
} catch (err) {
return msg.say(`Failed to unban ${member.tag}: \`${err.message}\`.`);
return msg.reply(`Failed to unban ${member.tag}: \`${err.message}\`.`);
}
return msg.say(`Successfully unbanned ${member.tag}.`);
}
+1 -1
View File
@@ -53,7 +53,7 @@ module.exports = class CurrencyCommand extends Command {
});
return msg.say(`${amount} ${base} is ${amount * body.rates[target]} ${target}.`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
@@ -22,7 +22,7 @@ module.exports = class AstronomyPictureOfTheDayCommand extends Command {
.query({ api_key: GOV_KEY });
return msg.say(shorten(body.explanation), { files: [body.url] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+3 -4
View File
@@ -23,9 +23,8 @@ module.exports = class AvatarCommand extends Command {
async run(msg, { user }) {
if (!user) user = msg.author;
if (!user.avatar) return msg.say('This user has no avatar.');
const format = user.avatar.startsWith('a_') ? 'gif' : 'png';
const avatarURL = user.avatarURL({
const format = user.avatar && user.avatar.startsWith('a_') ? 'gif' : 'png';
const avatarURL = user.displayAvatarURL({
format,
size: 512
});
@@ -33,7 +32,7 @@ module.exports = class AvatarCommand extends Command {
const { body } = await snekfetch.get(avatarURL);
return msg.say({ files: [{ attachment: body, name: `avatar.${format}` }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+7 -8
View File
@@ -21,13 +21,12 @@ module.exports = class CoolnessCommand extends Command {
run(msg, { user }) {
if (!user) user = msg.author;
const coolness = user.id / this.client.user.id;
const prefix = user.id === msg.author.id ? 'You\'re' : 'They\'re';
if (user.id === '234318196893548545') return msg.reply(`${prefix} the best person ever ❤.`);
if (coolness < 0.3) return msg.reply(`${prefix} the coolest being to walk this Earth.`);
if (coolness < 0.5) return msg.reply(`${prefix} an extremely cool dude.`);
if (coolness < 0.8) return msg.reply(`${prefix} pretty sweet, not gonna lie.`);
if (coolness < 1) return msg.reply(`${prefix} okay, nothing special.`);
if (coolness < 1.3) return msg.reply(`${prefix} just not all that neat.`);
return msg.reply(`${prefix} awful, honestly.`);
if (user.id === '234318196893548545') return msg.say(`${user.username} is the best person ever ❤.`);
if (coolness < 0.3) return msg.say(`${user.username} is the coolest being to walk this Earth.`);
if (coolness < 0.5) return msg.say(`${user.username} is an extremely cool dude.`);
if (coolness < 0.8) return msg.say(`${user.username} is pretty sweet, not gonna lie.`);
if (coolness < 1) return msg.say(`${user.username} is okay, nothing special.`);
if (coolness < 1.3) return msg.say(`${user.username} is just not all that neat.`);
return msg.say(`${user.username} is awful, honestly.`);
}
};
+3 -2
View File
@@ -23,12 +23,13 @@ module.exports = class DaysUntilCommand extends Command {
run(msg, { date }) {
const month = parseInt(date[0], 10);
const day = parseInt(date[1], 10);
if (!month || !day) return msg.say('There are N/A days until Invalid Date!');
if (!month || !day) return msg.reply('Invalid date.');
const now = new Date();
let year = now.getMonth() + 1 <= month ? now.getFullYear() : now.getFullYear() + 1;
if (month === now.getMonth() + 1 && now.getDate() >= day) ++year;
const future = new Date(`${month}/${day}/${year}`);
const time = Math.round((future - now) / (1000 * 60 * 60 * 24)) + 1;
return msg.say(`There are ${time || 'N/A'} days until ${future.toDateString()}!`);
if (!time) return msg.reply('Invalid date.');
return msg.say(`There are ${time} days until ${future.toDateString()}!`);
}
};
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class GenderGuessCommand extends Command {
const gender = body.male > body.female ? 'male' : 'female';
return msg.say(`I'm ${body[gender]}% sure ${body.name} is a ${gender} name.`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class GoogleAutofillCommand extends Command {
if (!data.length) return msg.say('Could not find any results.');
return msg.say(data.join('\n'));
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class GoogleDoodleCommand extends Command {
const data = body[latest ? 0 : Math.floor(Math.random() * body.length)];
return msg.say(data.share_text, { files: [`https:${data.url}`] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -46,7 +46,7 @@ module.exports = class HoroscopeCommand extends Command {
body.date, true);
return msg.embed(embed);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class ShortenURLCommand extends Command {
.send({ longUrl: url });
return msg.say(`<${body.id}>`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+4 -4
View File
@@ -36,12 +36,12 @@ module.exports = class SoundboardCommand extends Command {
async run(msg, { sound }) {
if (!sound) sound = sounds[Math.floor(Math.random() * sounds.length)];
const channel = msg.member.voiceChannel;
if (!channel) return msg.say('Please enter a voice channel first.');
if (!channel) return msg.reply('Please enter a voice channel first.');
if (!channel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK'])) {
return msg.say('Missing the "Connect" or "Speak" permission for the voice channel.');
return msg.reply('Missing the "Connect" or "Speak" permission for the voice channel.');
}
if (!channel.joinable) return msg.say('Your voice channel is not joinable.');
if (this.client.voiceConnections.has(channel.guild.id)) return msg.say('I am already playing a sound.');
if (!channel.joinable) return msg.reply('Your voice channel is not joinable.');
if (this.client.voiceConnections.has(channel.guild.id)) return msg.reply('I am already playing a sound.');
try {
const connection = await channel.join();
const dispatcher = connection.playFile(path.join(__dirname, '..', '..', 'assets', 'sounds', `${sound}.mp3`));
+1 -1
View File
@@ -29,7 +29,7 @@ module.exports = class SpoopyLinkCommand extends Command {
${body.chain.map(url => `<${url.url}> ${url.safe ? '✅' : `❌ (${url.reasons.join(', ')})`}`).join('\n')}
`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+3 -3
View File
@@ -35,8 +35,8 @@ module.exports = class StrawpollCommand extends Command {
}
async run(msg, { title, options }) {
if (options.length < 2) return msg.say('Please provide more than one choice.');
if (options.length > 31) return msg.say('Please provide thirty or less choices.');
if (options.length < 2) return msg.reply('Please provide more than one choice.');
if (options.length > 31) return msg.reply('Please provide thirty or less choices.');
try {
const { body } = await snekfetch
.post('https://www.strawpoll.me/api/v2/polls')
@@ -47,7 +47,7 @@ module.exports = class StrawpollCommand extends Command {
http://www.strawpoll.me/${body.id}
`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+2 -2
View File
@@ -21,10 +21,10 @@ module.exports = class WordOfTheDayCommand extends Command {
.query({ api_key: WORDNIK_KEY });
return msg.say(stripIndents`
**${body.word}**
(${body.definitions[0].partOfSpeech || 'N/A'}) ${body.definitions[0].text}
(${body.definitions[0].partOfSpeech || '???'}) ${body.definitions[0].text}
`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -57,7 +57,7 @@ module.exports = class XKCDCommand extends Command {
.setFooter(body.alt);
return msg.embed(embed);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -18,7 +18,7 @@ module.exports = class CatCommand extends Command {
const { body } = await snekfetch.get('http://random.cat/meow');
return msg.say({ files: [body.file] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -30,7 +30,7 @@ module.exports = class ChuckNorrisCommand extends Command {
});
return msg.say(body.value.joke);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -18,7 +18,7 @@ module.exports = class DogCommand extends Command {
const { body } = await snekfetch.get('https://dog.ceo/api/breeds/image/random');
return msg.say({ files: [body.message] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+3 -4
View File
@@ -36,10 +36,9 @@ module.exports = class GuessMyLooksCommand extends Command {
const inches = Math.floor(Math.random() * 12);
const weight = Math.floor(Math.random() * (300 - 50 + 1)) + 50;
const extra = extras[Math.floor(Math.random() * extras.length)];
const prefix = user.id === msg.author.id ? 'You' : 'They';
return msg.reply(oneLine`
${prefix} are, I think, a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor} hair.
${prefix} are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}!
return msg.say(oneLine`
I think ${user.username} is a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor}
hair. They are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}!
`);
}
};
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class HistoryCommand extends Command {
return msg.embed(embed);
} catch (err) {
if (err.status === 404 || err.status === 500) return msg.say('Could not find any results.');
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class NameCommand extends Command {
});
return msg.say(body[0]);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = class NumberFactCommand extends Command {
return msg.say(text);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -1,5 +1,5 @@
const { Command } = require('discord.js-commando');
const sides = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null'];
const sides = ['on NaN', 'on 0', 'in the air', 'on null', 'on undefined', 'on \'\''];
module.exports = class QuantumCoinCommand extends Command {
constructor(client) {
+1 -1
View File
@@ -16,7 +16,7 @@ module.exports = class QuoteCommand extends Command {
const { body } = await snekfetch.get('https://talaikis.com/api/quotes/random/');
return msg.say(`${body.quote} - _${body.author}_`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -21,7 +21,7 @@ module.exports = class ShowerThoughtCommand extends Command {
if (!allowed.length) return msg.say('Hmm... It seems the thoughts are all gone right now. Try again later!');
return msg.say(allowed[Math.floor(Math.random() * allowed.length)].data.title);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class BreakUpCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *breaks up with* **${user.username}**
_**${msg.author.username}** breaks up with **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class CuddleCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *cuddles* **${user.username}**
_**${msg.author.username}** cuddles with **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class EatCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *eats* **${user.username}**
_**${msg.author.username}** eats **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class EvolveCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${user.username}** *is evolving!*
_**${user.username}** is evolving!_
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class FalconPunchCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *falcon punches* **${user.username}**
_**${msg.author.username}** falcon punches **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class FistBumpCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *fist-bumps* **${user.username}**
_**${msg.author.username}** fist-bumps **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class HighFiveCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *high-fives* **${user.username}**
_**${msg.author.username}** high-fives **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -20,7 +20,7 @@ module.exports = class HitWithShovelCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *hits* **${user.username}** *with a shovel*
_**${msg.author.username}** hits **${user.username}** with a shovel._
https://i.imgur.com/XDIUq02.gif
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class HugCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *hugs* **${user.username}**
_**${msg.author.username}** hugs **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class InhaleCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *inhales* **${user.username}** *but gained no ability...*
_**${msg.author.username}** inhales **${user.username}** but gained no ability..._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -20,7 +20,7 @@ module.exports = class KillCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *kills* **${user.username}**
_**${msg.author.username}** kills **${user.username}**._
https://i.imgur.com/KqWkaTf.gif
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class KissCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *kisses* **${user.username}**
_**${msg.author.username}** kisses **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -26,7 +26,7 @@ module.exports = class MarryCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *marries* **${user.username}**
_**${msg.author.username}** marries **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class PatCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *pats* **${user.username}**
_**${msg.author.username}** pats **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class PokeCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *pokes* **${user.username}**
_**${msg.author.username}** pokes **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class PunchCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *punches* **${user.username}**
_**${msg.author.username}** punches **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -27,7 +27,7 @@ module.exports = class SlapCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *slaps* **${user.username}**
_**${msg.author.username}** slaps **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class TackleCommand extends Command {
run(msg, { user }) {
return msg.say(stripIndents`
**${msg.author.username}** *tackles* **${user.username}**
_**${msg.author.username}** tackles **${user.username}**._
${gifs[Math.floor(Math.random() * gifs.length)]}
`);
}
+4 -4
View File
@@ -40,14 +40,14 @@ module.exports = class AnimeCommand extends Command {
.addField(' Type',
`${data.showType} - ${data.status}`, true)
.addField(' Episodes',
data.episodeCount || 'N/A', true)
data.episodeCount || '???', true)
.addField(' Start Date',
data.startDate ? new Date(data.startDate).toDateString() : 'N/A', true)
data.startDate ? new Date(data.startDate).toDateString() : '???', true)
.addField(' End Date',
data.endDate ? new Date(data.endDate).toDateString() : 'N/A', true);
data.endDate ? new Date(data.endDate).toDateString() : '???', true);
return msg.embed(embed);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class BotInfoCommand extends Command {
return msg.embed(embed);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -48,7 +48,7 @@ module.exports = class BulbapediaCommand extends Command {
.setDescription(shorten(data.extract.replace(/\n/g, '\n\n')));
return msg.embed(embed);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+2 -2
View File
@@ -24,7 +24,7 @@ module.exports = class DanbooruCommand extends Command {
}
async run(msg, { query }) {
if (!msg.channel.nsfw) return msg.say('This command can only be used in NSFW channels.');
if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.');
try {
const { body } = await snekfetch
.get('https://danbooru.donmai.us/posts.json')
@@ -35,7 +35,7 @@ module.exports = class DanbooruCommand extends Command {
if (!body.length || !body[0].file_url) return msg.say('Could not find any results.');
return msg.say(`https://danbooru.donmai.us${body[0].file_url}`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class DerpibooruCommand extends Command {
const { body } = await snekfetch.get(`https://derpibooru.org/images/${search.body.id}.json`);
return msg.say(`https:${body.representations.medium}`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+2 -2
View File
@@ -35,10 +35,10 @@ module.exports = class DictionaryCommand extends Command {
const data = body[0];
return msg.say(stripIndents`
**${data.word}**
(${data.partOfSpeech || 'N/A'}) ${data.text}
(${data.partOfSpeech || '???'}) ${data.text}
`);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+2 -2
View File
@@ -21,7 +21,7 @@ module.exports = class GelbooruCommand extends Command {
}
async run(msg, { query }) {
if (!msg.channel.nsfw) return msg.say('This command can only be used in NSFW channels.');
if (!msg.channel.nsfw) return msg.reply('This command can only be used in NSFW channels.');
try {
const { text } = await snekfetch
.get('https://gelbooru.com/index.php')
@@ -35,7 +35,7 @@ module.exports = class GelbooruCommand extends Command {
if (!parsed.post || !parsed.post.length) return msg.say('Could not find any results.');
return msg.say(parsed.post[Math.floor(Math.random() * parsed.post.length)]._attributes.file_url);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -32,7 +32,7 @@ module.exports = class GiphyCommand extends Command {
if (!body.data.length) return msg.say('Could not find any results.');
return msg.say(body.data[Math.floor(Math.random() * body.data.length)].images.original.url);
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+2 -2
View File
@@ -47,7 +47,7 @@ module.exports = class GitHubCommand extends Command {
.addField(' Issues',
body.open_issues, true)
.addField(' Language',
body.language || 'N/A', true)
body.language || '???', true)
.addField(' Created',
new Date(body.created_at).toDateString(), true)
.addField(' Modified',
@@ -55,7 +55,7 @@ module.exports = class GitHubCommand extends Command {
return msg.embed(embed);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};

Some files were not shown because too many files have changed in this diff Show More