mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Replace all sendMessage calls with send
This commit is contained in:
@@ -20,10 +20,10 @@ class YearsCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if(message.mentions.users.first().avatarURL === null) {
|
||||
message.channel.sendMessage(":x: This person has no avatar!");
|
||||
message.channel.send(":x: This person has no avatar!");
|
||||
} else {
|
||||
let avatarurl = message.mentions.users.first().avatarURL;
|
||||
avatarurl = avatarurl.replace(".jpg", ".png");
|
||||
|
||||
@@ -20,10 +20,10 @@ class BeautifulCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if(message.mentions.users.first().avatarURL === null) {
|
||||
message.channel.sendMessage(":x: This person has no avatar!");
|
||||
message.channel.send(":x: This person has no avatar!");
|
||||
} else {
|
||||
let avatarurl = message.mentions.users.first().avatarURL;
|
||||
avatarurl = avatarurl.replace(".jpg", ".png");
|
||||
|
||||
@@ -20,10 +20,10 @@ class BobRossCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if(message.mentions.users.first().avatarURL === null) {
|
||||
message.channel.sendMessage(":x: This person has no avatar!");
|
||||
message.channel.send(":x: This person has no avatar!");
|
||||
} else {
|
||||
let avatarurl = message.mentions.users.first().avatarURL;
|
||||
avatarurl = avatarurl.replace(".jpg", ".png");
|
||||
|
||||
@@ -20,10 +20,10 @@ class RIPCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if(message.mentions.users.first().avatarURL === null) {
|
||||
message.channel.sendMessage(":x: This person has no avatar!");
|
||||
message.channel.send(":x: This person has no avatar!");
|
||||
} else {
|
||||
let avatarurl = message.mentions.users.first().avatarURL;
|
||||
avatarurl = avatarurl.replace(".jpg", ".png");
|
||||
|
||||
@@ -21,10 +21,10 @@ class SteamCardCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
if(message.channel.type !== 'dm') {
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if(message.mentions.users.first().avatarURL === null) {
|
||||
message.channel.sendMessage(":x: This person has no avatar!");
|
||||
message.channel.send(":x: This person has no avatar!");
|
||||
} else {
|
||||
let userdisplayname = message.guild.member(message.mentions.users.first()).displayName;
|
||||
let avatarurl = message.mentions.users.first().avatarURL;
|
||||
@@ -49,7 +49,7 @@ class SteamCardCommand extends commando.Command {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(':x: Error! This command does not work in DM!');
|
||||
message.channel.send(':x: Error! This command does not work in DM!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ class ContactCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let banid = message.author.id;
|
||||
if (message.author.id === banlist.banned[banid]) {
|
||||
message.channel.sendMessage("Sorry, you've been banned from using this command.");
|
||||
message.channel.send("Sorry, you've been banned from using this command.");
|
||||
} else {
|
||||
this.client.users.get('242699360352206850').sendMessage("**" + message.author.username + '#' + message.author.discriminator + " (" + message.author.id + ")" + ":**\n" + message.content.split(" ").slice(1).join(" "));
|
||||
message.channel.sendMessage('Message Sent! Thanks for your support!');
|
||||
this.client.users.get('242699360352206850').send("**" + message.author.username + '#' + message.author.discriminator + " (" + message.author.id + ")" + ":**\n" + message.content.split(" ").slice(1).join(" "));
|
||||
message.channel.send('Message Sent! Thanks for your support!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class InviteCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage("\nAdd me to your server with this link:\n" + "https://discordapp.com/oauth2/authorize?client_id=278305350804045834&scope=bot&permissions=519238" + "\nOr, come to my server with this link:\n" + "https://discord.gg/fqQF8mc");
|
||||
message.channel.send("\nAdd me to your server with this link:\n" + "https://discordapp.com/oauth2/authorize?client_id=278305350804045834&scope=bot&permissions=519238" + "\nOr, come to my server with this link:\n" + "https://discord.gg/fqQF8mc");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class UptimeCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let guilds = this.client.guilds.array().length;
|
||||
message.channel.sendMessage("I've been active on this shard for: **" + moment.duration(this.client.uptime).format('d[ days], h[ hours], m[ minutes, and ]s[ seconds]') + "** in a total of " + guilds + " Servers.");
|
||||
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 a total of " + guilds + " Servers.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ class EmojiCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(":x: This is a DM!");
|
||||
message.channel.send(":x: This is a DM!");
|
||||
} else {
|
||||
message.channel.sendMessage(message.guild.emojis.map(e => e).join(" "));
|
||||
message.channel.send(message.guild.emojis.map(e => e).join(" "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class GuildInfoCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(":x: This is a DM!");
|
||||
message.channel.send(":x: This is a DM!");
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0x00AE86)
|
||||
|
||||
@@ -21,7 +21,7 @@ class MemeCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let [type] = message.content.toLowerCase().split(" ").slice(1);
|
||||
if(type === "list") {
|
||||
message.channel.sendMessage("**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");
|
||||
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]+$/)) {
|
||||
let bottomrow = message.content.toLowerCase().split("|").slice(1).join("-");
|
||||
@@ -31,21 +31,21 @@ class MemeCommand extends commando.Command {
|
||||
toprow = toprow.replace("?", "~q");
|
||||
let link = "https://memegen.link/" + type + "/" + toprow + "/" + bottomrow + ".jpg";
|
||||
if(bottomrow.length > 100) {
|
||||
message.channel.sendMessage(":x: Error! Bottom text is over 100 characters!");
|
||||
message.channel.send(":x: Error! Bottom text is over 100 characters!");
|
||||
} else if(toprow.length > 100) {
|
||||
message.channel.sendMessage(":x: Error! Top text is over 100 characters!");
|
||||
message.channel.send(":x: Error! Top text is over 100 characters!");
|
||||
} else {
|
||||
if(memecodes.memecodes[type]) {
|
||||
message.channel.sendFile(link).catch(error => message.channel.sendMessage(":x: An Error Occurred! Please try again later!"));
|
||||
message.channel.sendFile(link).catch(error => message.channel.send(":x: An Error Occurred! Please try again later!"));
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Meme type not found! (View list with ;meme list)");
|
||||
message.channel.send(":x: Error! Meme type not found! (View list with ;meme list)");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Only letters, numbers, periods, commas, apostrophes, exclamation points, and question marks are allowed!");
|
||||
message.channel.send(":x: Error! Only letters, numbers, periods, commas, apostrophes, exclamation points, and question marks are allowed!");
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Split your two choices with a ' | '!");
|
||||
message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,17 +22,17 @@ class BanCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(":x: This is a DM!");
|
||||
message.channel.send(":x: This is a DM!");
|
||||
} else {
|
||||
let username = message.mentions.users.first();
|
||||
let member = message.guild.member(message.mentions.users.first());
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(":x: Either too many or no members, only mention one person!");
|
||||
message.channel.send(":x: Either too many or no members, only mention one person!");
|
||||
} else {
|
||||
if(message.member.hasPermission('BAN_MEMBERS')) {
|
||||
if(member.bannable === true) {
|
||||
message.channel.sendMessage(":ok_hand:");
|
||||
message.channel.send(":ok_hand:");
|
||||
message.guild.member(username).ban();
|
||||
if(message.guild.channels.exists("name", "mod_logs")) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -43,13 +43,13 @@ class BanCommand extends commando.Command {
|
||||
.setDescription('**Member:** ' + username.username + '#' + username.discriminator + ' (' + username.id + ')\n**Action:** Ban\n**Reason:** ' + reason);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
|
||||
} else {
|
||||
message.channel.sendMessage("**Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
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.sendMessage(":x: This member cannot be banned!");
|
||||
message.channel.send(":x: This member cannot be banned!");
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: You don't have the Ban Members Permission!");
|
||||
message.channel.send(":x: You don't have the Ban Members Permission!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,17 +22,17 @@ class KickCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(":x: This is a DM!");
|
||||
message.channel.send(":x: This is a DM!");
|
||||
} else {
|
||||
let username = message.mentions.users.first();
|
||||
let member = message.guild.member(message.mentions.users.first());
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(":x: Either too many or no members, only mention one person!");
|
||||
message.channel.send(":x: Either too many or no members, only mention one person!");
|
||||
} else {
|
||||
if(message.member.hasPermission('KICK_MEMBERS')) {
|
||||
if(member.kickable === true) {
|
||||
message.channel.sendMessage(":ok_hand:");
|
||||
message.channel.send(":ok_hand:");
|
||||
message.guild.member(username).kick();
|
||||
if(message.guild.channels.exists("name", "mod_logs")) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
@@ -43,13 +43,13 @@ class KickCommand extends commando.Command {
|
||||
.setDescription('**Member:** ' + username.username + '#' + username.discriminator + ' (' + username.id + ')\n**Action:** Kick\n**Reason:** ' + reason);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
|
||||
} else {
|
||||
message.channel.sendMessage("**Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
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.sendMessage(":x: This member cannot be kicked!");
|
||||
message.channel.send(":x: This member cannot be kicked!");
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: You don't have the Kick Members Permission!");
|
||||
message.channel.send(":x: You don't have the Kick Members Permission!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,15 +22,15 @@ class WarnCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(":x: This is a DM!");
|
||||
message.channel.send(":x: This is a DM!");
|
||||
} else {
|
||||
let username = message.mentions.users.first();
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(":x: Either too many or no members, only mention one person!");
|
||||
message.channel.send(":x: Either too many or no members, only mention one person!");
|
||||
} else {
|
||||
if(message.member.hasPermission('KICK_MEMBERS')) {
|
||||
message.channel.sendMessage(":ok_hand:");
|
||||
message.channel.send(":ok_hand:");
|
||||
if(message.guild.channels.exists("name", "mod_logs")) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setAuthor(message.author.username + '#' + message.author.discriminator, message.author.avatarURL)
|
||||
@@ -40,10 +40,10 @@ class WarnCommand extends commando.Command {
|
||||
.setDescription('**Member:** ' + username.username + '#' + username.discriminator + ' (' + username.id + ')\n**Action:** Warn\n**Reason:** ' + reason);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
|
||||
} else {
|
||||
message.channel.sendMessage("**Note: No log will be sent, as there is not a channel named 'mod_logs'. Please create it to use the logging feature.**");
|
||||
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.sendMessage(":x: You don't have the Kick Members Permission!");
|
||||
message.channel.send(":x: You don't have the Kick Members Permission!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ class MathCommand extends commando.Command {
|
||||
let messagecontent = message.content.split(" ").slice(1).join(" ");
|
||||
try {
|
||||
let solved = math.eval(messagecontent);
|
||||
message.channel.sendMessage(solved).catch(error => message.channel.sendMessage(":x: Error! Invalid statement!"));
|
||||
message.channel.send(solved).catch(error => message.channel.send(":x: Error! Invalid statement!"));
|
||||
} catch(err) {
|
||||
message.channel.sendMessage(":x: Error! Invalid statement!");
|
||||
message.channel.send(":x: Error! Invalid statement!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ class RomanCommand extends commando.Command {
|
||||
let messagecontent = message.content.split(" ").slice(1).join(" ");
|
||||
let numberified = Number(messagecontent);
|
||||
if(numberified > 1000000) {
|
||||
message.channel.sendMessage(':x: Error! Number is too high!');
|
||||
message.channel.send(':x: Error! Number is too high!');
|
||||
} else {
|
||||
message.channel.sendMessage(romanNumeralConverter.getRomanFromInteger(numberified)).catch(error => message.channel.sendMessage(':x: Error! Something went wrong! Perhaps you entered nothing?'));
|
||||
message.channel.send(romanNumeralConverter.getRomanFromInteger(numberified)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered nothing?'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class CanYouNot extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage('Can YOU not?');
|
||||
message.channel.send('Can YOU not?');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class GiveFlowerCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
message.channel.send('Ooh, what a pretty flower. What, I may have it? Thanks! I like flowers, yes? ♪');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ class LotteryCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let lotterynumber = ['Winner'][Math.floor(Math.random() * 100)];
|
||||
if(lotterynumber === "Winner") {
|
||||
message.channel.sendMessage("Wow " + message.author.username + "! You actually won! Great job!");
|
||||
message.channel.send("Wow " + message.author.username + "! You actually won! Great job!");
|
||||
} else {
|
||||
message.channel.sendMessage("Nope, sorry, " + message.author.username + ", you lost. RIP you.");
|
||||
message.channel.send("Nope, sorry, " + message.author.username + ", you lost. RIP you.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class MathGameCommand extends commando.Command {
|
||||
let randomExpression = randomValue1 + randomType + randomValue2;
|
||||
let solved = math.eval(randomExpression);
|
||||
if(randomValue === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle('You have **ten** seconds to answer:')
|
||||
@@ -54,9 +54,9 @@ class MathGameCommand extends commando.Command {
|
||||
time: 10000,
|
||||
errors: ['time'],
|
||||
}).then((collected) => {
|
||||
message.channel.sendMessage(`Good Job! You won!`);
|
||||
message.channel.send(`Good Job! You won!`);
|
||||
}).catch(() => {
|
||||
message.channel.sendMessage('Aw... Too bad, try again next time! The correct answer was: ' + solved);
|
||||
message.channel.send('Aw... Too bad, try again next time! The correct answer was: ' + solved);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class SlowClapCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage('*slow clap*');
|
||||
message.channel.send('*slow clap*');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class SpamCommand extends commando.Command {
|
||||
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage("Spam!");
|
||||
message.channel.send("Spam!");
|
||||
message.channel.sendFile("./images/Spam.jpg");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class TodayCommand extends commando.Command {
|
||||
.setDescription(response.data.Events[randomNumber].text + ' (' + response.data.Events[randomNumber].year + ')');
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Something went wrong!");
|
||||
message.channel.send(":x: Error! Something went wrong!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class TypingGameCommand extends commando.Command {
|
||||
break;
|
||||
}
|
||||
if(time === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
message.channel.send(':x: Error! No difficulty set! (Choose Easy, Medium, Hard, or Extreme)');
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setTitle('You have **' + levelWord + '** seconds to type:')
|
||||
@@ -64,9 +64,9 @@ class TypingGameCommand extends commando.Command {
|
||||
time: time,
|
||||
errors: ['time'],
|
||||
}).then((collected) => {
|
||||
message.channel.sendMessage(`Good Job! You won!`);
|
||||
message.channel.send(`Good Job! You won!`);
|
||||
}).catch(() => {
|
||||
message.channel.sendMessage('Aw... Too bad, try again next time!');
|
||||
message.channel.send('Aw... Too bad, try again next time!');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class MagicBall extends commando.Command {
|
||||
if(question === "") {
|
||||
question = "Not Specified."
|
||||
}
|
||||
message.channel.sendMessage("Question: " + question + "\n:8ball: " + coin + " :8ball:");
|
||||
message.channel.send("Question: " + question + "\n:8ball: " + coin + " :8ball:");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ class ChooseCommand extends commando.Command {
|
||||
let choice1 = " " + message.content.replace(choice2, "").split(" ").slice(1).join(" ");
|
||||
let coin = [choice1, choice2];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage("I choose" + coin.replace("|", ""));
|
||||
message.channel.send("I choose" + coin.replace("|", ""));
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Split your two choices with a ' | '!");
|
||||
message.channel.send(":x: Split your two choices with a ' | '!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class CoinFlipCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let coin = ['Heads', 'Tails'];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage("It landed on " + coin);
|
||||
message.channel.send("It landed on " + coin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class ComplimentCommand extends commando.Command {
|
||||
if(username === '') {
|
||||
message.reply(coin);
|
||||
} else {
|
||||
message.channel.sendMessage(username + ", " + coin);
|
||||
message.channel.send(username + ", " + coin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ class FishyCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let coin = [':fish:', ':tropical_fish:', ':blowfish:'];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage("You caught a: " + coin);
|
||||
message.channel.send("You caught a: " + coin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class FortuneCookieCommand extends commando.Command {
|
||||
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.sendMessage(fortunes);
|
||||
message.channel.send(fortunes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class MotivateCommand extends commando.Command {
|
||||
if(username === '') {
|
||||
message.reply(coin);
|
||||
} else {
|
||||
message.channel.sendMessage(username + ", " + coin);
|
||||
message.channel.send(username + ", " + coin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,11 +26,11 @@ 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.sendMessage(randomfirstmale + " " + randomlast);
|
||||
message.channel.send(randomfirstmale + " " + randomlast);
|
||||
} else if(message.content.toLowerCase().split(" ").slice(1).includes("female")) {
|
||||
message.channel.sendMessage(randomfirstfemale + " " + randomlast);
|
||||
message.channel.send(randomfirstfemale + " " + randomlast);
|
||||
} else {
|
||||
message.channel.sendMessage(randomfirstboth + " " + randomlast);
|
||||
message.channel.send(randomfirstboth + " " + randomlast);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class OffspringCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let gender = ['boy', 'girl'];
|
||||
gender = gender[Math.floor(Math.random() * gender.length)];
|
||||
message.channel.sendMessage("It's a " + gender + "!");
|
||||
message.channel.send("It's a " + gender + "!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class QuantumCoin extends commando.Command {
|
||||
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.sendMessage("It landed " + qcoin);
|
||||
message.channel.send("It landed " + qcoin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class RateWaifuCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
let percentage = Math.floor(Math.random() * 10) + 1;
|
||||
message.channel.sendMessage("I'd give " + username + " a " + percentage + "/10!");
|
||||
message.channel.send("I'd give " + username + " a " + percentage + "/10!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class RoastMeCommand extends commando.Command {
|
||||
if(username === '') {
|
||||
message.reply(coin);
|
||||
} else {
|
||||
message.channel.sendMessage(username + ", " + coin);
|
||||
message.channel.send(username + ", " + coin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,39 +21,39 @@ class RockPaperScissors extends commando.Command {
|
||||
let response = ['Paper', 'Rock', 'Scissors'];
|
||||
response = response[Math.floor(Math.random() * response.length)];
|
||||
if(rps === undefined) {
|
||||
message.channel.sendMessage(":x: Error! Your message contains nothing!");
|
||||
message.channel.send(":x: Error! Your message contains nothing!");
|
||||
} else if(rps.includes("rock")) {
|
||||
if(response === "Rock") {
|
||||
message.channel.sendMessage("Rock! Aw, it's a tie!");
|
||||
message.channel.send("Rock! Aw, it's a tie!");
|
||||
}
|
||||
if(response === "Paper") {
|
||||
message.channel.sendMessage("Paper! Yes! I win!");
|
||||
message.channel.send("Paper! Yes! I win!");
|
||||
}
|
||||
if(response === "Scissors") {
|
||||
message.channel.sendMessage("Scissors! Aw... I lose...");
|
||||
message.channel.send("Scissors! Aw... I lose...");
|
||||
}
|
||||
} else if(rps.includes("paper")) {
|
||||
if(response === "Rock") {
|
||||
message.channel.sendMessage("Rock! Aw... I lose...");
|
||||
message.channel.send("Rock! Aw... I lose...");
|
||||
}
|
||||
if(response === "Paper") {
|
||||
message.channel.sendMessage("Paper! Aw, it's a tie!");
|
||||
message.channel.send("Paper! Aw, it's a tie!");
|
||||
}
|
||||
if(response === "Scissors") {
|
||||
message.channel.sendMessage("Scissors! Yes! I win!");
|
||||
message.channel.send("Scissors! Yes! I win!");
|
||||
}
|
||||
} else if(rps.includes("scissors")) {
|
||||
if(response === "Rock") {
|
||||
message.channel.sendMessage("Rock! Yes! I win!");
|
||||
message.channel.send("Rock! Yes! I win!");
|
||||
}
|
||||
if(response === "Paper") {
|
||||
message.channel.sendMessage("Paper! Aw... I lose...");
|
||||
message.channel.send("Paper! Aw... I lose...");
|
||||
}
|
||||
if(response === "Scissors") {
|
||||
message.channel.sendMessage("Scissors! Aw, it's a tie!");
|
||||
message.channel.send("Scissors! Aw, it's a tie!");
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Your choice is not Rock, Paper, or Scissors!");
|
||||
message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@ class RollChooseCommand extends commando.Command {
|
||||
let [value] = message.content.split(" ").slice(1);
|
||||
if(value === undefined) {
|
||||
let roll = Math.floor(Math.random() * 6) + 1;
|
||||
message.channel.sendMessage("You rolled a " + roll)
|
||||
message.channel.send("You rolled a " + roll)
|
||||
} else if(value.match("^[0-9]+$")) {
|
||||
let roll = Math.floor(Math.random() * value) + 1;
|
||||
message.channel.sendMessage("You rolled a " + roll);
|
||||
message.channel.send("You rolled a " + roll);
|
||||
} else {
|
||||
message.channel.sendMessage(":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)");
|
||||
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)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ class RouletteCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if(message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(':x: Error! This is a DM!');
|
||||
message.channel.send(':x: Error! This is a DM!');
|
||||
} else {
|
||||
message.channel.sendMessage("I choose " + message.guild.members.random().displayName + "!");
|
||||
message.channel.send("I choose " + message.guild.members.random().displayName + "!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class ShipCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let ship = message.content.split(" ").slice(1).join(" ");
|
||||
let percentage = Math.floor(Math.random() * 100) + 1;
|
||||
message.channel.sendMessage("I'd give " + ship + " a " + percentage + "%!");
|
||||
message.channel.send("I'd give " + ship + " a " + percentage + "%!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ 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.sendMessage(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nWow! You won! Great job... er... luck!");
|
||||
message.channel.send(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nWow! You won! Great job... er... luck!");
|
||||
} else {
|
||||
message.channel.sendMessage(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nAww... You lost... Guess it's just bad luck, huh?");
|
||||
message.channel.send(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nAww... You lost... Guess it's just bad luck, huh?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class VocaloidSongRndm extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let coin = ["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"];
|
||||
coin = coin[Math.floor(Math.random() * coin.length)];
|
||||
message.channel.sendMessage(coin);
|
||||
message.channel.send(coin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class CuddleCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *cuddles* ' + username);
|
||||
message.channel.send(message.author + ' *cuddles* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class DivorceCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *divorces* ' + username);
|
||||
message.channel.send(message.author + ' *divorces* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class EatCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *eats* ' + username);
|
||||
message.channel.send(message.author + ' *eats* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class FalconPunchCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *falcon punches* ' + username);
|
||||
message.channel.send(message.author + ' *falcon punches* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class FistBumpCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *fistbumps* ' + username + ' *badalalala* ');
|
||||
message.channel.send(message.author + ' *fistbumps* ' + username + ' *badalalala* ');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class HighFivesCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *high fives* ' + username);
|
||||
message.channel.send(message.author + ' *high fives* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class HitwithShovelCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *hits* ' + username + ' *with a shovel* ');
|
||||
message.channel.send(message.author + ' *hits* ' + username + ' *with a shovel* ');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class HugCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *hugs* ' + username);
|
||||
message.channel.send(message.author + ' *hugs* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class InhaleCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *inhales* ' + username + ' *but gained no ability...* ');
|
||||
message.channel.send(message.author + ' *inhales* ' + username + ' *but gained no ability...* ');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class KillCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *kills* ' + username);
|
||||
message.channel.send(message.author + ' *kills* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class KissCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *kisses* ' + username);
|
||||
message.channel.send(message.author + ' *kisses* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class MarryCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *marries* ' + username);
|
||||
message.channel.send(message.author + ' *marries* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class PatCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *pats* ' + username);
|
||||
message.channel.send(message.author + ' *pats* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class PokeCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *pokes* ' + username);
|
||||
message.channel.send(message.author + ' *pokes* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class PunchCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *punches* ' + username);
|
||||
message.channel.send(message.author + ' *punches* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class SlapCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let username = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(message.author + ' *slaps* ' + username);
|
||||
message.channel.send(message.author + ' *slaps* ' + username);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ class BotSearchCommand extends commando.Command {
|
||||
'[Here](' + response.invite_url + ')', true);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Bot not Found!");
|
||||
message.channel.send(":x: Error! Bot not Found!");
|
||||
});
|
||||
} else {
|
||||
message.channel.sendMessage(':x: Either too many or no bots, only mention one bot!');
|
||||
message.channel.send(':x: Either too many or no bots, only mention one bot!');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class DefineCommand extends commando.Command {
|
||||
.setDescription(response[0].text);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Word not Found!");
|
||||
message.channel.send(":x: Error! Word not Found!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class ForecastCommand extends commando.Command {
|
||||
'**High:** ' + info.item.forecast[6].high + ', **Low:** ' + info.item.forecast[6].low + ', **Condition:** ' + info.item.forecast[6].text);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(err => {
|
||||
message.channel.sendMessage(":x: Error! Make sure you typed the location correctly!");
|
||||
message.channel.send(":x: Error! Make sure you typed the location correctly!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,24 +20,24 @@ class GoogleCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let searchQuery = message.content.split(" ").slice(1).join(" ");
|
||||
if(searchQuery === "") {
|
||||
message.channel.sendMessage(':x: Error! I cannot search google for nothing!');
|
||||
message.channel.send(':x: Error! I cannot search google for nothing!');
|
||||
} else {
|
||||
google.resultsPerPage = 2
|
||||
google(searchQuery, function (err, res) {
|
||||
if (res === undefined) {
|
||||
message.channel.sendMessage(':x: Error! Too many requests! Try again later! (Much later)');
|
||||
message.channel.send(':x: Error! Too many requests! Try again later! (Much later)');
|
||||
} else {
|
||||
let link = res.links;
|
||||
if(link === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No Results Found!');
|
||||
message.channel.send(':x: Error! No Results Found!');
|
||||
} else {
|
||||
if(link[0] === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No Results Found!');
|
||||
message.channel.send(':x: Error! No Results Found!');
|
||||
} else {
|
||||
if(link[0].href === null) {
|
||||
message.channel.sendMessage(':x: Error! No Results Found!');
|
||||
message.channel.send(':x: Error! No Results Found!');
|
||||
} else {
|
||||
message.channel.sendMessage(link[0].href).catch(error => message.channel.sendMessage(':x: An Error Occurred! Try again later!'));
|
||||
message.channel.send(link[0].href).catch(error => message.channel.send(':x: An Error Occurred! Try again later!'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class IMDBCommand extends commando.Command {
|
||||
imdb.getReq({ name: querymovie }, (err, things) => {
|
||||
movie = things;
|
||||
if(movie === undefined) {
|
||||
message.channel.sendMessage(":x: Error! Movie not found!");
|
||||
message.channel.send(":x: Error! Movie not found!");
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0xDBA628)
|
||||
|
||||
@@ -20,9 +20,9 @@ class NeopetCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let [petID] = message.content.split(" ").slice(1);
|
||||
if(petID === "getID") {
|
||||
message.channel.sendMessage("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!").then(message.channel.sendFile('./images/PetID.png').then(message.channel.sendMessage("It's recommended you keep this ID with you so you can easily share your pet's picture without having to repeat these steps.")));
|
||||
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!").then(message.channel.sendFile('./images/PetID.png').then(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.")));
|
||||
} else {
|
||||
message.channel.sendMessage("Result for: " + petID).then(message.channel.sendFile('http://pets.neopets.com/cp/' + petID + '/1/5.png').catch(error => message.channel.sendMessage(":x: Error! Pet ID Not Found!\n:notepad_spiral: Note: This command is subject to something of a ratelimit. Try again soon if you're sure your ID is valid.")));
|
||||
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!\n:notepad_spiral: Note: This command is subject to something of a ratelimit. Try again soon if you're sure your ID is valid.")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class OsuCommand extends commando.Command {
|
||||
}
|
||||
request(options).then(function (response) {
|
||||
if(response[0] === undefined) {
|
||||
message.channel.sendMessage(":x: Error! User not found!");
|
||||
message.channel.send(":x: Error! User not found!");
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0xFF66AA)
|
||||
@@ -67,7 +67,7 @@ class OsuCommand extends commando.Command {
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! User not Found!");
|
||||
message.channel.send(":x: Error! User not Found!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class PokedexCommand extends commando.Command {
|
||||
pokedex.type[pokemon]);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
} else {
|
||||
message.channel.sendMessage(":x: This Pokémon either doesn't exist, or isn't implemented yet.");
|
||||
message.channel.send(":x: This Pokémon either doesn't exist, or isn't implemented yet.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ class UrbanDictionary extends commando.Command {
|
||||
let wordtodefine = message.content.split(" ").slice(1).join(" ");
|
||||
urban(wordtodefine).first(function(json) {
|
||||
if(json === undefined) {
|
||||
message.channel.sendMessage(":x: Error! Word not found!");
|
||||
message.channel.send(":x: Error! Word not found!");
|
||||
} else if(json.definition === '') {
|
||||
message.channel.sendMessage(":x: Error! Word has no definition!");
|
||||
message.channel.send(":x: Error! Word has no definition!");
|
||||
} else if(json.example !== '') {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0x32a8f0)
|
||||
|
||||
@@ -55,7 +55,7 @@ class WattpadCommand extends commando.Command {
|
||||
response.stories[0].commentCount, true);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Book not Found!");
|
||||
message.channel.send(":x: Error! Book not Found!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class WeatherCommand extends commando.Command {
|
||||
info.wind.speed, true);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(err => {
|
||||
message.channel.sendMessage(":x: Error! Make sure you typed the location correctly!");
|
||||
message.channel.send(":x: Error! Make sure you typed the location correctly!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class WikipediaCommand extends commando.Command {
|
||||
let name = response.query.pages[0].title;
|
||||
wikied = wikied.replace(")", "%29");
|
||||
if(description === undefined) {
|
||||
message.channel.sendMessage(":x: Error! Entry Not Found!");
|
||||
message.channel.send(":x: Error! Entry Not Found!");
|
||||
} else {
|
||||
description = description.substr(0, 1900);
|
||||
description = description.split('\n').join("\n\n");
|
||||
@@ -54,7 +54,7 @@ class WikipediaCommand extends commando.Command {
|
||||
}
|
||||
}
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Entry Not Found!");
|
||||
message.channel.send(":x: Error! Entry Not Found!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ class YouTubeCommand extends commando.Command {
|
||||
}
|
||||
request(options).then(function (response) {
|
||||
if(response.items[0].snippet === undefined) {
|
||||
message.channel.sendMessage(':x: Error! No Video Found!');
|
||||
message.channel.send(':x: Error! No Video Found!');
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setColor(0xDD2825)
|
||||
@@ -49,7 +49,7 @@ class YouTubeCommand extends commando.Command {
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! An error has occurred! Try again (if this continues to occur, the daily quota may have been reached).");
|
||||
message.channel.send(":x: Error! An error has occurred! Try again (if this continues to occur, the daily quota may have been reached).");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class YuGiOhCommand extends commando.Command {
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":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!");
|
||||
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!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class BinaryCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
let turnToBinary = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendMessage(stringToBinary(turnToBinary)).catch(error => message.channel.sendMessage(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class CowsayCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if(message.content.split(" ").slice(1).join(" ") === "") {
|
||||
message.channel.sendMessage(":x: Error! You entered nothing!");
|
||||
message.channel.send(":x: Error! You entered nothing!");
|
||||
} else {
|
||||
let turnToCowsay = message.content.split(" ").slice(1).join(" ");
|
||||
message.channel.sendCode(null, cowsay.say({
|
||||
@@ -27,7 +27,7 @@ class CowsayCommand extends commando.Command {
|
||||
e : "oO",
|
||||
T : "U "
|
||||
})).catch(error => {
|
||||
message.channel.sendMessage(':x: Error! Perhaps the content is too long?');
|
||||
message.channel.send(':x: Error! Perhaps the content is too long?');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class EmbedCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let embedmessage = message.content.split(" ").slice(1).join(" ");
|
||||
if(embedmessage === "") {
|
||||
message.channel.sendMessage(":x: Error! Nothing to embed!");
|
||||
message.channel.send(":x: Error! Nothing to embed!");
|
||||
} else {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setAuthor(message.author.username, message.author.avatarURL)
|
||||
|
||||
@@ -21,12 +21,12 @@ class PirateCommand extends commando.Command {
|
||||
let messagecontent = message.content.split(" ").slice(1).join(" ");
|
||||
let pirate = pirateSpeak.translate(messagecontent);
|
||||
if(messagecontent === "") {
|
||||
message.channel.sendMessage(":x: Error! Nothing to translate!");
|
||||
message.channel.send(":x: Error! Nothing to translate!");
|
||||
} else {
|
||||
if(pirate.length > 1950) {
|
||||
message.channel.sendMessage(":x: Error! Your message is too long!");
|
||||
message.channel.send(":x: Error! Your message is too long!");
|
||||
} else {
|
||||
message.channel.sendMessage(pirate);
|
||||
message.channel.send(pirate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ class ReverseCommand extends commando.Command {
|
||||
}
|
||||
let messagecontent = message.content.split(" ").slice(1).join(" ");
|
||||
if(messagecontent === "") {
|
||||
message.channel.sendMessage(":x: Error! Nothing to reverse!");
|
||||
message.channel.send(":x: Error! Nothing to reverse!");
|
||||
} else {
|
||||
let reversed = reverseString(messagecontent);
|
||||
message.channel.sendMessage(reversed);
|
||||
message.channel.send(reversed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,12 +22,12 @@ class RomajiCommand extends commando.Command {
|
||||
if(hepburn.containsKana(romajify)) {
|
||||
let romajified = hepburn.fromKana(romajify);
|
||||
if(romajified.length > 1950) {
|
||||
message.channel.sendMessage(":x: Error! Your message is too long!");
|
||||
message.channel.send(":x: Error! Your message is too long!");
|
||||
} else {
|
||||
message.channel.sendMessage(romajified);
|
||||
message.channel.send(romajified);
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
|
||||
message.channel.send(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ class SayCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let Copycat = message.content.split(" ").slice(1).join(" ");
|
||||
if(Copycat === "") {
|
||||
message.channel.sendMessage(":x: Error! Nothing to say!");
|
||||
message.channel.send(":x: Error! Nothing to say!");
|
||||
} else {
|
||||
message.channel.sendMessage(Copycat);
|
||||
message.channel.send(Copycat);
|
||||
if (message.channel.type === 'dm') return;
|
||||
message.delete();
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ class ShuffleCommand extends commando.Command {
|
||||
}
|
||||
let shuffled = message.content.split(" ").slice(1).join(" ");
|
||||
if(shuffled === '') {
|
||||
message.channel.sendMessage(":x: Error! Nothing to shuffle!");
|
||||
message.channel.send(":x: Error! Nothing to shuffle!");
|
||||
} else {
|
||||
message.channel.sendMessage(shuffled.shuffle());
|
||||
message.channel.send(shuffled.shuffle());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,12 +24,12 @@ class TranslateCommand extends commando.Command {
|
||||
let [languageto] = message.content.toLowerCase().split(" ").slice(1);
|
||||
let messagecontent = message.content.split(" ").slice(2).join(" ");
|
||||
if(languageto === "list") {
|
||||
message.channel.sendMessage("‘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'");
|
||||
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.entries[languageto]) {
|
||||
if(messagecontent === "") {
|
||||
message.channel.sendMessage(":x: Error! Nothing to translate!");
|
||||
message.channel.send(":x: Error! Nothing to translate!");
|
||||
} else if(messagecontent.length > 200) {
|
||||
message.channel.sendMessage(":x: Error! Please keep translations below 200 characters!");
|
||||
message.channel.send(":x: Error! Please keep translations below 200 characters!");
|
||||
} else {
|
||||
translate(messagecontent, {to: languageto}).then(res => {
|
||||
let languagefrom = res.from.language.iso.toLowerCase();
|
||||
@@ -41,11 +41,11 @@ class TranslateCommand extends commando.Command {
|
||||
res.text);
|
||||
message.channel.sendEmbed(embed).catch(console.error);
|
||||
}).catch(err => {
|
||||
message.channel.sendMessage(":x: Error!");
|
||||
message.channel.send(":x: Error!");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! Language not found!");
|
||||
message.channel.send(":x: Error! Language not found!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class YodaCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let yodaspeak = message.content.split(" ").slice(1).join(" ");
|
||||
if(yodaspeak === "") {
|
||||
message.channel.sendMessage(':x: Error! Nothing to translate!');
|
||||
message.channel.send(':x: Error! Nothing to translate!');
|
||||
} else {
|
||||
const options = {
|
||||
method: 'GET',
|
||||
@@ -37,12 +37,12 @@ class YodaCommand extends commando.Command {
|
||||
}
|
||||
request(options).then(function (response) {
|
||||
if(response === undefined) {
|
||||
message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||
message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
|
||||
} else {
|
||||
message.channel.sendMessage(response).catch(error => message.channel.sendMessage(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
|
||||
message.channel.send(response).catch(error => message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
|
||||
}
|
||||
}).catch(function (err) {
|
||||
message.channel.sendMessage(":x: Error! Unknown Error. Try again later!");
|
||||
message.channel.send(":x: Error! Unknown Error. Try again later!");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ class ZalgoCommand extends commando.Command {
|
||||
console.log("[Command] " + message.content);
|
||||
let zalgoified = zalgo(message.content.split(" ").slice(1).join(" "));
|
||||
if(zalgoified === '') {
|
||||
message.channel.sendMessage(":x: Error! Nothing to zalgoify!");
|
||||
message.channel.send(":x: Error! Nothing to zalgoify!");
|
||||
} else if(zalgoified.length > 1950) {
|
||||
message.channel.sendMessage(":x: Error! Your message is too long!");
|
||||
message.channel.send(":x: Error! Your message is too long!");
|
||||
} else {
|
||||
message.channel.sendMessage(zalgoified);
|
||||
message.channel.send(zalgoified);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@ class AvatarCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if(message.mentions.users.first().avatarURL === null) {
|
||||
message.channel.sendMessage(":x: This person has no avatar!");
|
||||
message.channel.send(":x: This person has no avatar!");
|
||||
} else {
|
||||
message.channel.sendMessage(message.mentions.users.first().avatarURL);
|
||||
message.channel.send(message.mentions.users.first().avatarURL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class UserInfoCommand extends commando.Command {
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
if (message.channel.type === 'dm') {
|
||||
message.channel.sendMessage(":x: This is a DM!");
|
||||
message.channel.send(":x: This is a DM!");
|
||||
} else {
|
||||
let member = message.guild.member(message.mentions.users.first());
|
||||
let stat;
|
||||
@@ -54,7 +54,7 @@ class UserInfoCommand extends commando.Command {
|
||||
break;
|
||||
}
|
||||
if (message.mentions.users.size !== 1) {
|
||||
message.channel.sendMessage(':x: Either too many or no members, only mention one person!');
|
||||
message.channel.send(':x: Either too many or no members, only mention one person!');
|
||||
} else {
|
||||
if (message.mentions.users.first().presence.game === null) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
|
||||
@@ -41,18 +41,18 @@ client.on('message', (message) => {
|
||||
if(message.author.id !== config.owner) return;
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(client.guilds.array().length + " Servers: " + client.guilds.map(g => g.name + " (" + g.id + ")").join(", "));
|
||||
message.channel.sendMessage("Sent the information to the console!");
|
||||
message.channel.send("Sent the information to the console!");
|
||||
}
|
||||
if(message.content.includes("(╯°□°)╯︵ ┻━┻")) {
|
||||
if(message.channel.type !== 'dm') {
|
||||
if(message.guild.id === "110373943822540800") return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
message.channel.sendMessage("Calm down! ┬─┬ ノ( ゜-゜ノ)");
|
||||
message.channel.send("Calm down! ┬─┬ ノ( ゜-゜ノ)");
|
||||
}
|
||||
if(message.content.includes(":Swagolor:")) {
|
||||
if(message.guild.id !== config.server) return;
|
||||
message.channel.sendMessage(message.guild.emojis.get('254827709459333120').toString());
|
||||
message.channel.send(message.guild.emojis.get('254827709459333120').toString());
|
||||
}
|
||||
if (message.content.startsWith(';rinsay')) {
|
||||
if (message.author.id !== config.owner) return;
|
||||
@@ -84,7 +84,7 @@ client.on('message', (message) => {
|
||||
message.channel.stopTyping();
|
||||
});
|
||||
} else {
|
||||
message.channel.sendMessage(":x: Error! You are either not verified for Cleverbot, or banned from it. Please check #rules for a link to the forum to sign-up for Cleverbot.");
|
||||
message.channel.send(":x: Error! You are either not verified for Cleverbot, or banned from it. Please check #rules for a link to the forum to sign-up for Cleverbot.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user