mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Remove all useless async
This commit is contained in:
@@ -68,6 +68,6 @@ module.exports = class InfoCommand extends commando.Command {
|
||||
"[Click Here to Join!](https://discord.gg/fqQF8mc)")
|
||||
.addField('Invite Link:',
|
||||
"[Click Here to Add Me to Your Server!](https://discordapp.com/oauth2/authorize?client_id=278305350804045834&scope=bot&permissions=1345846343)");
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,11 +11,11 @@ module.exports = class InviteCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.send("Add me to your server with this link:\nhttps://discordapp.com/oauth2/authorize?client_id=278305350804045834&scope=bot&permissions=1345846343\nOr, come to my server with this link:\nhttps://discord.gg/fqQF8mc");
|
||||
return message.channel.send("Add me to your server with this link:\nhttps://discordapp.com/oauth2/authorize?client_id=278305350804045834&scope=bot&permissions=1345846343\nOr, come to my server with this link:\nhttps://discord.gg/fqQF8mc");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,11 +13,11 @@ module.exports = class UptimeCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.send(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}** in **${this.client.guilds.size} Servers.**`);
|
||||
return message.channel.send(`I've been active on this shard for: **${moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]')}** in **${this.client.guilds.size} Servers.**`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,16 +16,16 @@ module.exports = class EmojiCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (message.channel.type !== 'dm') {
|
||||
message.channel.send(message.guild.emojis.map(e => e).join(" "));
|
||||
return message.channel.send(message.guild.emojis.map(e => e).join(" "));
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This command does not work in DM!");
|
||||
return message.channel.send(":x: Error! This command does not work in DM!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = class GuildInfoCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
@@ -40,10 +40,10 @@ module.exports = class GuildInfoCommand extends commando.Command {
|
||||
`${message.guild.owner.user.username}#${message.guild.owner.user.discriminator}`, true)
|
||||
.addField("**Users:**",
|
||||
message.guild.memberCount, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This command does not work in DM!");
|
||||
return message.channel.send(":x: Error! This command does not work in DM!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+10
-12
@@ -112,14 +112,14 @@ module.exports = class MemeCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let [type] = message.content.toLowerCase().split(" ").slice(1);
|
||||
if (type === "list") {
|
||||
message.channel.send("**Type Codes:** tenguy, afraid, older, aag, tried, biw, blb, kermit, bd, ch, cbg, wonka, cb, keanu, dsm, live, ants, doge, alwaysonbeat, ermg, facepalm, fwp, fa, fbf, fry, hipster, icanhas, crazypills, mw, noidea, regret, boat, hagrid, sohappy, captain, inigo, iw, ackbar, happening, joker, ive, ll, morpheus, mb, badchoice, mmm, jetpack, red, mordor, oprah, oag, remembers, philosoraptor, jw, patrick, rollsafe, sad-obama, sad-clinton, sadfrog, sad-bush, sad-biden, sad-boehner, saltbae, sarcasticbear, dwight, sb, ss, sf, dodgson, money, sohot, nice, awesome-awkward, awesome, awkward-awesome, awkward, fetch, success, scc, ski, officespace, interesting, toohigh, bs, center, both, winter, xy, buzz, yodawg, uno, yallgot, bad, elf, chosen");
|
||||
return message.channel.send("**Type Codes:** tenguy, afraid, older, aag, tried, biw, blb, kermit, bd, ch, cbg, wonka, cb, keanu, dsm, live, ants, doge, alwaysonbeat, ermg, facepalm, fwp, fa, fbf, fry, hipster, icanhas, crazypills, mw, noidea, regret, boat, hagrid, sohappy, captain, inigo, iw, ackbar, happening, joker, ive, ll, morpheus, mb, badchoice, mmm, jetpack, red, mordor, oprah, oag, remembers, philosoraptor, jw, patrick, rollsafe, sad-obama, sad-clinton, sadfrog, sad-bush, sad-biden, sad-boehner, saltbae, sarcasticbear, dwight, sb, ss, sf, dodgson, money, sohot, nice, awesome-awkward, awesome, awkward-awesome, awkward, fetch, success, scc, ski, officespace, interesting, toohigh, bs, center, both, winter, xy, buzz, yodawg, uno, yallgot, bad, elf, chosen");
|
||||
}
|
||||
else if (message.content.includes(" | ")) {
|
||||
if (message.content.split(" ").slice(1).join(" ").match(/^[a-zA-Z0-9|.,!?'-\s]+$/)) {
|
||||
@@ -128,31 +128,29 @@ module.exports = class MemeCommand extends commando.Command {
|
||||
let bottomrow = memeQuery[1].split("?").join("~q");
|
||||
let link = `https://memegen.link/${type}/${toprow}/${bottomrow}.jpg`;
|
||||
if (bottomrow.length > 100) {
|
||||
message.channel.send(":x: Error! Bottom text is over 100 characters!");
|
||||
return message.channel.send(":x: Error! Bottom text is over 100 characters!");
|
||||
}
|
||||
else if (toprow.length > 100) {
|
||||
message.channel.send(":x: Error! Top text is over 100 characters!");
|
||||
return message.channel.send(":x: Error! Top text is over 100 characters!");
|
||||
}
|
||||
else {
|
||||
if (memecodes[type]) {
|
||||
try {
|
||||
message.channel.sendFile(link);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.sendFile(link).catch(err => {
|
||||
console.log(err);
|
||||
message.channel.send(":x: An Error Occurred! Please try again later!");
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Meme type not found! Use `;meme list` to view of list of meme codes!");
|
||||
return message.channel.send(":x: Error! Meme type not found! Use `;meme list` to view of list of meme codes!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Only letters, numbers, periods, commas, apostrophes, exclamation points, and question marks are allowed!");
|
||||
return message.channel.send(":x: Error! Only letters, numbers, periods, commas, apostrophes, exclamation points, and question marks are allowed!");
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
return message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = class BanCommand extends commando.Command {
|
||||
return msg.member.hasPermission('BAN_MEMBERS');
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS', 'BAN_MEMBERS'])) return;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ module.exports = class BanCommand extends commando.Command {
|
||||
let userToBan = message.mentions.users.first();
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.send(":x: Error! Please mention one user!");
|
||||
return message.channel.send(":x: Error! Please mention one user!");
|
||||
}
|
||||
else {
|
||||
if (message.guild.member(userToBan).bannable) {
|
||||
@@ -41,19 +41,19 @@ module.exports = class BanCommand extends commando.Command {
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${userToBan.username}#${userToBan.discriminator} (${userToBan.id})\n**Action:** Ban\n**Reason:** ${reason}`);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
message.channel.send(":notepad_spiral: **Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
return message.channel.send(":notepad_spiral: **Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This member cannot be banned! Perhaps they have a higher role than me?");
|
||||
return message.channel.send(":x: Error! This member cannot be banned! Perhaps they have a higher role than me?");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This command does not work in DM!");
|
||||
return message.channel.send(":x: Error! This command does not work in DM!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class KickCommand extends commando.Command {
|
||||
return msg.member.hasPermission('KICK_MEMBERS');
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS', 'KICK_MEMBERS'])) return;
|
||||
}
|
||||
@@ -25,7 +25,7 @@ module.exports = class KickCommand extends commando.Command {
|
||||
let userToKick = message.mentions.users.first();
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.send(":x: Error! Please mention one user!");
|
||||
return message.channel.send(":x: Error! Please mention one user!");
|
||||
}
|
||||
else {
|
||||
if (message.guild.member(userToKick).kickable) {
|
||||
@@ -38,19 +38,19 @@ module.exports = class KickCommand extends commando.Command {
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${userToKick.username}#${userToKick.discriminator} (${userToKick.id})\n**Action:** Kick\n**Reason:** ${reason}`);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
message.channel.send(":notepad_spiral: **Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
return message.channel.send(":notepad_spiral: **Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This member cannot be kicked! Perhaps they have a higher role than me?");
|
||||
return message.channel.send(":x: Error! This member cannot be kicked! Perhaps they have a higher role than me?");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This command does not work in DM!");
|
||||
return message.channel.send(":x: Error! This command does not work in DM!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class WarnCommand extends commando.Command {
|
||||
return msg.member.hasPermission('MANAGE_MESSAGES');
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
@@ -25,7 +25,7 @@ module.exports = class WarnCommand extends commando.Command {
|
||||
let userToWarn = message.mentions.users.first();
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.send(":x: Error! Please mention one user!");
|
||||
return message.channel.send(":x: Error! Please mention one user!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(":ok_hand:");
|
||||
@@ -36,15 +36,15 @@ module.exports = class WarnCommand extends commando.Command {
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription(`**Member:** ${userToWarn.username}#${userToWarn.discriminator} (${userToWarn.id})\n**Action:** Warn\n**Reason:** ${reason}`);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
return message.guild.channels.find('name', 'mod_logs').sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
message.channel.send("**Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
return message.channel.send("**Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This command does not work in DM!");
|
||||
return message.channel.send(":x: Error! This command does not work in DM!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = class MathCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -26,15 +26,13 @@ module.exports = class MathCommand extends commando.Command {
|
||||
let expression = message.content.split(" ").slice(1).join(" ");
|
||||
try {
|
||||
let solved = math.eval(expression);
|
||||
try {
|
||||
message.channel.send(solved);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(solved).catch(err => {
|
||||
console.log(err);
|
||||
message.channel.send(":x: Error! Invalid statement!");
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Invalid statement!");
|
||||
return message.channel.send(":x: Error! Invalid statement!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = class RomanCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -20,10 +20,10 @@ module.exports = class RomanCommand extends commando.Command {
|
||||
let numberToRoman = message.content.split(" ").slice(1).join(" ");
|
||||
let romanInterger = Number(numberToRoman);
|
||||
if (romanInterger > 1000000) {
|
||||
message.channel.send(':x: Error! Number is too high!');
|
||||
return message.channel.send(':x: Error! Number is too high!');
|
||||
}
|
||||
else {
|
||||
message.channel.send(romanNumeralConverter.getRomanFromInteger(romanInterger)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
return message.channel.send(romanNumeralConverter.getRomanFromInteger(romanInterger)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,11 +11,11 @@ module.exports = class CanYouNot extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.send('Can YOU not?');
|
||||
return message.channel.send('Can YOU not?');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,11 +15,11 @@ module.exports = class GiveFlowerCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.send('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
return message.channel.send('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,11 +11,11 @@ module.exports = class LennyCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.send('( ͡° ͜ʖ ͡°)');
|
||||
return message.channel.send('( ͡° ͜ʖ ͡°)');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,17 +11,17 @@ module.exports = class LotteryCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let lotteryNumber = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
if (lotteryNumber === "Winner") {
|
||||
message.channel.send(`Wow ${message.author.username}! You actually won! Great job!`);
|
||||
return message.channel.send(`Wow ${message.author.username}! You actually won! Great job!`);
|
||||
}
|
||||
else {
|
||||
message.channel.send(`Nope, sorry ${message.author.username}, you lost.`);
|
||||
return message.channel.send(`Nope, sorry ${message.author.username}, you lost.`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ module.exports = class MathGameCommand extends commando.Command {
|
||||
let randomExpression = randomValue1 + randomType + randomValue2;
|
||||
let solved = math.eval(randomExpression);
|
||||
if (!randomValue) {
|
||||
message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
return message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -54,10 +54,10 @@ module.exports = class MathGameCommand extends commando.Command {
|
||||
time: 10000,
|
||||
errors: ['time'],
|
||||
});
|
||||
message.channel.send(`Good Job! You won! ${solved} is the correct answer!`);
|
||||
return message.channel.send(`Good Job! You won! ${solved} is the correct answer!`);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||
return message.channel.send(`Aw... Too bad, try again next time!\nThe correct answer is: ${solved}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ module.exports = class NitroCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
@@ -23,6 +23,6 @@ module.exports = class NitroCommand extends commando.Command {
|
||||
.setColor(0x748BD9)
|
||||
.setURL("https://discordapp.com/nitro")
|
||||
.setDescription("This Message can only be viewed by members with Discord Nitro.\n\n\n[More Information](https://discordapp.com/nitro)");
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,14 +37,14 @@ module.exports = class QuizCommand extends commando.Command {
|
||||
time: 15000,
|
||||
errors: ['time']
|
||||
});
|
||||
message.channel.send(`Good Job! You won! ${response.body[0].answer} is the correct answer!`);
|
||||
return message.channel.send(`Good Job! You won! ${response.body[0].answer} is the correct answer!`);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${response.body[0].answer}`);
|
||||
return message.channel.send(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${response.body[0].answer}`);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,11 +11,11 @@ module.exports = class SlowClapCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.send('*slow clap*');
|
||||
return message.channel.send('*slow clap*');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,29 +23,29 @@ module.exports = class SoundBoardCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['CONNECT', 'SPEAK', 'ADD_REACTIONS'])) {
|
||||
message.channel.send(':x: Error! In order to do this command, you must give me the permissions to "Connect" and "Speak", as well as the permission to Add Reactions!');
|
||||
return message.channel.send(':x: Error! In order to do this command, you must give me the permissions to "Connect" and "Speak", as well as the permission to Add Reactions!');
|
||||
}
|
||||
else {
|
||||
let voiceChannel = message.member.voiceChannel;
|
||||
if (!voiceChannel) {
|
||||
message.channel.send(`:x: Error! Please be in a voice channel first!`);
|
||||
return message.channel.send(`:x: Error! Please be in a voice channel first!`);
|
||||
}
|
||||
else {
|
||||
let soundToPlay = message.content.toLowerCase().split(" ").slice(1).join(" ");
|
||||
if (!soundToPlay) {
|
||||
message.channel.send(':x: Error! No sound set. Please use ;soundboard list to see a list of sounds you can play.');
|
||||
return message.channel.send(':x: Error! No sound set. Please use ;soundboard list to see a list of sounds you can play.');
|
||||
}
|
||||
else if (soundToPlay === 'list') {
|
||||
message.channel.send("**Available Sounds:** Cat, Pikachu, Vader, Doh, It's a Trap, Mario Death, Pokemon Center, Dun Dun Dun, Spongebob, Ugly Barnacle, Woo Hoo, Space, GLaDOS Bird, Airhorn, Zelda Chest, Eat my Shorts, No This is Patrick, Wumbo");
|
||||
return message.channel.send("**Available Sounds:** Cat, Pikachu, Vader, Doh, It's a Trap, Mario Death, Pokemon Center, Dun Dun Dun, Spongebob, Ugly Barnacle, Woo Hoo, Space, GLaDOS Bird, Airhorn, Zelda Chest, Eat my Shorts, No This is Patrick, Wumbo");
|
||||
}
|
||||
else if (soundToPlay === sounds.avaliable[soundToPlay]) {
|
||||
let alreadyConnected = await this.client.voiceConnections.get(voiceChannel.guild.id);
|
||||
if (alreadyConnected) {
|
||||
if (alreadyConnected.channel.id === voiceChannel.id) {
|
||||
message.channel.send(':x: Error! I am already playing a sound!');
|
||||
return message.channel.send(':x: Error! I am already playing a sound!');
|
||||
}
|
||||
else {
|
||||
message.channel.send(':x: Error! I am already playing a sound!');
|
||||
return message.channel.send(':x: Error! I am already playing a sound!');
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -60,13 +60,13 @@ module.exports = class SoundBoardCommand extends commando.Command {
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(':x: Error! Sound not found! Use `;soundboard list` to see a list of sounds you can play.');
|
||||
return message.channel.send(':x: Error! Sound not found! Use `;soundboard list` to see a list of sounds you can play.');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(':x: This is a DM!');
|
||||
return message.channel.send(':x: This is a DM!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,11 +11,11 @@ module.exports = class SpamCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
message.channel.sendFile("./images/Spam.jpg");
|
||||
return message.channel.sendFile("./images/Spam.jpg");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,11 +37,10 @@ module.exports = class TodayCommand extends commando.Command {
|
||||
.setTitle(`On this day (${responseData.date})...`)
|
||||
.setTimestamp()
|
||||
.setDescription(`${responseData.data.Events[randomNumber].text} (${responseData.data.Events[randomNumber].year})`);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@ module.exports = class TypingGameCommand extends commando.Command {
|
||||
break;
|
||||
}
|
||||
if (!time) {
|
||||
message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
return message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -64,10 +64,10 @@ module.exports = class TypingGameCommand extends commando.Command {
|
||||
time: time,
|
||||
errors: ['time']
|
||||
});
|
||||
message.channel.send(`Good Job! You won!`);
|
||||
return message.channel.send(`Good Job! You won!`);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send('Aw... Too bad, try again next time!');
|
||||
return message.channel.send('Aw... Too bad, try again next time!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class MagicBall extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -22,6 +22,6 @@ module.exports = class MagicBall extends commando.Command {
|
||||
if (!question) {
|
||||
question = "Not Specified.";
|
||||
}
|
||||
message.channel.send(`Question: ${question}\n:8ball: ${answers} :8ball:`);
|
||||
return message.channel.send(`Question: ${question}\n:8ball: ${answers} :8ball:`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,13 +11,13 @@ module.exports = class RandomCat extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let cat = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg", "8.jpg", "9.jpg", "10.jpg", "11.jpeg", "12.jpg", "13.jpeg", "14.png", "15.jpg", "16.jpg", "17.jpg", "18.jpg", "19.jpg", "20.jpg"];
|
||||
cat = cat[Math.floor(Math.random() * cat.length)];
|
||||
message.channel.sendFile(`./images/Cat${cat}`);
|
||||
return message.channel.sendFile(`./images/Cat${cat}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = class ChooseCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -22,10 +22,10 @@ module.exports = class ChooseCommand extends commando.Command {
|
||||
if (message.content.includes(" | ")) {
|
||||
let choices = message.content.split(" ").slice(1).join(" ").split(' | ');
|
||||
choices = choices[Math.floor(Math.random() * choices.length)];
|
||||
message.channel.send(`I choose ${choices}!`);
|
||||
return message.channel.send(`I choose ${choices}!`);
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
return message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,13 +15,13 @@ module.exports = class CoinFlipCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let coin = ['heads', 'tails'];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.send(`It landed on ${coin}!`);
|
||||
return message.channel.send(`It landed on ${coin}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class ComplimentCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -20,10 +20,10 @@ module.exports = class ComplimentCommand extends commando.Command {
|
||||
let compliments = ["Your smile is contagious.", "You look great today.", "You're a smart cookie.", "I bet you make babies smile.", "You have impeccable manners.", "I like your style.", "You have the best laugh.", "I appreciate you.", "You are the most perfect you there is.", "You are enough.", "You're strong.", "Your perspective is refreshing.", "You're an awesome friend.", "You light up the room.", "You shine brighter than a shooting star.", "You deserve a hug right now.", "You should be proud of yourself.", "You're more helpful than you realize.", "You have a great sense of humor.", "You've got all the right moves!", "Is that your picture next to 'charming' in the dictionary?", "Your kindness is a balm to all who encounter it.", "You're all that and a super-size bag of chips.", "On a scale from 1 to 10, you're an 11.", "You are brave.", "You're even more beautiful on the inside than you are on the outside.", "You have the courage of your convictions.", "Your eyes are breathtaking.", "If cartoon bluebirds were real, a bunch of them would be sitting on your shoulders singing right now.", "You are making a difference.", "You're like sunshine on a rainy day.", "You bring out the best in other people.", "Your ability to recall random factoids at just the right time is impressive.", "You're a great listener.", "How is it that you always look great, even in sweatpants?", "Everything would be better if more people were like you!", "I bet you sweat glitter.", "You were cool way before hipsters were cool.", "That color is perfect on you.", "Hanging out with you is always a blast.", "You always know -- and say -- exactly what I need to hear when I need to hear it.", "You smell really good.", "You may dance like no one's watching, but everyone's watching because you're an amazing dancer!", "Being around you makes everything better!", "When you say, 'I meant to do that,' I totally believe you.", "When you're not afraid to be yourself is when you're most incredible.", "Colors seem brighter when you're around.", "You're more fun than a ball pit filled with candy. (And seriously, what could be more fun than that?)", "That thing you don't like about yourself is what makes you so interesting.", "You're wonderful.", "You have cute elbows. For reals!", "Jokes are funnier when you tell them.", "You're better than a triple-scoop ice cream cone. With sprinkles.", "Your bellybutton is kind of adorable.", "Your hair looks stunning.", "You're one of a kind!", "You're inspiring.", "If you were a box of crayons, you'd be the giant name-brand one with the built-in sharpener.", "You should be thanked more often. So thank you!!", "Our community is better because you're in it.", "Someone is getting through something hard right now because you've got their back.", "You have the best ideas.", "You always know how to find that silver lining.", "Everyone gets knocked down sometimes, but you always get back up and keep going.", "You're a candle in the darkness.", "You're a great example to others.", "Being around you is like being on a happy little vacation.", "You always know just what to say.", "You're always learning new things and trying to better yourself, which is awesome.", "If someone based an Internet meme on you, it would have impeccable grammar.", "You could survive a Zombie apocalypse.", "You're more fun than bubble wrap.", "When you make a mistake, you fix it.", "Who raised you? They deserve a medal for a job well done.", "You're great at figuring stuff out.", "Your voice is magnificent.", "The people you love are lucky to have you in their lives.", "You're like a breath of fresh air.", "You're gorgeous -- and that's the least interesting thing about you, too.", "You're so thoughtful.", "Your creative potential seems limitless.", "Your name suits you to a T.", "You're irresistible when you blush.", "Actions speak louder than words, and yours tell an incredible story.", "Somehow you make time stop and fly at the same time.", "When you make up your mind about something, nothing stands in your way.", "You seem to really know who you are.", "Any team would be lucky to have you on it.", "In high school I bet you were voted 'most likely to keep being awesome.'", "I bet you do the crossword puzzle in ink.", "Babies and small animals probably love you.", "If you were a scented candle they'd call it Perfectly Imperfect (and it would smell like summer).", "There's ordinary, and then there's you.", "You're someone's reason to smile.", "You're even better than a unicorn, because you're real.", "How do you keep being so funny and making everyone laugh?", "You have a good head on your shoulders.", "Has anyone ever told you that you have great posture?", "The way you treasure your loved ones is incredible.", "You're really something special.", "You're a gift to those around you.", "You don't deserve it."];
|
||||
compliments = compliments[Math.floor(Math.random() * compliments.length)];
|
||||
if (!thingToCompliment) {
|
||||
message.reply(compliments);
|
||||
return message.reply(compliments);
|
||||
}
|
||||
else {
|
||||
message.channel.send(`${thingToCompliment}, ${compliments}`);
|
||||
return message.channel.send(`${thingToCompliment}, ${compliments}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -15,13 +15,13 @@ module.exports = class FishyCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let fish = [':fish:', ':tropical_fish:', ':blowfish:'];
|
||||
fish = fish[Math.floor(Math.random() * fish.length)];
|
||||
message.channel.send(`You caught a: ${fish}`);
|
||||
return message.channel.send(`You caught a: ${fish}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@ module.exports = class FortuneCookieCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let fortunes = ["Do not seek so much to find the answer as much as to understand the question better.", "You will soon be honored by someone you respect.", "Happiness comes from a good life.", "You are contemplating some action which will bring credit upon you.", "Be prepared for extra energy.", "You are admired for your adventurous ways.", "The love of your life is sitting across from you.", "Beauty is simply beauty. Originality is magical.", "Never quit!", "Today is an ideal time to water your personal garden.", "Questions provide the key to unlocking our unlimited potential.", "Expect great things and great things will come.", "The Greatest War Sometimes Isn't On The Battlefield But Against Oneself.", "Become who you are.", "In case of fire, keep calm, pay bill and run.", "Anyone who dares to be, can never be weak.", "You broke my cookie!", "Dream lofty dreams, and as you dream, so shall you become.", "You've got what it takes, but it will take everything you've got!", "Trust your intuition.", "The wise are aware of their treasure, while fools follow their vanity.", "You will always have good luck in your personal affairs.", "You don't need talent to gain experience.", "All the preparation you've done will finally be paying off!", "Determination is the wake-up call to the human will.", "The most useless energy is trying to change what and who God so carefully created.", "You cannot become rich except by enriching others.", "Your happiness is intertwined with your outlook on life.", "Sing and rejoice, fortune is smiling on you.", "Well-arranged time is the surest sign of a well-arranged mind."];
|
||||
fortunes = fortunes[Math.floor(Math.random() * fortunes.length)];
|
||||
message.channel.send(fortunes);
|
||||
return message.channel.send(fortunes);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,17 +15,17 @@ module.exports = class MotivateCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let userToMotivate = message.content.split(" ").slice(1).join(" ");
|
||||
if (!userToMotivate) {
|
||||
message.reply('https://www.youtube.com/watch?v=ZXsQAXx_ao0');
|
||||
return message.reply('https://www.youtube.com/watch?v=ZXsQAXx_ao0');
|
||||
}
|
||||
else {
|
||||
message.channel.send(`${userToMotivate}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
|
||||
return message.channel.send(`${userToMotivate}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = class RandomNameGen extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -29,13 +29,13 @@ module.exports = class RandomNameGen extends commando.Command {
|
||||
let randomFirstBoth = [randomFirstMale, randomFirstFemale];
|
||||
randomFirstBoth = randomFirstBoth[Math.floor(Math.random() * randomFirstBoth.length)];
|
||||
if (message.content.toLowerCase().split(" ").slice(1).includes("male")) {
|
||||
message.channel.send(`${randomFirstMale} ${randomLast}`);
|
||||
return message.channel.send(`${randomFirstMale} ${randomLast}`);
|
||||
}
|
||||
else if (message.content.toLowerCase().split(" ").slice(1).includes("female")) {
|
||||
message.channel.send(`${randomFirstFemale} ${randomLast}`);
|
||||
return message.channel.send(`${randomFirstFemale} ${randomLast}`);
|
||||
}
|
||||
else {
|
||||
message.channel.send(`${randomFirstBoth} ${randomLast}`);
|
||||
return message.channel.send(`${randomFirstBoth} ${randomLast}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,13 +15,13 @@ module.exports = class OffspringCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let gender = ['boy', 'girl'];
|
||||
gender = gender[Math.floor(Math.random() * gender.length)];
|
||||
message.channel.send(`It's a ${gender}!`);
|
||||
return message.channel.send(`It's a ${gender}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,13 +11,13 @@ module.exports = class PotatoCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let potato = ["1.jpg", "2.jpg", "3.jpg", "4.jpg", "5.gif", "6.png", "7.jpg", "8.jpg", "9.jpg"];
|
||||
potato = potato[Math.floor(Math.random() * potato.length)];
|
||||
message.channel.sendFile(`./images/Potato${potato}`);
|
||||
return message.channel.sendFile(`./images/Potato${potato}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,13 +11,13 @@ module.exports = class RandomPun extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let pun = ["Pun1.jpg", "Pun2.jpg", "Pun3.jpg", "Pun4.jpg", "Pun5.jpg", "Pun6.jpg", "Pun7.jpg", "Pun8.png", "Pun9.jpg", "Pun10.jpg", "Pun11.jpg", "Pun12.jpg", "Pun13.jpg", "Pun14.jpg", "Pun15.jpg", "Pun16.jpg", "Pun17.jpg", "Pun18.jpg", "Pun19.jpg", "Pun20.jpg", "Pun21.jpg", "Pun22.jpg", "Pun23.jpg", "Pun24.jpg", "Pun25.jpg", "Pun26.jpg", "Pun27.jpg", "Pun28.jpg", "Pun29.jpg", "Pun30.jpeg", "Pun31.jpg", "Pun32.jpg", "Pun33.jpg", "Pun34.png", "Pun35.jpg", "Pun36.jpg", "Pun37.jpg", "Pun38.jpg", "Pun39.jpg", "Pun40.jpg", "Pun41.jpg", "Pun42.jpg", "Pun43.jpg", "Pun44.jpg", "Pun45.gif", "Pun46.jpg", "Pun47.jpg", "Pun48.jpg", "Pun49.jpg", "Pun50.jpg", "Pun51.jpg", "Pun52.jpg", "Pun53.jpg"];
|
||||
pun = pun[Math.floor(Math.random() * pun.length)];
|
||||
message.channel.sendFile(`./images/${pun}`);
|
||||
return message.channel.sendFile(`./images/${pun}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,13 +16,13 @@ module.exports = class QuantumCoin extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let qcoin = ['on nothing', 'on NaN', 'on 0', 'in the air', 'on null'];
|
||||
qcoin = qcoin[Math.floor(Math.random() * qcoin.length)];
|
||||
message.channel.send(`It landed ${qcoin}.`);
|
||||
return message.channel.send(`It landed ${qcoin}.`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@ module.exports = class RateWaifuCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let waifuToRate = message.content.split(" ").slice(1).join(" ");
|
||||
let rating = Math.floor(Math.random() * 10) + 1;
|
||||
message.channel.send(`I'd give ${waifuToRate} a ${rating}/10!`);
|
||||
return message.channel.send(`I'd give ${waifuToRate} a ${rating}/10!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = class RoastMeCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -23,10 +23,10 @@ module.exports = class RoastMeCommand extends commando.Command {
|
||||
let roasts = ["*puts you in the oven*", "You're so stupid.", "Sorry, I can't hear you over how annoying you are.", "I've got better things to do.", "You're as dumb as Cleverbot.", "Your IQ is lower than the Mariana Trench.", "You're so annoying even the flies stay away from your stench.", "Go away, please.", "I'd give you a nasty look but you've already got one.", "It looks like your face caught fire and someone tried to put it out with a hammer.", "Your family tree must be a cactus because everyone on it is a prick.", "Someday you will go far, and I hope you stay there.", "The zoo called. They're wondering how you got out of your cage.", "I was hoping for a battle of wits, but you appear to be unarmed.", "You are proof that evolution can go in reverse.", "Brains aren't everything, in your case, they're nothing.", "Sorry I didn't get that, I don't speak idiot.", "Why is it acceptable for you to be an idiot, but not for me to point it out?", "We all sprang from apes, but you did not spring far enough.", "You're an unknown command.", "If you could go anywhere I chose, I'd choose dead.", "Even monkeys can go to space, so clearly you lack some potential.", "It's brains over brawn, yet you have neither.", "You look like a monkey, and you smell like one too.", "Even among idiots you're lacking.", "You fail even when you're doing absolutely nothing.", "If there was a vote for 'least likely to succeed' you'd win first prize.", "I'm surrounded by idiots... Or, wait, that's just you.", "I wanna go home. Well, really I just want to get away from the awful aroma you've got going there.", "Every time you touch me I have to go home and wash all my clothes nine times just to get a normal smell back.", "If I had a nickel for every brain you don't have, I'd have one dollar.", "I'd help you succeed but you're incapable."];
|
||||
roasts = roasts[Math.floor(Math.random() * roasts.length)];
|
||||
if (!userToRoast) {
|
||||
message.reply(roasts);
|
||||
return message.reply(roasts);
|
||||
}
|
||||
else {
|
||||
message.channel.send(`${userToRoast}, ${roasts}`);
|
||||
return message.channel.send(`${userToRoast}, ${roasts}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = class RockPaperScissors extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -23,43 +23,43 @@ module.exports = class RockPaperScissors extends commando.Command {
|
||||
let response = ['Paper', 'Rock', 'Scissors'];
|
||||
response = response[Math.floor(Math.random() * response.length)];
|
||||
if (!rps) {
|
||||
message.channel.send(":x: Error! Your message contains nothing!");
|
||||
return message.channel.send(":x: Error! Your message contains nothing!");
|
||||
}
|
||||
else if (rps.includes("rock")) {
|
||||
if (response === "Rock") {
|
||||
message.channel.send("Rock! Aw, it's a tie!");
|
||||
return message.channel.send("Rock! Aw, it's a tie!");
|
||||
}
|
||||
if (response === "Paper") {
|
||||
message.channel.send("Paper! Yes! I win!");
|
||||
return message.channel.send("Paper! Yes! I win!");
|
||||
}
|
||||
if (response === "Scissors") {
|
||||
message.channel.send("Scissors! Aw... I lose...");
|
||||
return message.channel.send("Scissors! Aw... I lose...");
|
||||
}
|
||||
}
|
||||
else if (rps.includes("paper")) {
|
||||
if (response === "Rock") {
|
||||
message.channel.send("Rock! Aw... I lose...");
|
||||
return message.channel.send("Rock! Aw... I lose...");
|
||||
}
|
||||
if (response === "Paper") {
|
||||
message.channel.send("Paper! Aw, it's a tie!");
|
||||
return message.channel.send("Paper! Aw, it's a tie!");
|
||||
}
|
||||
if (response === "Scissors") {
|
||||
message.channel.send("Scissors! Yes! I win!");
|
||||
return message.channel.send("Scissors! Yes! I win!");
|
||||
}
|
||||
}
|
||||
else if (rps.includes("scissors")) {
|
||||
if (response === "Rock") {
|
||||
message.channel.send("Rock! Yes! I win!");
|
||||
return message.channel.send("Rock! Yes! I win!");
|
||||
}
|
||||
if (response === "Paper") {
|
||||
message.channel.send("Paper! Aw... I lose...");
|
||||
return message.channel.send("Paper! Aw... I lose...");
|
||||
}
|
||||
if (response === "Scissors") {
|
||||
message.channel.send("Scissors! Aw, it's a tie!");
|
||||
return message.channel.send("Scissors! Aw, it's a tie!");
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
|
||||
return message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = class RollChooseCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -23,14 +23,14 @@ module.exports = class RollChooseCommand extends commando.Command {
|
||||
let [value] = message.content.split(" ").slice(1);
|
||||
if (!value) {
|
||||
let roll = Math.floor(Math.random() * 6) + 1;
|
||||
message.channel.send(`You rolled a ${roll}.`);
|
||||
return message.channel.send(`You rolled a ${roll}.`);
|
||||
}
|
||||
else if (value.match(/^[0-9]+$/)) {
|
||||
let roll = Math.floor(Math.random() * value) + 1;
|
||||
message.channel.send(`You rolled a ${roll}.`);
|
||||
return message.channel.send(`You rolled a ${roll}.`);
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Your message either contains a number but the number is invalid, or the number is in the wrong place.\n:notepad_spiral: (Note: When using numbers such as 1,000, do not use a comma)");
|
||||
return message.channel.send(":x: Error! Your message either contains a number but the number is invalid, or the number is in the wrong place.\n:notepad_spiral: (Note: When using numbers such as 1,000, do not use a comma)");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,16 +17,16 @@ module.exports = class RouletteCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (message.channel.type !== 'dm') {
|
||||
message.channel.send(`I choose ${message.guild.members.random().displayName}!`);
|
||||
return message.channel.send(`I choose ${message.guild.members.random().displayName}!`);
|
||||
}
|
||||
else {
|
||||
message.channel.send(':x: Error! This command does not work in DM!');
|
||||
return message.channel.send(':x: Error! This command does not work in DM!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@ module.exports = class ShipCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToShip = message.content.split(" ").slice(1).join(" ");
|
||||
let percentage = Math.floor(Math.random() * 100) + 1;
|
||||
message.channel.send(`I'd give ${thingToShip} a ${percentage}%!`);
|
||||
return message.channel.send(`I'd give ${thingToShip} a ${percentage}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,7 +11,7 @@ module.exports = class SlotsCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -22,10 +22,10 @@ module.exports = class SlotsCommand extends commando.Command {
|
||||
let slotThree = slotThing[Math.floor(Math.random() * slotThing.length)];
|
||||
let slotFour = slotThing[Math.floor(Math.random() * slotThing.length)];
|
||||
if (slotOne === slotTwo && slotOne === slotThree && slotOne === slotFour) {
|
||||
message.channel.send(`${slotOne}|${slotTwo}|${slotThree}|${slotFour}\nWow! You won! Great job... er... luck!`);
|
||||
return message.channel.send(`${slotOne}|${slotTwo}|${slotThree}|${slotFour}\nWow! You won! Great job... er... luck!`);
|
||||
}
|
||||
else {
|
||||
message.channel.send(`${slotOne}|${slotTwo}|${slotThree}|${slotFour}\nAww... You lost... Guess it's just bad luck, huh?`);
|
||||
return message.channel.send(`${slotOne}|${slotTwo}|${slotThree}|${slotFour}\nAww... You lost... Guess it's just bad luck, huh?`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@ module.exports = class VocaloidSongRndm extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let songs = ["https://www.youtube.com/watch?v=ebAKoRcYFTA", "https://www.youtube.com/watch?v=Mqps4anhz0Q", "https://www.youtube.com/watch?v=AUEiHQOCQ2M", "https://www.youtube.com/watch?v=oyteTOBxRm8", "https://www.youtube.com/watch?v=uwwU55zBYlQ", "https://www.youtube.com/watch?v=sSYoz0JmnZo", "https://www.youtube.com/watch?v=NpU4dsXW6EI", "https://www.youtube.com/watch?v=MzyXD8bNbvk", "https://www.youtube.com/watch?v=hyV4qGAPKac", "https://www.youtube.com/watch?v=pywNi6gD1FA", "https://www.youtube.com/watch?v=17FEtaiWdVg", "https://www.youtube.com/watch?v=fmrA-gxJxgQ", "https://www.youtube.com/watch?v=yOBWgSPrYVA", "https://www.youtube.com/watch?v=nCaqf9WhqOY", "https://www.youtube.com/watch?v=cQKGUgOfD8U", "https://www.youtube.com/watch?v=sK92X82T3Sk", "https://www.youtube.com/watch?v=AH5_sKwDw1E", "https://www.youtube.com/watch?v=dw-KJNqcK-Q", "https://www.youtube.com/watch?v=X47JmmqbMvc", "https://www.youtube.com/watch?v=ojQPpYVQt7U", "https://www.amazon.com/Gogatsu-Yamai-feat-Kagamine-Len/dp/B00P1BG27S", "https://www.youtube.com/watch?v=N1-Z8uslIsI", "https://www.youtube.com/watch?v=EAgk-t2zzqw", "https://www.youtube.com/watch?v=uLBC2kWYFo8", "https://www.youtube.com/watch?v=OXHYIlkZLUU", "https://www.youtube.com/watch?v=ObIa9wXbyMQ", "https://www.youtube.com/watch?v=dGNoCICGmo0", "https://www.youtube.com/watch?v=LcoyEZkTKfY", "https://www.youtube.com/watch?v=mKHaW0qd5Mw", "https://www.youtube.com/watch?v=GG627DYk_E4", "https://www.youtube.com/watch?v=jTm6Q5Pj_Jo", "https://www.youtube.com/watch?v=TVeIDmk3rBo", "https://www.youtube.com/watch?v=1K3in6w9tt4", "https://www.youtube.com/watch?v=07r67gGbtLQ", "https://www.youtube.com/watch?v=243vPl8HdVk", "https://www.youtube.com/watch?v=zweVJrnE1uY", "https://www.youtube.com/watch?v=RKtoreimcQ8", "https://www.youtube.com/watch?v=Je6dCVfHvkU", "https://www.youtube.com/watch?v=UxFv12y_evM", "https://www.youtube.com/watch?v=2HegQtmJeto", "https://www.youtube.com/watch?v=8-Epnpruww0"];
|
||||
songs = songs[Math.floor(Math.random() * songs.length)];
|
||||
message.channel.send(songs);
|
||||
return message.channel.send(songs);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,13 +14,13 @@ module.exports = class RandomXiaoPai extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let XiaoPai = ["1.png", "2.jpg", "3.jpg", "4.jpg", "5.jpg", "6.jpg", "7.jpg", "8.png", "9.png", "10.png", "11.png", "12.png", "13.jpg", "14.jpg", "15.png", "16.jpg", "17.png", "18.gif", "19.png", "20.jpg", "21.jpg"];
|
||||
XiaoPai = XiaoPai[Math.floor(Math.random() * XiaoPai.length)];
|
||||
message.channel.sendFile(`./images/Xiao${XiaoPai}`);
|
||||
return message.channel.sendFile(`./images/Xiao${XiaoPai}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class CuddleCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *cuddles* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *cuddles* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class DivorceCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *divorces* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *divorces* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class EatCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *eats* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *eats* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class FalconPunchCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *falcon punches* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *falcon punches* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class FistBumpCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *fist-bumps* ${thingToRoleplay} *badalalala*`);
|
||||
return message.channel.send(`${message.author} *fist-bumps* ${thingToRoleplay} *badalalala*`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class HighFivesCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *high-fives* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *high-fives* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class HitwithShovelCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *hits* ${thingToRoleplay} *with a shovel*`);
|
||||
return message.channel.send(`${message.author} *hits* ${thingToRoleplay} *with a shovel*`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class HugCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *hugs* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class InhaleCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *inhales* ${thingToRoleplay} *but gained no ability...*`);
|
||||
return message.channel.send(`${message.author} *inhales* ${thingToRoleplay} *but gained no ability...*`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class KillCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *kills* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *kills* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class KissCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *kisses* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *kisses* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class MarryCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *marries* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *marries* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class PatCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *pats* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *pats* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class PokeCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *pokes* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *pokes* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class PunchCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *punches* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *punches* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,12 +11,12 @@ module.exports = class SlapCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(`${message.author} *slaps* ${thingToRoleplay}`);
|
||||
return message.channel.send(`${message.author} *slaps* ${thingToRoleplay}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -43,14 +43,14 @@ module.exports = class BotSearchCommand extends commando.Command {
|
||||
response.body.prefix, true)
|
||||
.addField('**Invite:**',
|
||||
`[Here](${response.body.invite_url})`, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Bot not Found!");
|
||||
return message.channel.send(":x: Error! Bot not Found!");
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(':x: Error! Please mention one bot!');
|
||||
return message.channel.send(':x: Error! Please mention one bot!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,10 +40,10 @@ module.exports = class DefineCommand extends commando.Command {
|
||||
.setColor(0x9797FF)
|
||||
.setTitle(response.body[0].word)
|
||||
.setDescription(response.body[0].text);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Word not Found!");
|
||||
return message.channel.send(":x: Error! Word not Found!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,10 +27,10 @@ module.exports = class DiscrimCommand extends commando.Command {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle(`${users.length} Users with the discriminator: ${userToSearch}`)
|
||||
.setDescription(users.join(', '));
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
message.channel.send(':x: Error! This discriminator is invalid!');
|
||||
return message.channel.send(':x: Error! This discriminator is invalid!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -43,10 +43,10 @@ module.exports = class ForecastCommand extends commando.Command {
|
||||
`**High:** ${info.item.forecast[5].high}°F, **Low:** ${info.item.forecast[5].low}°F, **Condition:** ${info.item.forecast[5].text}`)
|
||||
.addField(`**${info.item.forecast[6].day} - ${info.item.forecast[6].date}:**`,
|
||||
`**High:** ${info.item.forecast[6].high}°F, **Low:** ${info.item.forecast[6].low}°F, **Condition:** ${info.item.forecast[6].text}`);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Make sure you typed the location correctly!");
|
||||
return message.channel.send(":x: Error! Make sure you typed the location correctly!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -31,10 +31,10 @@ module.exports = class DefineCommand extends commando.Command {
|
||||
let href = $('.r').first().find('a').first().attr('href');
|
||||
if (!href) return Promise.reject(new Error('NO RESULTS'));
|
||||
href = querystring.parse(href.replace('/url?', ''));
|
||||
searchMsg.edit(href.q);
|
||||
return searchMsg.edit(href.q);
|
||||
}
|
||||
catch (err) {
|
||||
searchMsg.edit(':x: Error! No Results Found!');
|
||||
return searchMsg.edit(':x: Error! No Results Found!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -29,10 +29,10 @@ module.exports = class DefineCommand extends commando.Command {
|
||||
.get(`https://www.google.com/search?tbm=isch&gs_l=img&q=${encodeURI(thingToSearch)}`);
|
||||
const $ = cheerio.load(response.text);
|
||||
const result = $('.images_table').find('img').first().attr('src');
|
||||
searchMsg.edit(result);
|
||||
return searchMsg.edit(result);
|
||||
}
|
||||
catch (err) {
|
||||
searchMsg.edit(':x: Error! No Results Found!');
|
||||
return searchMsg.edit(':x: Error! No Results Found!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = class IMDBCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,17 @@ module.exports = class NeopetCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let petID = encodeURI(message.content.toLowerCase().split(" ").slice(1).join(" "));
|
||||
if (petID === "getid") {
|
||||
let petIDMsg = await message.channel.send("To get your pet's ID, simply go to http://www.sunnyneo.com/petimagefinder.php and enter your pet's name. It's image should show up. Then, find the link below the pet's image, and copy it to your message!");
|
||||
let petIDMsg2 = await message.channel.sendFile('./images/PetID.png');
|
||||
let petIDMsg3 = await message.channel.send("It's recommended you keep this ID with you so you can easily share your pet's picture without having to repeat these steps.");
|
||||
let petIDMsg = await message.channel.send("To get your pet's ID, simply go to http://www.sunnyneo.com/petimagefinder.php and enter your pet's name. It's image should show up. Then, find the link below the pet's image, and copy it to your message! It's recommended you keep this ID with you so you can easily share your pet's picture without having to repeat these steps.");
|
||||
return message.channel.sendFile('./images/PetID.png');
|
||||
}
|
||||
else {
|
||||
message.channel.send(`Result for: ${petID}`).then(message.channel.sendFile(`http://pets.neopets.com/cp/${petID}/1/5.png`).catch(error => message.channel.send(":x: Error! Pet ID Not Found! Use `;neopet getID` for help on getting your pet ID.")));
|
||||
try {
|
||||
let petMsg = await message.channel.send(`Result for: ${petID}`);
|
||||
return message.channel.sendFile(`http://pets.neopets.com/cp/${petID}/1/5.png`);
|
||||
}
|
||||
catch (err) {
|
||||
return message.channel.send(":x: Error! Pet ID Not Found! Use `;neopet getID` for help on getting your pet ID.");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class OsuCommand extends commando.Command {
|
||||
type: 'string'
|
||||
});
|
||||
if (!response.body[0]) {
|
||||
message.channel.send(":x: Error! User not found!");
|
||||
return message.channel.send(":x: Error! User not found!");
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -65,11 +65,11 @@ module.exports = class OsuCommand extends commando.Command {
|
||||
response.body[0].count_rank_s, true)
|
||||
.addField('**A:**',
|
||||
response.body[0].count_rank_a, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! User not Found!");
|
||||
return message.channel.send(":x: Error! User not Found!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class PokedexCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
@@ -34,10 +34,10 @@ module.exports = class PokedexCommand extends commando.Command {
|
||||
pokedex.entry[pokemon])
|
||||
.addField('Type',
|
||||
pokedex.type[pokemon]);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: This Pokémon either doesn't exist, or isn't implemented yet.");
|
||||
return message.channel.send(":x: This Pokémon either doesn't exist, or isn't implemented yet.");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ module.exports = class UrbanDictionary extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -26,10 +26,10 @@ module.exports = class UrbanDictionary extends commando.Command {
|
||||
let wordToDefine = message.content.split(" ").slice(1).join(" ");
|
||||
urban(wordToDefine).first(function(response) {
|
||||
if (!response) {
|
||||
message.channel.send(":x: Error! Word not found!");
|
||||
return message.channel.send(":x: Error! Word not found!");
|
||||
}
|
||||
else if (!response.definition) {
|
||||
message.channel.send(":x: Error! Word has no definition!");
|
||||
return message.channel.send(":x: Error! Word has no definition!");
|
||||
}
|
||||
else if (response.example) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -40,7 +40,7 @@ module.exports = class UrbanDictionary extends commando.Command {
|
||||
.setDescription(`${response.definition.substr(0, 1900)} [Read the Rest Here!](${response.permalink})`)
|
||||
.addField('**Example:**',
|
||||
response.example.substr(0, 1900));
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -49,7 +49,7 @@ module.exports = class UrbanDictionary extends commando.Command {
|
||||
.setURL(response.permalink)
|
||||
.setTitle(response.word)
|
||||
.setDescription(`${response.definition.substr(0, 1900)} [Read the Rest Here!](${response.permalink})`);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ module.exports = class WattpadCommand extends commando.Command {
|
||||
response.body.stories[0].readCount, true)
|
||||
.addField('**Comments:**',
|
||||
response.body.stories[0].commentCount, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Book not Found!");
|
||||
return message.channel.send(":x: Error! Book not Found!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,10 +50,10 @@ module.exports = class WeatherCommand extends commando.Command {
|
||||
info.wind.direction, true)
|
||||
.addField('**Wind Speed:**',
|
||||
info.wind.speed, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Make sure you typed the location correctly!");
|
||||
return message.channel.send(":x: Error! Make sure you typed the location correctly!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ module.exports = class WikipediaCommand extends commando.Command {
|
||||
let description = response.body.query.pages[0].extract;
|
||||
let name = response.body.query.pages[0].title;
|
||||
if (!description) {
|
||||
message.channel.send(":x: Error! Entry Not Found!");
|
||||
return message.channel.send(":x: Error! Entry Not Found!");
|
||||
}
|
||||
else {
|
||||
description = description.substr(0, 1900);
|
||||
@@ -37,11 +37,11 @@ module.exports = class WikipediaCommand extends commando.Command {
|
||||
.setURL(`https://en.wikipedia.org/wiki/${thingToSearch}`)
|
||||
.setAuthor("Wikipedia", "https://upload.wikimedia.org/wikipedia/en/thumb/8/80/Wikipedia-logo-v2.svg/1122px-Wikipedia-logo-v2.svg.png")
|
||||
.setDescription(`${description} [Read the Rest Here](https://en.wikipedia.org/wiki/${thingToSearch})`);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Entry Not Found!");
|
||||
return message.channel.send(":x: Error! Entry Not Found!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class YouTubeCommand extends commando.Command {
|
||||
key: config.youtubekey
|
||||
});
|
||||
if (!response.body.items[0].snippet) {
|
||||
message.channel.send(':x: Error! No Video Found!');
|
||||
return message.channel.send(':x: Error! No Video Found!');
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -44,11 +44,11 @@ module.exports = class YouTubeCommand extends commando.Command {
|
||||
.setAuthor(`YouTube - ${response.body.items[0].snippet.channelTitle}`, 'https://cdn3.iconfinder.com/data/icons/social-icons-5/607/YouTube_Play.png')
|
||||
.setURL(`https://www.youtube.com/watch?v=${response.body.items[0].id.videoId}`)
|
||||
.setThumbnail(response.body.items[0].snippet.thumbnails.default.url);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! An error has occurred! Try again later! (If this continues to occur, the daily quota may have been reached).");
|
||||
return message.channel.send(":x: Error! An error has occurred! Try again later! (If this continues to occur, the daily quota may have been reached).");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = class YuGiOhCommand extends commando.Command {
|
||||
response.body.data.def, true)
|
||||
.addField('**Level:**',
|
||||
response.body.data.level, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -50,11 +50,11 @@ module.exports = class YuGiOhCommand extends commando.Command {
|
||||
.setAuthor('Yu-Gi-Oh!', 'http://vignette3.wikia.nocookie.net/yugioh/images/1/10/Back-TF-EN-VG.png/revision/latest?cb=20120824043558')
|
||||
.addField('**Card Type:**',
|
||||
response.body.data.card_type, true);
|
||||
message.channel.sendEmbed(embed);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Card not Found!\n:notepad_spiral: Note: This command is **extremely** sensitive to casing and dashes and whatnot. Type the *exact* card name to get data!");
|
||||
return message.channel.send(":x: Error! Card not Found!\n:notepad_spiral: Note: This command is **extremely** sensitive to casing and dashes and whatnot. Type the *exact* card name to get data!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,12 +12,12 @@ module.exports = class BinaryCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToBinary = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
return message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,17 +12,17 @@ module.exports = class CowsayCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (!message.content.split(" ").slice(1).join(" ")) {
|
||||
message.channel.send(":x: Error! You entered nothing!");
|
||||
return message.channel.send(":x: Error! You entered nothing!");
|
||||
}
|
||||
else {
|
||||
let turnToCowsay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendCode(null, cowsay.say({
|
||||
return message.channel.sendCode(null, cowsay.say({
|
||||
text: turnToCowsay,
|
||||
e: "oO",
|
||||
T: "U "
|
||||
|
||||
@@ -12,14 +12,14 @@ module.exports = class EmbedCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let embedMessage = message.content.split(" ").slice(1).join(" ");
|
||||
if (!embedMessage) {
|
||||
message.channel.send(":x: Error! Nothing to embed!");
|
||||
return message.channel.send(":x: Error! Nothing to embed!");
|
||||
}
|
||||
else {
|
||||
if (message.channel.type === 'dm') {
|
||||
@@ -28,7 +28,7 @@ module.exports = class EmbedCommand extends commando.Command {
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
.setDescription(embedMessage);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -37,7 +37,7 @@ module.exports = class EmbedCommand extends commando.Command {
|
||||
.setTimestamp()
|
||||
.setDescription(embedMessage);
|
||||
message.delete();
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = class MorseCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -23,16 +23,16 @@ module.exports = class MorseCommand extends commando.Command {
|
||||
let [methodToUse] = message.content.toLowerCase().split(" ").slice(1);
|
||||
let toMorse = message.content.split(" ").slice(2).join(" ");
|
||||
if (!toMorse) {
|
||||
message.channel.send(":x: Error! Nothing to translate! Perhaps you forgot to set the method? Use either encode or decode before your text.");
|
||||
return message.channel.send(":x: Error! Nothing to translate! Perhaps you forgot to set the method? Use either encode or decode before your text.");
|
||||
}
|
||||
else if (methodToUse === 'encode') {
|
||||
message.channel.send(morse.encode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
return message.channel.send(morse.encode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
}
|
||||
else if (methodToUse === 'decode') {
|
||||
message.channel.send(morse.decode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
return message.channel.send(morse.decode(toMorse)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered incorrect text?'));
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Method not set/not correct! Use either encode or decode.");
|
||||
return message.channel.send(":x: Error! Method not set/not correct! Use either encode or decode.");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ module.exports = class PirateCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -24,14 +24,14 @@ module.exports = class PirateCommand extends commando.Command {
|
||||
let turnToPirate = message.content.split(" ").slice(1).join(" ");
|
||||
let pirate = pirateSpeak.translate(turnToPirate);
|
||||
if (!turnToPirate) {
|
||||
message.channel.send(":x: Error! Nothing to translate!");
|
||||
return message.channel.send(":x: Error! Nothing to translate!");
|
||||
}
|
||||
else {
|
||||
if (pirate.length > 1950) {
|
||||
message.channel.send(":x: Error! Your message is too long!");
|
||||
return message.channel.send(":x: Error! Your message is too long!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(pirate);
|
||||
return message.channel.send(pirate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,18 +11,18 @@ module.exports = class ReverseCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let stringToReverse = message.content.split(" ").slice(1).join(" ");
|
||||
if (!stringToReverse) {
|
||||
message.channel.send(":x: Error! Nothing to reverse!");
|
||||
return message.channel.send(":x: Error! Nothing to reverse!");
|
||||
}
|
||||
else {
|
||||
let reversed = stringToReverse.split("").reverse().join("");
|
||||
message.channel.send(reversed);
|
||||
return message.channel.send(reversed);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -32,11 +32,11 @@ module.exports = class RinSayCommand extends commando.Command {
|
||||
content: rinContent
|
||||
});
|
||||
if (message.content.type !== 'dm') {
|
||||
message.delete();
|
||||
return message.delete();
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(':x: Error! Message failed to send!');
|
||||
return message.channel.send(':x: Error! Message failed to send!');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = class RomajiCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -24,14 +24,14 @@ module.exports = class RomajiCommand extends commando.Command {
|
||||
if (hepburn.containsKana(romajify)) {
|
||||
let romajified = hepburn.fromKana(romajify);
|
||||
if (romajified.length > 1950) {
|
||||
message.channel.send(":x: Error! Your message is too long!");
|
||||
return message.channel.send(":x: Error! Your message is too long!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(romajified);
|
||||
return message.channel.send(romajified);
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
|
||||
return message.channel.send(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,22 +17,22 @@ module.exports = class SayCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let copycat = message.content.split(" ").slice(1).join(" ");
|
||||
if (!copycat) {
|
||||
message.channel.send(":x: Error! Nothing to say!");
|
||||
return message.channel.send(":x: Error! Nothing to say!");
|
||||
}
|
||||
else {
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.send(copycat);
|
||||
return message.channel.send(copycat);
|
||||
}
|
||||
else {
|
||||
message.delete();
|
||||
message.channel.send(copycat);
|
||||
return message.channel.send(copycat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,17 +23,17 @@ module.exports = class ShuffleCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToShuffle = message.content.split(" ").slice(1).join(" ");
|
||||
if (!thingToShuffle) {
|
||||
message.channel.send(":x: Error! Nothing to shuffle!");
|
||||
return message.channel.send(":x: Error! Nothing to shuffle!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(thingToShuffle.shuffle());
|
||||
return message.channel.send(thingToShuffle.shuffle());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -298,18 +298,18 @@ module.exports = class TemmieCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let thingToTranslate = message.content.split(" ").slice(1).join(" ");
|
||||
if (!thingToTranslate) {
|
||||
message.channel.send(':x: Error! Nothing to translate!');
|
||||
return message.channel.send(':x: Error! Nothing to translate!');
|
||||
}
|
||||
else {
|
||||
let temmized = temmize(thingToTranslate);
|
||||
message.channel.send(temmized);
|
||||
return message.channel.send(temmized);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -128,14 +128,14 @@ module.exports = class TranslateCommand extends commando.Command {
|
||||
let [languageto] = message.content.toLowerCase().split(" ").slice(1);
|
||||
let thingToTranslate = message.content.split(" ").slice(2).join(" ");
|
||||
if (languageto === "list") {
|
||||
message.channel.send("‘af': 'Afrikaans’\n’sq': 'Albanian'\n'ar': 'Arabic’\n’hy': 'Armenian’\n’az': 'Azerbaijani’\n’eu': 'Basque’\n’be': 'Belarusian’\n’bn': 'Bengali’\n’bs': 'Bosnian’\n’bg': 'Bulgarian’\n’ca': 'Catalan’\n’ceb': 'Cebuano’\n’ny': 'Chichewa’\n’zh-cn': 'Chinese Simplified’\n’zh-tw': 'Chinese Traditional’\n’co': 'Corsican’\n’hr': 'Croatian’\n’cs': 'Czech’\n’da': 'Danish’\n’nl': 'Dutch’\n’en': 'English’\n’eo': 'Esperanto’\n’et': 'Estonian’\n’tl': 'Filipino’\n’fi': 'Finnish’\n’fr': 'French’\n’fy': 'Frisian’\n’gl': 'Galician’\n’ka': 'Georgian’\n’de': 'German’\n’el': 'Greek’\n’gu': 'Gujarati’\n’ht': 'Haitian Creole’\n’ha': 'Hausa’\n’haw': 'Hawaiian’\n’iw': 'Hebrew’\n’hi': 'Hindi’\n’hmn': 'Hmong’\n’hu': 'Hungarian’\n’is': 'Icelandic’\n’ig': 'Igbo’\n’id': 'Indonesian’\n’ga': 'Irish’\n’it': 'Italian’\n’ja': 'Japanese’\n’jw': 'Javanese’\n’kn': 'Kannada’\n’kk': 'Kazakh’\n’km': 'Khmer’\n’ko': 'Korean’\n’ku': 'Kurdish (Kurmanji)’\n’ky': 'Kyrgyz’\n’lo': 'Lao’\n’la': 'Latin’\n’lv': 'Latvian’\n’lt': 'Lithuanian’\n’lb': 'Luxembourgish’\n’mk': 'Macedonian’\n’mg': 'Malagasy’\n’ms': 'Malay’\n’ml': 'Malayalam’\n’mt': 'Maltese’\n’mi': 'Maori’\n’mr': 'Marathi’\n’mn': 'Mongolian’\n’my': 'Myanmar (Burmese)’\n’ne': 'Nepali’\n’no': 'Norwegian’\n’ps': 'Pashto’\n’fa': 'Persian’\n’pl': 'Polish’\n’pt': 'Portuguese’\n’ma': 'Punjabi’\n’ro': 'Romanian’\n’ru': 'Russian’\nsm': 'Samoan’\n’gd': 'Scots Gaelic’\n’sr': 'Serbian’\n’st': 'Sesotho’\n’sn': 'Shona’\n’sd': 'Sindhi’\n’si': 'Sinhala’\n’sk': 'Slovak’\n’sl': 'Slovenian’\n’so': 'Somali’\n’es': 'Spanish’\n’su': 'Sudanese’\n’sw': 'Swahili’\n’sv': 'Swedish’\n’tg': 'Tajik’\n’ta': 'Tamil’\n’te': 'Telugu’\n’th': 'Thai’\n’tr': 'Turkish’\n’uk': 'Ukrainian’\n’ur': 'Urdu’\n’uz': 'Uzbek’\n’vi': 'Vietnamese’\n’cy': 'Welsh’\n’xh': 'Xhosa’\n’yi': 'Yiddish’\n’yo': 'Yoruba’\n’zu': 'Zulu'");
|
||||
return message.channel.send("‘af': 'Afrikaans’\n’sq': 'Albanian'\n'ar': 'Arabic’\n’hy': 'Armenian’\n’az': 'Azerbaijani’\n’eu': 'Basque’\n’be': 'Belarusian’\n’bn': 'Bengali’\n’bs': 'Bosnian’\n’bg': 'Bulgarian’\n’ca': 'Catalan’\n’ceb': 'Cebuano’\n’ny': 'Chichewa’\n’zh-cn': 'Chinese Simplified’\n’zh-tw': 'Chinese Traditional’\n’co': 'Corsican’\n’hr': 'Croatian’\n’cs': 'Czech’\n’da': 'Danish’\n’nl': 'Dutch’\n’en': 'English’\n’eo': 'Esperanto’\n’et': 'Estonian’\n’tl': 'Filipino’\n’fi': 'Finnish’\n’fr': 'French’\n’fy': 'Frisian’\n’gl': 'Galician’\n’ka': 'Georgian’\n’de': 'German’\n’el': 'Greek’\n’gu': 'Gujarati’\n’ht': 'Haitian Creole’\n’ha': 'Hausa’\n’haw': 'Hawaiian’\n’iw': 'Hebrew’\n’hi': 'Hindi’\n’hmn': 'Hmong’\n’hu': 'Hungarian’\n’is': 'Icelandic’\n’ig': 'Igbo’\n’id': 'Indonesian’\n’ga': 'Irish’\n’it': 'Italian’\n’ja': 'Japanese’\n’jw': 'Javanese’\n’kn': 'Kannada’\n’kk': 'Kazakh’\n’km': 'Khmer’\n’ko': 'Korean’\n’ku': 'Kurdish (Kurmanji)’\n’ky': 'Kyrgyz’\n’lo': 'Lao’\n’la': 'Latin’\n’lv': 'Latvian’\n’lt': 'Lithuanian’\n’lb': 'Luxembourgish’\n’mk': 'Macedonian’\n’mg': 'Malagasy’\n’ms': 'Malay’\n’ml': 'Malayalam’\n’mt': 'Maltese’\n’mi': 'Maori’\n’mr': 'Marathi’\n’mn': 'Mongolian’\n’my': 'Myanmar (Burmese)’\n’ne': 'Nepali’\n’no': 'Norwegian’\n’ps': 'Pashto’\n’fa': 'Persian’\n’pl': 'Polish’\n’pt': 'Portuguese’\n’ma': 'Punjabi’\n’ro': 'Romanian’\n’ru': 'Russian’\nsm': 'Samoan’\n’gd': 'Scots Gaelic’\n’sr': 'Serbian’\n’st': 'Sesotho’\n’sn': 'Shona’\n’sd': 'Sindhi’\n’si': 'Sinhala’\n’sk': 'Slovak’\n’sl': 'Slovenian’\n’so': 'Somali’\n’es': 'Spanish’\n’su': 'Sudanese’\n’sw': 'Swahili’\n’sv': 'Swedish’\n’tg': 'Tajik’\n’ta': 'Tamil’\n’te': 'Telugu’\n’th': 'Thai’\n’tr': 'Turkish’\n’uk': 'Ukrainian’\n’ur': 'Urdu’\n’uz': 'Uzbek’\n’vi': 'Vietnamese’\n’cy': 'Welsh’\n’xh': 'Xhosa’\n’yi': 'Yiddish’\n’yo': 'Yoruba’\n’zu': 'Zulu'");
|
||||
}
|
||||
else if (languages[languageto]) {
|
||||
if (!thingToTranslate) {
|
||||
message.channel.send(":x: Error! Nothing to translate!");
|
||||
return message.channel.send(":x: Error! Nothing to translate!");
|
||||
}
|
||||
else if (thingToTranslate.length > 200) {
|
||||
message.channel.send(":x: Error! Please keep translations below 200 characters!");
|
||||
return message.channel.send(":x: Error! Please keep translations below 200 characters!");
|
||||
}
|
||||
else {
|
||||
try {
|
||||
@@ -149,15 +149,15 @@ module.exports = class TranslateCommand extends commando.Command {
|
||||
thingToTranslate)
|
||||
.addField(`Translation (To: ${languages[languageto]}):`,
|
||||
res.text);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! Language not found! Use `;translate list` to view a list of translate codes!");
|
||||
return message.channel.send(":x: Error! Language not found! Use `;translate list` to view a list of translate codes!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class YodaCommand extends commando.Command {
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let turnToYoda = message.content.split(" ").slice(1).join(" ");
|
||||
if (!turnToYoda) {
|
||||
message.channel.send(':x: Error! Nothing to translate!');
|
||||
return message.channel.send(':x: Error! Nothing to translate!');
|
||||
}
|
||||
else {
|
||||
try {
|
||||
@@ -34,14 +34,14 @@ module.exports = class YodaCommand extends commando.Command {
|
||||
sentence: turnToYoda
|
||||
});
|
||||
if (!response) {
|
||||
message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||
return message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||
}
|
||||
else {
|
||||
message.channel.send(response.text);
|
||||
return message.channel.send(response.text);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
message.channel.send(":x: Error! Something went wrong!");
|
||||
return message.channel.send(":x: Error! Something went wrong!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,20 +12,20 @@ module.exports = class ZalgoCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
let zalgoified = zalgo(message.content.split(" ").slice(1).join(" "));
|
||||
if (!zalgoified) {
|
||||
message.channel.send(":x: Error! Nothing to zalgoify!");
|
||||
return message.channel.send(":x: Error! Nothing to zalgoify!");
|
||||
}
|
||||
else if (zalgoified.length > 1950) {
|
||||
message.channel.send(":x: Error! Your message is too long!");
|
||||
return message.channel.send(":x: Error! Your message is too long!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(zalgoified);
|
||||
return message.channel.send(zalgoified);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -11,20 +11,20 @@ module.exports = class AvatarCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.send(':x: Error! Please mention one user!');
|
||||
return message.channel.send(':x: Error! Please mention one user!');
|
||||
}
|
||||
else {
|
||||
if (!message.mentions.users.first().avatarURL) {
|
||||
message.channel.send(":x: Error! This person has no avatar!");
|
||||
return message.channel.send(":x: Error! This person has no avatar!");
|
||||
}
|
||||
else {
|
||||
message.channel.send(message.mentions.users.first().avatarURL);
|
||||
return message.channel.send(message.mentions.users.first().avatarURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
break;
|
||||
}
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.send(':x: Error! Please mention one user!');
|
||||
return message.channel.send(':x: Error! Please mention one user!');
|
||||
}
|
||||
else {
|
||||
if (!message.mentions.users.first().presence.game) {
|
||||
@@ -73,7 +73,7 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
stat, true)
|
||||
.addField('**Playing:**',
|
||||
"None", true);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -91,12 +91,12 @@ module.exports = class UserInfoCommand extends commando.Command {
|
||||
stat, true)
|
||||
.addField('**Playing:**',
|
||||
message.mentions.users.first().presence.game.name, true);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
return message.channel.sendEmbed(embed);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
message.channel.send(":x: Error! This command does not work in DM!");
|
||||
return message.channel.send(":x: Error! This command does not work in DM!");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = class ServersCommand extends commando.Command {
|
||||
return this.client.isOwner(msg.author);
|
||||
}
|
||||
|
||||
async run(message) {
|
||||
run(message) {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
|
||||
}
|
||||
@@ -25,6 +25,6 @@ module.exports = class ServersCommand extends commando.Command {
|
||||
let guildCount = this.client.guilds.size;
|
||||
let guildNames = this.client.guilds.map(g => `${g.name} (${g.id})`).join(", ");
|
||||
console.log(`${guildCount} Servers: ${guildNames}`);
|
||||
message.channel.send("Sent the information to the console!");
|
||||
return message.channel.send("Sent the information to the console!");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user