Huge Modification to Code

This commit is contained in:
Daniel Odendahl Jr
2017-03-21 19:20:47 +00:00
parent 65bf037068
commit d49fe32bf6
100 changed files with 1541 additions and 2049 deletions
+14 -15
View File
@@ -1,10 +1,13 @@
const commando = require('discord.js-commando');
const Jimp = require("jimp");
class YearsCommand extends commando.Command {
module.exports = class YearsCommand extends commando.Command {
constructor(Client){
super(Client, {
name: '3000years',
name: '3000years',
aliases: [
'az'
],
group: 'avataredit',
memberName: '3000years',
description: "It's been 3000 years... (;3000years @User)",
@@ -12,24 +15,22 @@ class YearsCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if(message.mentions.users.first().avatarURL === null) {
message.channel.send(":x: This person has no avatar!");
message.channel.send(":x: Error! This user has no avatar!");
} else {
let avatarurl = message.mentions.users.first().avatarURL;
avatarurl = avatarurl.replace(".jpg", ".png");
avatarurl = avatarurl.replace(".gif", ".png");
let userAvatar = message.mentions.users.first().avatarURL;
userAvatar = userAvatar.replace(".jpg", ".png");
userAvatar = userAvatar.replace(".gif", ".png");
let images = [];
images.push(Jimp.read(avatarurl));
images.push(Jimp.read(userAvatar));
images.push(Jimp.read("./images/3000years.png"));
Promise.all(images).then(([avatar, years]) => {
avatar.resize(200, 200);
@@ -42,6 +43,4 @@ class YearsCommand extends commando.Command {
}
}
}
}
module.exports = YearsCommand;
};
+14 -15
View File
@@ -1,10 +1,13 @@
const commando = require('discord.js-commando');
const Jimp = require("jimp");
class BeautifulCommand extends commando.Command {
module.exports = class BeautifulCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'beautiful',
name: 'beautiful',
aliases: [
'grunklestan'
],
group: 'avataredit',
memberName: 'beautiful',
description: 'Oh, this? This is beautiful. (;beautiful @User)',
@@ -12,24 +15,22 @@ class BeautifulCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if(message.mentions.users.first().avatarURL === null) {
message.channel.send(":x: This person has no avatar!");
message.channel.send(":x: Error! This user has no avatar!");
} else {
let avatarurl = message.mentions.users.first().avatarURL;
avatarurl = avatarurl.replace(".jpg", ".png");
avatarurl = avatarurl.replace(".gif", ".png");
let userAvatar = message.mentions.users.first().avatarURL;
userAvatar = userAvatar.replace(".jpg", ".png");
userAvatar = userAvatar.replace(".gif", ".png");
let images = [];
images.push(Jimp.read(avatarurl));
images.push(Jimp.read(userAvatar));
images.push(Jimp.read("./images/beautiful.jpg"));
Promise.all(images).then(([avatar, beautiful]) => {
avatar.resize(200, 200);
@@ -44,6 +45,4 @@ class BeautifulCommand extends commando.Command {
}
}
}
}
module.exports = BeautifulCommand;
};
+15 -15
View File
@@ -1,10 +1,14 @@
const commando = require('discord.js-commando');
const Jimp = require("jimp");
class BobRossCommand extends commando.Command {
module.exports = class BobRossCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'bobross',
name: 'bobross',
aliases: [
'bob',
'ross'
],
group: 'avataredit',
memberName: 'bobross',
description: "Make Bob Ross draw your avatar. (;bobross @User)",
@@ -12,24 +16,22 @@ class BobRossCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if(message.mentions.users.first().avatarURL === null) {
message.channel.send(":x: This person has no avatar!");
message.channel.send(":x: Error! This user has no avatar!");
} else {
let avatarurl = message.mentions.users.first().avatarURL;
avatarurl = avatarurl.replace(".jpg", ".png");
avatarurl = avatarurl.replace(".gif", ".png");
let userAvatar = message.mentions.users.first().avatarURL;
userAvatar = userAvatar.replace(".jpg", ".png");
userAvatar = userAvatar.replace(".gif", ".png");
let images = [];
images.push(Jimp.read(avatarurl));
images.push(Jimp.read(userAvatar));
images.push(Jimp.read("./images/BobRoss.png"));
images.push(Jimp.read("./images/BlankWhite.png"));
Promise.all(images).then(([avatar, bob, nothing]) => {
@@ -45,6 +47,4 @@ class BobRossCommand extends commando.Command {
}
}
}
}
module.exports = BobRossCommand;
};
+15 -15
View File
@@ -1,10 +1,14 @@
const commando = require('discord.js-commando');
const Jimp = require("jimp");
class RIPCommand extends commando.Command {
module.exports = class RIPCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'rip',
name: 'rip',
aliases: [
'grave',
'gravestone'
],
group: 'avataredit',
memberName: 'rip',
description: 'Puts a profile picture over a gravestone. (;rip @User)',
@@ -12,24 +16,22 @@ class RIPCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if(message.mentions.users.first().avatarURL === null) {
message.channel.send(":x: This person has no avatar!");
message.channel.send(":x: Error! This user has no avatar!");
} else {
let avatarurl = message.mentions.users.first().avatarURL;
avatarurl = avatarurl.replace(".jpg", ".png");
avatarurl = avatarurl.replace(".gif", ".png");
let userAvatar = message.mentions.users.first().avatarURL;
userAvatar = userAvatar.replace(".jpg", ".png");
userAvatar = userAvatar.replace(".gif", ".png");
let images = [];
images.push(Jimp.read(avatarurl));
images.push(Jimp.read(userAvatar));
images.push(Jimp.read("./images/gravestone.jpg"));
Promise.all(images).then(([avatar, gravestone]) => {
avatar.resize(200, 200);
@@ -42,6 +44,4 @@ class RIPCommand extends commando.Command {
}
}
}
}
module.exports = RIPCommand;
};
+17 -17
View File
@@ -1,10 +1,14 @@
const commando = require('discord.js-commando');
const Jimp = require("jimp");
class SteamCardCommand extends commando.Command {
module.exports = class SteamCardCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'steamcard',
name: 'steamcard',
aliases: [
'steam',
'card'
],
group: 'avataredit',
memberName: 'steamcard',
description: "Put an avatar on a Steam Card. (;steamcard @User)",
@@ -12,26 +16,24 @@ class SteamCardCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
if(message.channel.type !== 'dm') {
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if(message.mentions.users.first().avatarURL === null) {
message.channel.send(":x: This person has no avatar!");
message.channel.send(":x: Error! This user has no avatar!");
} else {
let userdisplayname = message.guild.member(message.mentions.users.first()).displayName;
let avatarurl = message.mentions.users.first().avatarURL;
avatarurl = avatarurl.replace(".jpg", ".png");
avatarurl = avatarurl.replace(".gif", ".png");
let userDisplayName = message.guild.member(message.mentions.users.first()).displayName;
let userAvatar = message.mentions.users.first().avatarURL;
userAvatar = userAvatar.replace(".jpg", ".png");
userAvatar = userAvatar.replace(".gif", ".png");
let images = [];
images.push(Jimp.read(avatarurl));
images.push(Jimp.read(userAvatar));
images.push(Jimp.read("./images/SteamCard.png"));
images.push(Jimp.read("./images/SteamCardBlank.png"));
Promise.all(images).then(([avatar, steamcard, nothing]) => {
@@ -39,7 +41,7 @@ class SteamCardCommand extends commando.Command {
avatar.resize(450, 450);
nothing.composite(avatar, 25, 25);
nothing.composite(steamcard, 0, 0);
nothing.print(font, 38, 20, userdisplayname);
nothing.print(font, 38, 20, userDisplayName);
nothing.getBuffer(Jimp.MIME_PNG, (err, buff) => {
if (err) throw err;
message.channel.sendFile(buff);
@@ -52,6 +54,4 @@ class SteamCardCommand extends commando.Command {
message.channel.send(':x: Error! This command does not work in DM!');
}
}
}
module.exports = SteamCardCommand;
};
+12 -10
View File
@@ -1,10 +1,15 @@
const commando = require('discord.js-commando');
const banlist = require('./banlist.json');
class ContactCommand extends commando.Command {
module.exports = class ContactCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'contact',
name: 'contact',
aliases: [
'suggest',
'report',
'bug'
],
group: 'botinfo',
memberName: 'contact',
description: 'Report bugs or request new features. (;contact Fix this command!)',
@@ -12,20 +17,17 @@ class ContactCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let banid = message.author.id;
if (message.author.id === banlist.banned[banid]) {
let banID = message.author.id;
if (message.author.id === banlist.banned[banID]) {
message.channel.send("Sorry, you've been banned from using this command.");
} else {
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!');
}
}
}
module.exports = ContactCommand;
};
+13 -15
View File
@@ -4,10 +4,14 @@ const config = require("../../config.json");
const moment = require('moment');
require('moment-duration-format');
class InfoCommand extends commando.Command {
module.exports = class InfoCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'info',
name: 'info',
aliases: [
'data',
'information'
],
group: 'botinfo',
memberName: 'info',
description: 'Gives some bot info. (;info)',
@@ -15,16 +19,12 @@ class InfoCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let guilds = this.client.guilds.size;
let users = this.client.users.size;
this.client.shard.fetchClientValues('guilds.size').then(results => {
this.client.shard.fetchClientValues('guilds.size').then(guilds => {
this.client.shard.fetchClientValues('voiceConnections.size').then(vCConnections => {
const embed = new Discord.RichEmbed()
.setTitle('Welcome to XiaoBot!')
@@ -37,11 +37,11 @@ class InfoCommand extends commando.Command {
.addField('Commands',
"There are a variety of commands XiaoBot can use! Use ';help' to view a list of all commands!")
.addField('Servers',
guilds + "/" + results.reduce((prev, val) => prev + val, 0), true)
this.client.guilds.size + " / " + guilds.reduce((prev, val) => prev + val, 0), true)
.addField('Shards',
this.client.options.shardCount + " (This is Shard: " + this.client.shard.id + ")", true)
.addField('Commands',
config.commandcount, true)
config.commandCount, true)
.addField('Owner',
"dragonfire535#8081", true)
.addField('Source Code',
@@ -53,7 +53,7 @@ class InfoCommand extends commando.Command {
.addField('Node Version',
process.version, true)
.addField('Voice Connections',
this.client.voiceConnections.size + "/" + vCConnections.reduce((prev, val) => prev + val, 0), true)
this.client.voiceConnections.size + " / " + vCConnections.reduce((prev, val) => prev + val, 0), true)
.addField('Library',
"[discord.js](https://discord.js.org/#/) / [commando](https://github.com/Gawdl3y/discord.js-commando)", true)
.addField('Modules',
@@ -72,6 +72,4 @@ class InfoCommand extends commando.Command {
});
});
}
}
module.exports = InfoCommand;
};
+6 -9
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class InviteCommand extends commando.Command {
module.exports = class InviteCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'invite',
name: 'invite',
group: 'botinfo',
memberName: 'invite',
description: 'Sends you an invite for the bot, or an invite to my server, Heroes of Dreamland. (;invite)',
@@ -11,14 +11,11 @@ class InviteCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
message.channel.send("\nAdd me to your server with this link:\n" + "https://discordapp.com/oauth2/authorize?client_id=278305350804045834&scope=bot&permissions=1345846343" + "\nOr, come to my server with this link:\n" + "https://discord.gg/fqQF8mc");
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");
}
}
module.exports = InviteCommand;
};
+6 -10
View File
@@ -2,10 +2,10 @@ const commando = require('discord.js-commando');
const moment = require('moment');
require('moment-duration-format');
class UptimeCommand extends commando.Command {
module.exports = class UptimeCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'uptime',
name: 'uptime',
group: 'botinfo',
memberName: 'uptime',
description: 'Displays how long the bot has been active. (;uptime)',
@@ -13,15 +13,11 @@ class UptimeCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let guilds = this.client.guilds.array().length;
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.");
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 " + this.client.guilds.size + " Servers.");
}
}
module.exports = UptimeCommand;
};
+13 -12
View File
@@ -1,9 +1,14 @@
const commando = require('discord.js-commando');
class EmojiCommand extends commando.Command {
module.exports = class EmojiCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'emoji',
name: 'emoji',
aliases: [
'emoticons',
'emojilist',
'emoticonlist'
],
group: 'guildinfo',
memberName: 'emoji',
description: "Gives a list of the current server's emoji. (;emoji)",
@@ -11,19 +16,15 @@ class EmojiCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
if (message.channel.type === 'dm') {
message.channel.send(":x: This is a DM!");
} else {
if (message.channel.type !== 'dm') {
message.channel.send(message.guild.emojis.map(e => e).join(" "));
} else {
message.channel.send(":x: Error! This command does not work in DM!");
}
}
}
module.exports = EmojiCommand;
};
+13 -12
View File
@@ -1,10 +1,15 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class GuildInfoCommand extends commando.Command {
module.exports = class GuildInfoCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'server',
name: 'server',
aliases: [
'guild',
'serverinfo',
'guildinfo'
],
group: 'guildinfo',
memberName: 'server',
description: 'Gives some info on the current server. (;server)',
@@ -12,16 +17,12 @@ class GuildInfoCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
if (message.channel.type === 'dm') {
message.channel.send(":x: This is a DM!");
} else {
if (message.channel.type !== 'dm') {
const embed = new Discord.RichEmbed()
.setColor(0x00AE86)
.setThumbnail(message.guild.iconURL)
@@ -40,8 +41,8 @@ class GuildInfoCommand extends commando.Command {
.addField("**Users:**",
message.guild.memberCount, true);
message.channel.sendEmbed(embed).catch(console.error);
} else {
message.channel.send(":x: Error! This command does not work in DM!");
}
}
}
module.exports = GuildInfoCommand;
};
+12 -13
View File
@@ -1,10 +1,13 @@
const commando = require('discord.js-commando');
const memecodes = require('./memecodes.json');
class MemeCommand extends commando.Command {
module.exports = class MemeCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'meme',
name: 'meme',
aliases: [
'memegen'
],
group: 'imageedit',
memberName: 'meme',
description: "Sends a Meme with text of your choice, and a background of your choice. Split first and second lines with a | (;meme facepalm I can't even | comprehend this)",
@@ -12,11 +15,9 @@ class MemeCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
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);
@@ -26,9 +27,9 @@ class MemeCommand extends commando.Command {
if(message.content.split(" ").slice(1).join(" ").match(/^[a-zA-Z0-9|.,!?'-\s]+$/)) {
let bottomrow = message.content.toLowerCase().split("|").slice(1).join("-");
let toprow = " " + message.content.toLowerCase().replace(bottomrow, "").split(" ").slice(2).join("-");
toprow = toprow.replace("|", "");
bottomrow = bottomrow.replace("?", "~q");
toprow = toprow.replace("?", "~q");
toprow = toprow.split("|").join("");
bottomrow = bottomrow.split("?").join("~q");
toprow = toprow.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!");
@@ -38,7 +39,7 @@ class MemeCommand extends commando.Command {
if(memecodes.memecodes[type]) {
message.channel.sendFile(link).catch(error => message.channel.send(":x: An Error Occurred! Please try again later!"));
} else {
message.channel.send(":x: Error! Meme type not found! (View list with ;meme list)");
message.channel.send(":x: Error! Meme type not found! Use `;meme list` to view of list of meme codes!");
}
}
} else {
@@ -48,6 +49,4 @@ class MemeCommand extends commando.Command {
message.channel.send(":x: Split your two choices with a ' | '!");
}
}
}
module.exports = MemeCommand;
};
+21 -25
View File
@@ -1,59 +1,55 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class BanCommand extends commando.Command {
module.exports = class BanCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'ban',
name: 'ban',
aliases: [
'banne'
],
group: 'moderation',
memberName: 'ban',
description: 'Bans a user. (;ban @User being a jerk. **Note: You must have a channel called "mod_logs!"**)',
examples: [";ban @User being a jerk. **Note: You must have a channel called 'mod_logs!**"]
description: 'Bans a user. (;ban @User being a jerk.)',
examples: [";ban @User being a jerk."]
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('KICK_MEMBERS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS', 'BAN_MEMBERS'])) return;
}
console.log("[Command] " + message.content);
if (message.channel.type === '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());
if (message.channel.type !== 'dm') {
let userToBan = message.mentions.users.first();
let reason = message.content.split(" ").slice(2).join(" ");
if (message.mentions.users.size !== 1) {
message.channel.send(":x: Either too many or no members, only mention one person!");
message.channel.send(":x: Error! Please mention one user!");
} else {
if(message.member.hasPermission('BAN_MEMBERS')) {
if(member.bannable === true) {
if(message.guild.member(userToBan).bannable) {
message.channel.send(":ok_hand:");
message.guild.member(username).ban();
message.guild.member(userToBan).ban();
if(message.guild.channels.exists("name", "mod_logs")) {
const embed = new Discord.RichEmbed()
.setAuthor(message.author.username + '#' + message.author.discriminator, message.author.avatarURL)
.setColor(0xFF0000)
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
.setTimestamp()
.setDescription('**Member:** ' + username.username + '#' + username.discriminator + ' (' + username.id + ')\n**Action:** Ban\n**Reason:** ' + reason);
.setDescription('**Member:** ' + userToBan.username + '#' + userToBan.discriminator + ' (' + userToBan.id + ')\n**Action:** Ban\n**Reason:** ' + reason);
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
} 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.**");
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: This member cannot be banned!");
message.channel.send(":x: Error! This member cannot be banned! Perhaps they have a higher role than me?");
}
} else {
message.channel.send(":x: You don't have the Ban Members Permission!");
message.channel.send(":x: Error! You don't have the Ban Members Permission!");
}
}
} else {
message.channel.send(":x: Error! This command does not work in DM!");
}
}
}
module.exports = BanCommand;
};
+18 -25
View File
@@ -1,59 +1,52 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class KickCommand extends commando.Command {
module.exports = class KickCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'kick',
name: 'kick',
group: 'moderation',
memberName: 'kick',
description: 'Kicks a user. (;kick @User being a jerk **Note: You must have a channel called "mod_logs!"**)',
examples: [";kick @User being a jerk. **Note: You must have a channel called 'mod_logs!**"]
description: 'Kicks a user. (;kick @User being a jerk.)',
examples: [";kick @User being a jerk."]
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('KICK_MEMBERS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS', 'KICK_MEMBERS'])) return;
}
console.log("[Command] " + message.content);
if (message.channel.type === '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());
if (message.channel.type !== 'dm') {
let userToKick = message.mentions.users.first();
let reason = message.content.split(" ").slice(2).join(" ");
if (message.mentions.users.size !== 1) {
message.channel.send(":x: Either too many or no members, only mention one person!");
message.channel.send(":x: Error! Please mention one user!");
} else {
if(message.member.hasPermission('KICK_MEMBERS')) {
if(member.kickable === true) {
if(message.guild.member(userToKick).kickable) {
message.channel.send(":ok_hand:");
message.guild.member(username).kick();
message.guild.member(userToKick).kick();
if(message.guild.channels.exists("name", "mod_logs")) {
const embed = new Discord.RichEmbed()
.setAuthor(message.author.username + '#' + message.author.discriminator, message.author.avatarURL)
.setColor(0xFFA500)
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
.setTimestamp()
.setDescription('**Member:** ' + username.username + '#' + username.discriminator + ' (' + username.id + ')\n**Action:** Kick\n**Reason:** ' + reason);
.setDescription('**Member:** ' + userToKick.username + '#' + userToKick.discriminator + ' (' + userToKick.id + ')\n**Action:** Kick\n**Reason:** ' + reason);
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
} 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.**");
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: This member cannot be kicked!");
message.channel.send(":x: Error! This member cannot be kicked! Perhaps they have a higher role than me?");
}
} else {
message.channel.send(":x: You don't have the Kick Members Permission!");
message.channel.send(":x: Error! You don't have the Kick Members Permission!");
}
}
} else {
message.channel.send(":x: Error! This command does not work in DM!");
}
}
}
module.exports = KickCommand;
};
+15 -21
View File
@@ -1,35 +1,29 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class WarnCommand extends commando.Command {
module.exports = class WarnCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'warn',
name: 'warn',
group: 'moderation',
memberName: 'warn',
description: 'Warns a user. (;warn @User being a jerk **Note: You must have a channel called "mod_logs!"**)',
examples: [";warn @User being a jerk. **Note: You must have a channel called 'mod_logs!**"]
description: 'Warns a user. (;warn @User being a jerk)',
examples: [";warn @User being a jerk."]
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('KICK_MEMBERS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('BAN_MEMBERS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
if (message.channel.type === 'dm') {
message.channel.send(":x: This is a DM!");
if (message.channel.type !== 'dm') {
message.channel.send(":x: Error! This command does not work in DM!");
} else {
let username = message.mentions.users.first();
let userToWarn = message.mentions.users.first();
let reason = message.content.split(" ").slice(2).join(" ");
if (message.mentions.users.size !== 1) {
message.channel.send(":x: Either too many or no members, only mention one person!");
} else {
if(message.member.hasPermission('KICK_MEMBERS')) {
if(message.member.hasPermission('MANAGE_MESSAGES')) {
message.channel.send(":ok_hand:");
if(message.guild.channels.exists("name", "mod_logs")) {
const embed = new Discord.RichEmbed()
@@ -37,17 +31,17 @@ class WarnCommand extends commando.Command {
.setColor(0xFFFF00)
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
.setTimestamp()
.setDescription('**Member:** ' + username.username + '#' + username.discriminator + ' (' + username.id + ')\n**Action:** Warn\n**Reason:** ' + reason);
.setDescription('**Member:** ' + userToWarn.username + '#' + userToWarn.discriminator + ' (' + userToWarn.id + ')\n**Action:** Warn\n**Reason:** ' + reason);
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
} 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.**");
}
} else {
message.channel.send(":x: You don't have the Kick Members Permission!");
message.channel.send(":x: Error! You don't have the Manage Messages Permission!");
}
} else {
message.channel.send(":x: Error! Please mention one user!");
}
}
}
}
module.exports = WarnCommand;
};
+13 -10
View File
@@ -1,10 +1,16 @@
const commando = require('discord.js-commando');
const math = require('mathjs');
class MathCommand extends commando.Command {
module.exports = class MathCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'math',
name: 'math',
aliases: [
'add',
'subtract',
'multiply',
'divide'
],
group: 'numedit',
memberName: 'math',
description: 'Does Math (;math 2 + 2)',
@@ -12,20 +18,17 @@ class MathCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let messagecontent = message.content.split(" ").slice(1).join(" ");
let expression = message.content.split(" ").slice(1).join(" ");
try {
let solved = math.eval(messagecontent);
let solved = math.eval(expression);
message.channel.send(solved).catch(error => message.channel.send(":x: Error! Invalid statement!"));
} catch(err) {
message.channel.send(":x: Error! Invalid statement!");
}
}
}
module.exports = MathCommand;
};
+8 -11
View File
@@ -1,7 +1,7 @@
const commando = require('discord.js-commando');
const romanNumeralConverter = require('roman-numeral-converter-mmxvi');
class RomanCommand extends commando.Command {
module.exports = class RomanCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'roman',
@@ -12,20 +12,17 @@ class RomanCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let messagecontent = message.content.split(" ").slice(1).join(" ");
let numberified = Number(messagecontent);
if(numberified > 1000000) {
let numberToRoman = message.content.split(" ").slice(1).join(" ");
let romanInterger = Number(numberToRoman);
if(romanInterger > 1000000) {
message.channel.send(':x: Error! Number is too high!');
} else {
message.channel.send(romanNumeralConverter.getRomanFromInteger(numberified)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered nothing?'));
message.channel.send(romanNumeralConverter.getRomanFromInteger(romanInterger)).catch(error => message.channel.send(':x: Error! Something went wrong! Perhaps you entered nothing?'));
}
}
}
module.exports = RomanCommand;
};
+5 -8
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class CanYouNot extends commando.Command {
module.exports = class CanYouNot extends commando.Command {
constructor(Client){
super(Client, {
name: 'canyounot',
name: 'canyounot',
group: 'random',
memberName: 'canyounot',
description: 'Can YOU not? (;canyounot)',
@@ -11,14 +11,11 @@ class CanYouNot extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
message.channel.send('Can YOU not?');
}
}
module.exports = CanYouNot;
};
+9 -8
View File
@@ -1,9 +1,13 @@
const commando = require('discord.js-commando');
class GiveFlowerCommand extends commando.Command {
module.exports = class GiveFlowerCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'giveflower',
name: 'giveflower',
aliases: [
'present',
'gift'
],
group: 'random',
memberName: 'giveflower',
description: 'Gives Xiao Pai a flower. (;giveflower)',
@@ -11,14 +15,11 @@ class GiveFlowerCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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? ♪');
}
}
module.exports = GiveFlowerCommand;
};
+5 -8
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class LennyCommand extends commando.Command {
module.exports = class LennyCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'lenny',
name: 'lenny',
group: 'random',
memberName: 'lenny',
description: 'Responds with the lenny face. (;lenny)',
@@ -11,14 +11,11 @@ class LennyCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
message.channel.send('( ͡° ͜ʖ ͡°)');
}
}
module.exports = LennyCommand;
};
+8 -11
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class LotteryCommand extends commando.Command {
module.exports = class LotteryCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'lottery',
name: 'lottery',
group: 'random',
memberName: 'lottery',
description: '1 in 100 Chance of Winning. Winners get... The feeling of winning? (;lottery)',
@@ -11,19 +11,16 @@ class LotteryCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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") {
let lotteryNumber = ['Winner'][Math.floor(Math.random() * 100)];
if(lotteryNumber === "Winner") {
message.channel.send("Wow " + message.author.username + "! You actually won! Great job!");
} else {
message.channel.send("Nope, sorry, " + message.author.username + ", you lost. RIP you.");
message.channel.send("Nope, sorry, " + message.author.username + ", you lost.");
}
}
}
module.exports = LotteryCommand;
};
+5 -9
View File
@@ -2,10 +2,10 @@ const commando = require('discord.js-commando');
const Discord = require('discord.js');
const math = require('mathjs');
class MathGameCommand extends commando.Command {
module.exports = class MathGameCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'mathgame',
name: 'mathgame',
group: 'random',
memberName: 'mathgame',
description: 'See how fast you can answer a math problem in a given time limit. (;mathgame easy)',
@@ -13,11 +13,9 @@ class MathGameCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let [level] = message.content.toLowerCase().split(" ").slice(1);
@@ -61,6 +59,4 @@ class MathGameCommand extends commando.Command {
});
}
}
}
module.exports = MathGameCommand;
};
+5 -9
View File
@@ -1,10 +1,10 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class NitroCommand extends commando.Command {
module.exports = class NitroCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'nitro',
name: 'nitro',
group: 'random',
memberName: 'nitro',
description: 'Sends a "This Message Can Only be viewed by Nitro Members" message. (;nitro)',
@@ -12,11 +12,9 @@ class NitroCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
const embed = new Discord.RichEmbed()
@@ -27,6 +25,4 @@ class NitroCommand extends commando.Command {
.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).catch(console.error);
}
}
module.exports = NitroCommand;
};
+5 -8
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class SlowClapCommand extends commando.Command {
module.exports = class SlowClapCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'slowclap',
name: 'slowclap',
group: 'random',
memberName: 'slowclap',
description: '*Slow Clap*. (;slowclap)',
@@ -11,14 +11,11 @@ class SlowClapCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
message.channel.send('*slow clap*');
}
}
module.exports = SlowClapCommand;
};
+12 -11
View File
@@ -1,10 +1,14 @@
const commando = require('discord.js-commando');
const sounds = require('./sounds.json');
class SoundBoardCommand extends commando.Command {
module.exports = class SoundBoardCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'soundboard',
name: 'soundboard',
aliases: [
'sound',
'play'
],
group: 'random',
memberName: 'soundboard',
description: 'Plays a sound in your voice channel. (;soundboard cat)',
@@ -12,10 +16,9 @@ class SoundBoardCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
if(message.channel.type !== 'dm') {
@@ -40,9 +43,9 @@ class SoundBoardCommand extends commando.Command {
message.channel.send(':x: Error! I am already playing a sound!');
}
} else {
voiceChannel.join().then(connnection => {
voiceChannel.join().then(connection => {
let stream = sounds.paths[soundToPlay];
let dispatcher = connnection.playStream(stream);
let dispatcher = connection.playStream(stream);
message.react('🔊');
dispatcher.on('end', () => {
voiceChannel.leave();
@@ -51,13 +54,11 @@ class SoundBoardCommand extends commando.Command {
});
}
} else {
message.channel.send(':x: Error! Sound not found! Please use ;soundboard list to see a list of sounds you can play.');
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!');
}
}
}
module.exports = SoundBoardCommand;
};
+5 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class SpamCommand extends commando.Command {
module.exports = class SpamCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'spam',
name: 'spam',
group: 'random',
memberName: 'spam',
description: 'Puts a picture of Spam. (;spam)',
@@ -11,16 +11,11 @@ class SpamCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
message.channel.send("Spam!");
message.channel.sendFile("./images/Spam.jpg");
}
}
module.exports = SpamCommand;
};
+16 -20
View File
@@ -1,11 +1,14 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
class TodayCommand extends commando.Command {
module.exports = class TodayCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'today',
name: 'today',
aliases: [
'history'
],
group: 'random',
memberName: 'today',
description: 'Tells you what happened today. (;today)',
@@ -13,31 +16,24 @@ class TodayCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
const options = {
method: 'GET',
uri: 'http://history.muffinlabs.com/date',
json: true
}
request(options).then(function (response) {
let randomNumber = Math.floor(Math.random() * response.data.Events.length);
request
.get('http://history.muffinlabs.com/date')
.then(function (response) {
let randomNumber = Math.floor(Math.random() * response.body.data.Events.length);
const embed = new Discord.RichEmbed()
.setColor(0x9797FF)
.setURL(response.url)
.setTitle('On this day (' + response.date + ')...')
.setURL(response.body.url)
.setTitle('On this day (' + response.body.date + ')...')
.setTimestamp()
.setDescription(response.data.Events[randomNumber].text + ' (' + response.data.Events[randomNumber].year + ')');
.setDescription(response.body.data.Events[randomNumber].text + ' (' + response.body.data.Events[randomNumber].year + ')');
message.channel.sendEmbed(embed).catch(console.error);
}).catch(function (err) {
message.channel.send(":x: Error! Something went wrong!");
});
}
}
module.exports = TodayCommand;
};
+5 -9
View File
@@ -1,10 +1,10 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class TypingGameCommand extends commando.Command {
module.exports = class TypingGameCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'typinggame',
name: 'typinggame',
group: 'random',
memberName: 'typinggame',
description: 'See how fast you can type a sentence in a given time limit. (;typinggame easy)',
@@ -12,11 +12,9 @@ class TypingGameCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let [level] = message.content.toLowerCase().split(" ").slice(1);
@@ -71,6 +69,4 @@ class TypingGameCommand extends commando.Command {
});
}
}
}
module.exports = TypingGameCommand;
};
+8 -11
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class MagicBall extends commando.Command {
module.exports = class MagicBall extends commando.Command {
constructor(Client){
super(Client, {
name: '8ball',
name: '8ball',
group: 'response',
memberName: '8ball',
description: 'Predicts your future. (;8ball Am I stupid?)',
@@ -11,20 +11,17 @@ class MagicBall extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let question = message.content.split(" ").slice(1).join(" ");
let coin = ['It seems the answer is yes, yes?', 'It seems the answer is no.', 'It is a little doubtful, yes?', 'It seems it is very likely to be true.'];
coin = coin[Math.floor(Math.random() * coin.length)];
let answers = ['It seems the answer is yes, yes?', 'It seems the answer is no.', 'It is a little doubtful, yes?', 'It seems it is very likely to be true.'];
answers = answers[Math.floor(Math.random() * answers.length)];
if(question === "") {
question = "Not Specified."
}
message.channel.send("Question: " + question + "\n:8ball: " + coin + " :8ball:");
message.channel.send("Question: " + question + "\n:8ball: " + answers + " :8ball:");
}
}
module.exports = MagicBall;
};
+6 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class RandomCat extends commando.Command {
module.exports = class RandomCat extends commando.Command {
constructor(Client){
super(Client, {
name: 'cat',
name: 'cat',
group: 'response',
memberName: 'cat',
description: 'Sends a random cat picture. (;cat)',
@@ -11,17 +11,13 @@ class RandomCat extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
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"]
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);
}
}
module.exports = RandomCat;
};
+8 -8
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class ChooseCommand extends commando.Command {
module.exports = class ChooseCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'choose',
name: 'choose',
aliases: [
'pick'
],
group: 'response',
memberName: 'choose',
description: 'Chooses between two things. (;choose Cow | Sheep)',
@@ -11,10 +14,9 @@ class ChooseCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
if(message.content.includes("|")) {
@@ -27,6 +29,4 @@ class ChooseCommand extends commando.Command {
message.channel.send(":x: Split your two choices with a ' | '!");
}
}
}
module.exports = ChooseCommand;
};
+9 -8
View File
@@ -1,9 +1,13 @@
const commando = require('discord.js-commando');
class CoinFlipCommand extends commando.Command {
module.exports = class CoinFlipCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'coin',
name: 'coin',
aliases: [
'coinflip',
'flip'
],
group: 'response',
memberName: 'coin',
description: 'Flips a coin. (;coin)',
@@ -11,16 +15,13 @@ class CoinFlipCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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);
}
}
module.exports = CoinFlipCommand;
};
+11 -14
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class ComplimentCommand extends commando.Command {
module.exports = class ComplimentCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'compliment',
name: 'compliment',
group: 'response',
memberName: 'compliment',
description: 'Compliments the user of your choice. (;compliment @User)',
@@ -11,21 +11,18 @@ class ComplimentCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
let coin = ["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."];
coin = coin[Math.floor(Math.random() * coin.length)];
if(username === '') {
message.reply(coin);
let thingToCompliment = message.content.split(" ").slice(1).join(" ");
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);
} else {
message.channel.send(username + ", " + coin);
message.channel.send(thingToCompliment + ", " + compliments);
}
}
}
module.exports = ComplimentCommand;
};
File diff suppressed because one or more lines are too long
+12 -11
View File
@@ -1,9 +1,13 @@
const commando = require('discord.js-commando');
class FishyCommand extends commando.Command {
module.exports = class FishyCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'fishy',
name: 'fishy',
aliases: [
'fishing',
'fish'
],
group: 'response',
memberName: 'fishy',
description: 'Catches a fish. (;fishy)',
@@ -11,16 +15,13 @@ class FishyCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let coin = [':fish:', ':tropical_fish:', ':blowfish:'];
coin = coin[Math.floor(Math.random() * coin.length)];
message.channel.send("You caught a: " + coin);
let fish = [':fish:', ':tropical_fish:', ':blowfish:'];
fish = fish[Math.floor(Math.random() * fish.length)];
message.channel.send("You caught a: " + fish);
}
}
module.exports = FishyCommand;
};
+8 -8
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class FortuneCookieCommand extends commando.Command {
module.exports = class FortuneCookieCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'fortune',
name: 'fortune',
aliases: [
'fortunecookie'
],
group: 'response',
memberName: 'fortune',
description: 'Fortune Cookie. (;fortune)',
@@ -11,16 +14,13 @@ class FortuneCookieCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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);
}
}
module.exports = FortuneCookieCommand;
};
+13 -14
View File
@@ -1,9 +1,13 @@
const commando = require('discord.js-commando');
class MotivateCommand extends commando.Command {
module.exports = class MotivateCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'motivate',
name: 'motivate',
aliases: [
'encourage',
'justdoit'
],
group: 'response',
memberName: 'motivate',
description: 'Motivates someone. (;motivate @User)',
@@ -11,21 +15,16 @@ class MotivateCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
let coin = ['https://www.youtube.com/watch?v=ZXsQAXx_ao0'];
coin = coin[Math.floor(Math.random() * coin.length)];
if(username === '') {
message.reply(coin);
let userToMotivate = message.content.split(" ").slice(1).join(" ");
if(userToMotivate === '') {
message.reply('https://www.youtube.com/watch?v=ZXsQAXx_ao0');
} else {
message.channel.send(username + ", " + coin);
message.channel.send(userToMotivate + ", https://www.youtube.com/watch?v=ZXsQAXx_ao0");
}
}
}
module.exports = MotivateCommand;
};
+21 -20
View File
@@ -1,38 +1,39 @@
const commando = require('discord.js-commando');
class RandomNameGen extends commando.Command {
module.exports = class RandomNameGen extends commando.Command {
constructor(Client){
super(Client, {
name: 'name',
name: 'name',
aliases: [
'namegen',
'randomname'
],
group: 'response',
memberName: 'name',
description: 'Generates a random name (;name Male or ;name Female)',
description: 'Generates a random name (;name Male)',
examples: [';name', ';name male', ';name female']
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let randomfirstmale = ["Bob", "Daniel", "Logan", "Chris", "Nathan", "George", "Mart", "Charlie", "Felix", "Ralph", "William", "Max", "Jerry", "Marty", "Joshua", "Cody", "Richard", "Alex", "Alexander", "Jordan", "Zachary", "Bill", "Alfred", "Bruce", "Caiden", "Calvin", "Eric", "Robert", "Mark", "Miles", "Nash", "Ronald", "Ivan", "Edgar", "Royal", "Augustine", "Dominic", "Noel", "Rocky", "Grover", "Paul", "Jeremy", "Stevie", "Brock", "Jc", "Tony", "Enoch", "Zachery", "Harvey", "Gilbert", "Chang", "Emery", "Carroll", "Odell", "Jean", "Archie", "Russ", "Barry", "Lowell", "Jacob", "Riku", "Frederic", "Levi", "Faustino", "Leland", "Domenic", "Irwin", "Moises", "Louie", "Larry", "Victor"];
randomfirstmale = randomfirstmale[Math.floor(Math.random() * randomfirstmale.length)];
let randomfirstfemale = ["Elizabeth", "Chelsey", "Rachel", "Logan", "Alex", "Jordan", "Mary", "Shirley", "Sandy", "Linda", "Audrey", "Autumn", "Gracie", "Grace", "Erin", "Catherine", "Stephanie", "Lucy", "Patty", "Julie", "Christina", "Fiona", "Riley", "Ashley", "Bree", "Lucila", "Wendi", "Evangelina", "Ricki", "Merna", "Tegan", "Venus", "Claris", "Tana", "Sakura", "Edythe", "Adena", "Princess", "Elnora", "Star", "Edyth", "Beverly", "Kelsie", "Letha", "Latisha", "Lolita", "Bernandine", "Jessenia", "Hannah", "Leonore", "Alene", "Fannie", "Bernardine", "Leena", "Tera", "Yvette", "Melisa", "Alissa", "Xiao", "Richelle", "Bridgett", "Sumiko", "Paulette", "Charlott", "Honey", "Veola", "Sherita", "Amanda", "Vannessa", "April", "Ruth"];
randomfirstfemale = randomfirstfemale[Math.floor(Math.random() * randomfirstfemale.length)];
let randomlast = ["Walker", "Tworni", "Ross", "Smith", "Odendahl", "Deere", "Brown", "Williams", "Jones", "Miles", "Moss", "Roberto", "McFly", "McDonald", "Lewis", "Armstrong", "Stevenson", "Schwarzenegger", "Robinson", "Parker", "Piper", "Johnson", "Brantley", "Stewart", "Ree", "Talbot", "Seville", "Peace", "Spielberg", "Baggins", "Wilborn", "Vankirk", "Shireman", "Jimerson", "Masters", "Hack", "Satcher", "Younkin", "Aguila", "Duffey", "Burgin", "Highfall", "Wee", "Solari", "Tomaselli", "Basler", "Difranco", "Latch", "Rives", "Dolan", "Abraham", "Holter", "Portugal", "Lininger", "Holst", "Mccroy", "Follmer", "Hotchkiss", "Gassaway", "Wang", "Agron", "Raasch", "Gourd", "Czaja", "Marquart", "Papadopoulos", "Ringer", "Lax", "Sperling", "Galusha", "Alston"];
randomlast = randomlast[Math.floor(Math.random() * randomlast.length)];
let randomfirstboth = [randomfirstmale, randomfirstfemale]
randomfirstboth = randomfirstboth[Math.floor(Math.random() * randomfirstboth.length)];
let randomFirstMale = ["Bob", "Daniel", "Logan", "Chris", "Nathan", "George", "Mart", "Charlie", "Felix", "Ralph", "William", "Max", "Jerry", "Marty", "Joshua", "Cody", "Richard", "Alex", "Alexander", "Jordan", "Zachary", "Bill", "Alfred", "Bruce", "Caiden", "Calvin", "Eric", "Robert", "Mark", "Miles", "Nash", "Ronald", "Ivan", "Edgar", "Royal", "Augustine", "Dominic", "Noel", "Rocky", "Grover", "Paul", "Jeremy", "Stevie", "Brock", "Jc", "Tony", "Enoch", "Zachery", "Harvey", "Gilbert", "Chang", "Emery", "Carroll", "Odell", "Jean", "Archie", "Russ", "Barry", "Lowell", "Jacob", "Riku", "Frederic", "Levi", "Faustino", "Leland", "Domenic", "Irwin", "Moises", "Louie", "Larry", "Victor"];
randomFirstMale = randomFirstMale[Math.floor(Math.random() * randomFirstMale.length)];
let randomFirstFemale = ["Elizabeth", "Chelsey", "Rachel", "Logan", "Alex", "Jordan", "Mary", "Shirley", "Sandy", "Linda", "Audrey", "Autumn", "Gracie", "Grace", "Erin", "Catherine", "Stephanie", "Lucy", "Patty", "Julie", "Christina", "Fiona", "Riley", "Ashley", "Bree", "Lucila", "Wendi", "Evangelina", "Ricki", "Merna", "Tegan", "Venus", "Claris", "Tana", "Sakura", "Edythe", "Adena", "Princess", "Elnora", "Star", "Edyth", "Beverly", "Kelsie", "Letha", "Latisha", "Lolita", "Bernandine", "Jessenia", "Hannah", "Leonore", "Alene", "Fannie", "Bernardine", "Leena", "Tera", "Yvette", "Melisa", "Alissa", "Xiao", "Richelle", "Bridgett", "Sumiko", "Paulette", "Charlott", "Honey", "Veola", "Sherita", "Amanda", "Vannessa", "April", "Ruth"];
randomFirstFemale = randomFirstFemale[Math.floor(Math.random() * randomFirstFemale.length)];
let randomLast = ["Walker", "Tworni", "Ross", "Smith", "Odendahl", "Deere", "Brown", "Williams", "Jones", "Miles", "Moss", "Roberto", "McFly", "McDonald", "Lewis", "Armstrong", "Stevenson", "Schwarzenegger", "Robinson", "Parker", "Piper", "Johnson", "Brantley", "Stewart", "Ree", "Talbot", "Seville", "Peace", "Spielberg", "Baggins", "Wilborn", "Vankirk", "Shireman", "Jimerson", "Masters", "Hack", "Satcher", "Younkin", "Aguila", "Duffey", "Burgin", "Highfall", "Wee", "Solari", "Tomaselli", "Basler", "Difranco", "Latch", "Rives", "Dolan", "Abraham", "Holter", "Portugal", "Lininger", "Holst", "Mccroy", "Follmer", "Hotchkiss", "Gassaway", "Wang", "Agron", "Raasch", "Gourd", "Czaja", "Marquart", "Papadopoulos", "Ringer", "Lax", "Sperling", "Galusha", "Alston"];
randomLast = randomLast[Math.floor(Math.random() * randomLast.length)];
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);
message.channel.send(randomFirstMale + " " + randomLast);
} else if(message.content.toLowerCase().split(" ").slice(1).includes("female")) {
message.channel.send(randomfirstfemale + " " + randomlast);
message.channel.send(randomFirstFemale + " " + randomLast);
} else {
message.channel.send(randomfirstboth + " " + randomlast);
message.channel.send(randomFirstBoth + " " + randomLast);
}
}
}
module.exports = RandomNameGen;
};
+10 -8
View File
@@ -1,9 +1,14 @@
const commando = require('discord.js-commando');
class OffspringCommand extends commando.Command {
module.exports = class OffspringCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'offspring',
name: 'offspring',
aliases: [
'child',
'baby',
'sex'
],
group: 'response',
memberName: 'offspring',
description: 'Tells you if your new child is a boy or a girl. (;offspring)',
@@ -11,16 +16,13 @@ class OffspringCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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 + "!");
}
}
module.exports = OffspringCommand;
};
+4 -8
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class PotatoCommand extends commando.Command {
module.exports = class PotatoCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'potato',
name: 'potato',
group: 'response',
memberName: 'potato',
description: 'Sends a random Potato picture. (;potato)',
@@ -13,15 +13,11 @@ class PotatoCommand extends commando.Command {
async run(message, args) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
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);
}
}
module.exports = PotatoCommand;
};
+5 -9
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class RandomPun extends commando.Command {
module.exports = class RandomPun extends commando.Command {
constructor(Client){
super(Client, {
name: 'pun',
name: 'pun',
group: 'response',
memberName: 'pun',
description: 'Sends a random pun image. (;pun)',
@@ -11,17 +11,13 @@ class RandomPun extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
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);
}
}
module.exports = RandomPun;
};
+9 -8
View File
@@ -1,9 +1,13 @@
const commando = require('discord.js-commando');
class QuantumCoin extends commando.Command {
module.exports = class QuantumCoin extends commando.Command {
constructor(Client){
super(Client, {
name: 'quantumcoin',
name: 'quantumcoin',
aliases: [
'oddcoin',
'brokencoin'
],
group: 'response',
memberName: 'quantumcoin',
description: 'Flips a coin that lands on nothing. (;quantumcoin)',
@@ -11,16 +15,13 @@ class QuantumCoin extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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);
}
}
module.exports = QuantumCoin;
};
+10 -10
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class RateWaifuCommand extends commando.Command {
module.exports = class RateWaifuCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'ratewaifu',
name: 'ratewaifu',
aliases: [
'waifu'
],
group: 'response',
memberName: 'ratewaifu',
description: 'Rates your Waifu. (;ratewaifu Xiao Pai)',
@@ -11,16 +14,13 @@ class RateWaifuCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
let waifuToRate = message.content.split(" ").slice(1).join(" ");
let percentage = Math.floor(Math.random() * 10) + 1;
message.channel.send("I'd give " + username + " a " + percentage + "/10!");
message.channel.send("I'd give " + waifuToRate + " a " + percentage + "/10!");
}
}
module.exports = RateWaifuCommand;
};
+14 -14
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class RoastMeCommand extends commando.Command {
module.exports = class RoastMeCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'roast',
name: 'roast',
aliases: [
'burn'
],
group: 'response',
memberName: 'roast',
description: 'Roasts the user of your choice. (;roast @User)',
@@ -11,21 +14,18 @@ class RoastMeCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
let coin = ["*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."];
coin = coin[Math.floor(Math.random() * coin.length)];
if(username === '') {
message.reply(coin);
let userToRoast = message.content.split(" ").slice(1).join(" ");
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);
} else {
message.channel.send(username + ", " + coin);
message.channel.send(userToRoast + ", " + roasts);
}
}
}
module.exports = RoastMeCommand;
};
+8 -8
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class RockPaperScissors extends commando.Command {
module.exports = class RockPaperScissors extends commando.Command {
constructor(Client){
super(Client, {
name: 'rps',
name: 'rps',
aliases: [
'rockpaperscissors'
],
group: 'response',
memberName: 'rps',
description: 'Play Rock Paper Scissors (;rps Rock)',
@@ -11,10 +14,9 @@ class RockPaperScissors extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let [rps] = message.content.toLowerCase().split(" ").slice(1);
@@ -56,6 +58,4 @@ class RockPaperScissors extends commando.Command {
message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
}
}
}
module.exports = RockPaperScissors;
};
+10 -9
View File
@@ -1,9 +1,13 @@
const commando = require('discord.js-commando');
class RollChooseCommand extends commando.Command {
module.exports = class RollChooseCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'roll',
name: 'roll',
aliases: [
'randomnumber',
'dice'
],
group: 'response',
memberName: 'roll',
description: 'Rolls a Dice of your choice. (;roll 6)',
@@ -11,16 +15,15 @@ class RollChooseCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let [value] = message.content.split(" ").slice(1);
if(value === undefined) {
let roll = Math.floor(Math.random() * 6) + 1;
message.channel.send("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.send("You rolled a " + roll);
@@ -28,6 +31,4 @@ class RollChooseCommand extends commando.Command {
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)");
}
}
}
module.exports = RollChooseCommand;
};
+14 -11
View File
@@ -1,9 +1,15 @@
const commando = require('discord.js-commando');
class RouletteCommand extends commando.Command {
module.exports = class RouletteCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'roulette',
name: 'roulette',
aliases: [
'randommember',
'randomuser',
'pickmember',
'pickuser'
],
group: 'response',
memberName: 'roulette',
description: 'Chooses a random member. (;roulette Who is the best?)',
@@ -11,18 +17,15 @@ class RouletteCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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(':x: Error! This is a DM!');
} else {
if(message.channel.type !== 'dm') {
message.channel.send("I choose " + message.guild.members.random().displayName + "!");
} else {
message.channel.send(':x: Error! This command does not work in DM!');
}
}
}
module.exports = RouletteCommand;
};
+10 -10
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class ShipCommand extends commando.Command {
module.exports = class ShipCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'ship',
name: 'ship',
aliases: [
'rate'
],
group: 'response',
memberName: 'ship',
description: 'Ships two people. (;ship @Rem and @Nate)',
@@ -11,16 +14,13 @@ class ShipCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let ship = message.content.split(" ").slice(1).join(" ");
let thingToShip = message.content.split(" ").slice(1).join(" ");
let percentage = Math.floor(Math.random() * 100) + 1;
message.channel.send("I'd give " + ship + " a " + percentage + "%!");
message.channel.send("I'd give " + thingToShip + " a " + percentage + "%!");
}
}
module.exports = ShipCommand;
};
+5 -8
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class SlotsCommand extends commando.Command {
module.exports = class SlotsCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'slots',
name: 'slots',
group: 'response',
memberName: 'slots',
description: 'Play slots. (;slots)',
@@ -11,10 +11,9 @@ class SlotsCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let slotThing = [':grapes:', ':tangerine:', ':pear:', ':cherries:'];
@@ -28,6 +27,4 @@ class SlotsCommand extends commando.Command {
message.channel.send(slotOne + '|' + slotTwo + '|' + slotThree + '|' + slotFour + "\nAww... You lost... Guess it's just bad luck, huh?");
}
}
}
module.exports = SlotsCommand;
};
+11 -11
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class VocaloidSongRndm extends commando.Command {
module.exports = class VocaloidSongRndm extends commando.Command {
constructor(Client){
super(Client, {
name: 'vocaloid',
name: 'vocaloid',
aliases: [
'vocaloidsong'
],
group: 'response',
memberName: 'vocaloid',
description: 'Sends a random VOCALOID song. (;vocaloid)',
@@ -11,16 +14,13 @@ class VocaloidSongRndm extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
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.send(coin);
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);
}
}
module.exports = VocaloidSongRndm;
};
+8 -9
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class RandomXiaoPai extends commando.Command {
module.exports = class RandomXiaoPai extends commando.Command {
constructor(Client){
super(Client, {
name: 'xiaopai',
name: 'xiaopai',
aliases: [
'xiao'
],
group: 'response',
memberName: 'xiaopai',
description: 'Sends a random image of Xiao Pai. (;xiaopai)',
@@ -11,17 +14,13 @@ class RandomXiaoPai extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
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);
}
}
module.exports = RandomXiaoPai;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class CuddleCommand extends commando.Command {
module.exports = class CuddleCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'cuddle',
name: 'cuddle',
group: 'roleplay',
memberName: 'cuddle',
description: 'Cuddles someone. (;cuddle @User)',
@@ -11,15 +11,12 @@ class CuddleCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *cuddles* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *cuddles* ' + thingToRoleplay);
}
}
module.exports = CuddleCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class DivorceCommand extends commando.Command {
module.exports = class DivorceCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'divorce',
name: 'divorce',
group: 'roleplay',
memberName: 'divorce',
description: 'Divorces someone. (;divorce @User)',
@@ -11,15 +11,12 @@ class DivorceCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *divorces* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *divorces* ' + thingToRoleplay);
}
}
module.exports = DivorceCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class EatCommand extends commando.Command {
module.exports = class EatCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'eat',
name: 'eat',
group: 'roleplay',
memberName: 'eat',
description: 'Eats something/someone. (;eat @User)',
@@ -11,15 +11,12 @@ class EatCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *eats* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *eats* ' + thingToRoleplay);
}
}
module.exports = EatCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class FalconPunchCommand extends commando.Command {
module.exports = class FalconPunchCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'falconpunch',
name: 'falconpunch',
group: 'roleplay',
memberName: 'falconpunch',
description: 'Falcon Punches someone. (;falconpunch @User)',
@@ -11,15 +11,12 @@ class FalconPunchCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *falcon punches* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *falcon punches* ' + thingToRoleplay);
}
}
module.exports = FalconPunchCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class FistBumpCommand extends commando.Command {
module.exports = class FistBumpCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'fistbump',
name: 'fistbump',
group: 'roleplay',
memberName: 'fistbump',
description: 'Fistbumps someone. (;fistbump @User)',
@@ -11,15 +11,12 @@ class FistBumpCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *fistbumps* ' + username + ' *badalalala* ');
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *fistbumps* ' + thingToRoleplay + ' *badalalala*');
}
}
module.exports = FistBumpCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class HighFivesCommand extends commando.Command {
module.exports = class HighFivesCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'highfive',
name: 'highfive',
group: 'roleplay',
memberName: 'highfive',
description: 'High Fives someone. (;highfive @User)',
@@ -11,15 +11,12 @@ class HighFivesCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *high fives* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *high fives* ' + thingToRoleplay);
}
}
module.exports = HighFivesCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class HitwithShovelCommand extends commando.Command {
module.exports = class HitwithShovelCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'hitwithshovel',
name: 'hitwithshovel',
group: 'roleplay',
memberName: 'hitwithsovel',
description: 'Hits someone with a shovel. (;hitwithshovel @User)',
@@ -11,15 +11,12 @@ class HitwithShovelCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *hits* ' + username + ' *with a shovel* ');
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *hits* ' + thingToRoleplay + ' *with a shovel* ');
}
}
module.exports = HitwithShovelCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class HugCommand extends commando.Command {
module.exports = class HugCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'hug',
name: 'hug',
group: 'roleplay',
memberName: 'hug',
description: 'Hugs someone. (;hug @User)',
@@ -11,15 +11,12 @@ class HugCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *hugs* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *hugs* ' + thingToRoleplay);
}
}
module.exports = HugCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class InhaleCommand extends commando.Command {
module.exports = class InhaleCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'inhale',
name: 'inhale',
group: 'roleplay',
memberName: 'inhale',
description: 'Inhales someone. (;inhale @User)',
@@ -11,15 +11,12 @@ class InhaleCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *inhales* ' + username + ' *but gained no ability...* ');
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *inhales* ' + thingToRoleplay + ' *but gained no ability...* ');
}
}
module.exports = InhaleCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class KillCommand extends commando.Command {
module.exports = class KillCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'kill',
name: 'kill',
group: 'roleplay',
memberName: 'kill',
description: 'Kills someone. (;kill @User)',
@@ -11,15 +11,12 @@ class KillCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *kills* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *kills* ' + thingToRoleplay);
}
}
module.exports = KillCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class KissCommand extends commando.Command {
module.exports = class KissCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'kiss',
name: 'kiss',
group: 'roleplay',
memberName: 'kiss',
description: 'Kisses someone. (;kiss @User)',
@@ -11,15 +11,12 @@ class KissCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *kisses* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *kisses* ' + thingToRoleplay);
}
}
module.exports = KissCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class MarryCommand extends commando.Command {
module.exports = class MarryCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'marry',
name: 'marry',
group: 'roleplay',
memberName: 'marry',
description: 'Marries someone. (;marry @User)',
@@ -11,15 +11,12 @@ class MarryCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *marries* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *marries* ' + thingToRoleplay);
}
}
module.exports = MarryCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class PatCommand extends commando.Command {
module.exports = class PatCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'pat',
name: 'pat',
group: 'roleplay',
memberName: 'pat',
description: 'Pats someone. (;pat @User)',
@@ -11,15 +11,12 @@ class PatCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *pats* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *pats* ' + thingToRoleplay);
}
}
module.exports = PatCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class PokeCommand extends commando.Command {
module.exports = class PokeCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'poke',
name: 'poke',
group: 'roleplay',
memberName: 'poke',
description: 'Pokes someone. (;poke @User)',
@@ -11,15 +11,12 @@ class PokeCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *pokes* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *pokes* ' + thingToRoleplay);
}
}
module.exports = PokeCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class PunchCommand extends commando.Command {
module.exports = class PunchCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'punch',
name: 'punch',
group: 'roleplay',
memberName: 'punch',
description: 'Punches someone. (;punch @User)',
@@ -11,15 +11,12 @@ class PunchCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *punches* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *punches* ' + thingToRoleplay);
}
}
module.exports = PunchCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class SlapCommand extends commando.Command {
module.exports = class SlapCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'slap',
name: 'slap',
group: 'roleplay',
memberName: 'slap',
description: 'Slaps someone. (;slap @User)',
@@ -11,15 +11,12 @@ class SlapCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let username = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *slaps* ' + username);
let thingToRoleplay = message.content.split(" ").slice(1).join(" ");
message.channel.send(message.author + ' *slaps* ' + thingToRoleplay);
}
}
module.exports = SlapCommand;
};
+20 -25
View File
@@ -1,12 +1,16 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
const config = require('../../config.json');
class BotSearchCommand extends commando.Command {
module.exports = class BotSearchCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'botinfo',
name: 'botinfo',
aliases: [
'bot',
'botdata'
],
group: 'search',
memberName: 'botinfo',
description: 'Searches Discord Bots for info on a bot. (;botinfo @Bot)',
@@ -14,44 +18,35 @@ class BotSearchCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
if(message.mentions.users.size === 1) {
let botToFind = message.mentions.users.first().id;
const options = {
method: 'GET',
uri: 'https://bots.discord.pw/api/bots/' + botToFind,
headers: {
'Authorization': config.botskey
},
json: true
}
request(options).then(function (response) {
request
.get('https://bots.discord.pw/api/bots/' + botToFind)
.set({ 'Authorization': config.botskey })
.then(function (response) {
const embed = new Discord.RichEmbed()
.setColor(0x9797FF)
.setAuthor('Discord Bots', 'https://cdn.discordapp.com/icons/110373943822540800/47336ad0631ac7aac0a48a2ba6246c65.jpg')
.setTitle(response.name)
.setTitle(response.body.name)
.setURL('https://bots.discord.pw/')
.setDescription(response.description)
.setDescription(response.body.description)
.addField('**Library:**',
response.library, true)
response.body.library, true)
.addField('**Prefix:**',
response.prefix, true)
response.body.prefix, true)
.addField('**Invite:**',
'[Here](' + response.invite_url + ')', true);
'[Here](' + response.body.invite_url + ')', true);
message.channel.sendEmbed(embed).catch(console.error);
}).catch(function (err) {
message.channel.send(":x: Error! Bot not Found!");
});
} else {
message.channel.send(':x: Either too many or no bots, only mention one bot!');
message.channel.send(':x: Please mention one bot!');
}
}
}
module.exports = BotSearchCommand;
};
+19 -26
View File
@@ -1,12 +1,18 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
const config = require('../../config.json');
class DefineCommand extends commando.Command {
module.exports = class DefineCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'define',
name: 'define',
aliases: [
'definition',
'defineword',
'dictionary',
'wordnik'
],
group: 'search',
memberName: 'define',
description: 'Defines a word. (;define Cat)',
@@ -14,36 +20,23 @@ class DefineCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let definethis = message.content.toLowerCase().split(" ").slice(1).join("%20");
const options = {
method: 'GET',
uri: 'http://api.wordnik.com:80/v4/word.json/' + definethis + '/definitions',
qs: {
limit: 1,
includeRelated: false,
useCanonical: false,
includeTags: false,
api_key: config.wordnikkey
},
json: true
}
request(options).then(function (response) {
let defineThis = message.content.toLowerCase().split(" ").slice(1).join("%20");
request
.get('http://api.wordnik.com:80/v4/word.json/' + defineThis + '/definitions')
.query({ limit: 1, includeRelated: false, useCanonical: false, includeTags: false, api_key: config.wordnikkey })
.then(function (response) {
const embed = new Discord.RichEmbed()
.setColor(0x9797FF)
.setTitle(response[0].word)
.setDescription(response[0].text);
.setTitle(response.body[0].word)
.setDescription(response.body[0].text);
message.channel.sendEmbed(embed).catch(console.error);
}).catch(function (err) {
message.channel.send(":x: Error! Word not Found!");
});
}
}
module.exports = DefineCommand;
};
+9 -9
View File
@@ -1,10 +1,14 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class DiscrimCommand extends commando.Command {
module.exports = class DiscrimCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'discrim',
name: 'discrim',
aliases: [
'discriminator',
'searchdiscrim'
],
group: 'search',
memberName: 'discrim',
description: 'Searches the server for a certain discriminator. (;discrim 8081)',
@@ -12,11 +16,9 @@ class DiscrimCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let userToSearch = message.content.split(" ").slice(1).join(" ");
@@ -30,6 +32,4 @@ class DiscrimCommand extends commando.Command {
message.channel.send(':x: Error! This discriminator is invalid!');
}
}
}
module.exports = DiscrimCommand;
};
+10 -11
View File
@@ -2,10 +2,13 @@ const commando = require('discord.js-commando');
const Discord = require('discord.js');
const weather = require('yahoo-weather');
class ForecastCommand extends commando.Command {
module.exports = class ForecastCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'forecast',
name: 'forecast',
aliases: [
'weatherforecast'
],
group: 'search',
memberName: 'forecast',
description: 'Gets the seven-day forecast for a specified location. (;forecast San Francisco)',
@@ -13,15 +16,13 @@ class ForecastCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let locationtosearch = message.content.split(" ").slice(1).join(" ");
weather(locationtosearch, 'f').then(info => {
let locationToSearch = message.content.split(" ").slice(1).join(" ");
weather(locationToSearch, 'f').then(info => {
const embed = new Discord.RichEmbed()
.setColor(0x0000FF)
.setAuthor(info.title, 'http://media.idownloadblog.com/wp-content/uploads/2013/12/yahoo-weather-213x220.png')
@@ -46,6 +47,4 @@ class ForecastCommand extends commando.Command {
message.channel.send(":x: Error! Make sure you typed the location correctly!");
});
}
}
module.exports = ForecastCommand;
};
+13 -12
View File
@@ -2,10 +2,15 @@ const commando = require('discord.js-commando');
const Discord = require('discord.js');
const imdb = require('imdb-api');
class IMDBCommand extends commando.Command {
module.exports = class IMDBCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'imdb',
name: 'imdb',
aliases: [
'movie',
'tvshow',
'film'
],
group: 'search',
memberName: 'imdb',
description: 'Searches IMDB for a specified movie. (;imdb How to Train Your Dragon)',
@@ -13,17 +18,15 @@ class IMDBCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let querymovie = message.content.split(" ").slice(1).join(" ");
let queryMovie = message.content.split(" ").slice(1).join(" ");
let movie;
imdb.getReq({ name: querymovie }, (err, things) => {
movie = things;
imdb.getReq({ name: queryMovie }, (err, response) => {
movie = response;
if(movie === undefined) {
message.channel.send(":x: Error! Movie not found!");
} else {
@@ -51,6 +54,4 @@ class IMDBCommand extends commando.Command {
}
});
}
}
module.exports = IMDBCommand;
};
+10 -14
View File
@@ -1,30 +1,26 @@
const commando = require('discord.js-commando');
class NeopetCommand extends commando.Command {
module.exports = class NeopetCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'neopet',
name: 'neopet',
group: 'search',
memberName: 'neopet',
description: "Gives a Neopet's image, searchable by ID. (;neopet rjwlsb8k) (;neopet getID for help on getting your Pet's ID)",
examples: [';neopet rjwlsb8k']
description: "Gives a Neopet's image, searchable by ID. (;neopet rjwlsb8k)",
examples: [';neopet rjwlsb8k', ';neopet getID']
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('ATTACH_FILES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'ATTACH_FILES'])) return;
}
console.log("[Command] " + message.content);
let [petID] = message.content.split(" ").slice(1);
if(petID === "getID") {
let petID = message.content.toLowerCase().split(" ").slice(1).join(" ");
if(petID === "getid") {
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.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.")));
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.")));
}
}
}
module.exports = NeopetCommand;
};
+16 -22
View File
@@ -1,12 +1,17 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const config = require('../../config.json');
const request = require('request-promise');
const request = require('superagent');
class OsuCommand extends commando.Command {
module.exports = class OsuCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'osu',
name: 'osu',
aliases: [
'osuuser',
'osudata',
'osuinfo'
],
group: 'search',
memberName: 'osu',
description: 'Searches Osu user data. (;osu dragonfire535)',
@@ -14,25 +19,16 @@ class OsuCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let usernametosearch = message.content.split(" ").slice(1).join(" ");
const options = {
method: 'GET',
uri: 'https://osu.ppy.sh/api/get_user',
qs: {
k: config.osukey,
u: usernametosearch,
type: "string"
},
json: true
}
request(options).then(function (response) {
let usernameToSearch = message.content.split(" ").slice(1).join(" ");
request
.get('https://osu.ppy.sh/api/get_user')
.query({ k: config.osukey, u: usernameToSearch, type: 'string' })
.then(function (response) {
if(response[0] === undefined) {
message.channel.send(":x: Error! User not found!");
} else {
@@ -70,6 +66,4 @@ class OsuCommand extends commando.Command {
message.channel.send(":x: Error! User not Found!");
});
}
}
module.exports = OsuCommand;
};
+507 -763
View File
File diff suppressed because it is too large Load Diff
+11 -12
View File
@@ -2,10 +2,13 @@ const commando = require('discord.js-commando');
const Discord = require('discord.js');
const pokedex = require('./pkdex.json');
class PokedexCommand extends commando.Command {
module.exports = class PokedexCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'pokedex',
name: 'pokedex',
aliases: [
'pokemon'
],
group: 'search',
memberName: 'pokedex',
description: 'Gives the pokedex entry for a Pokemon. (;pokedex Pikachu)',
@@ -13,22 +16,20 @@ class PokedexCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let pokemon = message.content.toLowerCase().split(" ").slice(1).join(" ");
if (pokedex.name[pokemon]) {
const embed = new Discord.RichEmbed()
.setTitle('Information')
.setAuthor(pokedex.name[pokemon], pokedex.sprite[pokemon])
.setAuthor('#' + pokedex.index[pokemon] + " " + pokedex.name[pokemon], 'http://www.serebii.net/pokedex-sm/icon/' + pokedex.index[pokemon] + '.png')
.setColor(0xFF0000)
.setDescription(pokedex.species[pokemon])
.setFooter(pokedex.dexname, pokedex.dexicon)
.setThumbnail(pokedex.picture[pokemon])
.setFooter("Pokédex", "http://cdn.bulbagarden.net/upload/thumb/3/36/479Rotom-Pokédex.png/250px-479Rotom-Pokédex.png")
.setThumbnail('http://www.serebii.net/sunmoon/pokemon/' + pokedex.index[pokemon] + '.png')
.addField('Entry',
pokedex.entry[pokemon])
.addField('Type',
@@ -38,6 +39,4 @@ class PokedexCommand extends commando.Command {
message.channel.send(":x: This Pokémon either doesn't exist, or isn't implemented yet.");
}
}
}
module.exports = PokedexCommand;
};
+22 -20
View File
@@ -2,10 +2,15 @@ const commando = require('discord.js-commando');
const Discord = require('discord.js');
const urban = require('urban');
class UrbanDictionary extends commando.Command {
module.exports = class UrbanDictionary extends commando.Command {
constructor(Client){
super(Client, {
name: 'urban',
name: 'urban',
aliases: [
'urbandictionary',
'urbandefine',
'urbandefinition'
],
group: 'search',
memberName: 'urban',
description: 'Searches Urban Dictionary. (;urban Cat)',
@@ -13,39 +18,36 @@ class UrbanDictionary extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let wordtodefine = message.content.split(" ").slice(1).join(" ");
urban(wordtodefine).first(function(json) {
if(json === undefined) {
let wordToDefine = message.content.split(" ").slice(1).join(" ");
urban(wordToDefine).first(function(response) {
if(response === undefined) {
message.channel.send(":x: Error! Word not found!");
} else if(json.definition === '') {
} else if(response.definition === '') {
message.channel.send(":x: Error! Word has no definition!");
} else if(json.example !== '') {
} else if(response.example !== '') {
const embed = new Discord.RichEmbed()
.setColor(0x32a8f0)
.setAuthor('Urban Dictionary', 'http://a1.mzstatic.com/eu/r30/Purple71/v4/66/54/68/6654683f-cacd-4a55-1784-f14257f77874/icon175x175.png')
.setURL(json.permalink)
.setTitle(json.word)
.setDescription(json.definition.substr(0, 1900) + ' [Read the Rest Here!](' + json.permalink + ')')
.setURL(response.permalink)
.setTitle(response.word)
.setDescription(response.definition.substr(0, 1900) + ' [Read the Rest Here!](' + response.permalink + ')')
.addField('**Example:**',
json.example.substr(0, 1900));
response.example.substr(0, 1900));
message.channel.sendEmbed(embed).catch(console.error);
} else {
const embed = new Discord.RichEmbed()
.setColor(0x32a8f0)
.setAuthor('Urban Dictionary', 'http://a1.mzstatic.com/eu/r30/Purple71/v4/66/54/68/6654683f-cacd-4a55-1784-f14257f77874/icon175x175.png')
.setURL(json.permalink)
.setTitle(json.word)
.setDescription(json.definition.substr(0, 1900) + ' [Read the Rest Here!](' + json.permalink + ')');
.setURL(response.permalink)
.setTitle(response.word)
.setDescription(response.definition.substr(0, 1900) + ' [Read the Rest Here!](' + response.permalink + ')');
message.channel.sendEmbed(embed).catch(console.error);
}
});
}
}
module.exports = UrbanDictionary;
};
+21 -33
View File
@@ -1,12 +1,12 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
const config = require('../../config.json');
class WattpadCommand extends commando.Command {
module.exports = class WattpadCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'wattpad',
name: 'wattpad',
group: 'search',
memberName: 'wattpad',
description: 'Searches Wattpad for a specified book. (;wattpad Heroes of Dreamland)',
@@ -14,50 +14,38 @@ class WattpadCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let querybook = message.content.split(" ").slice(1).join(" ");
const options = {
method: 'GET',
uri: 'https://api.wattpad.com:443/v4/stories',
headers: {
'Authorization': 'Basic ' + config.wattpadkey
},
qs: {
query: querybook,
limit: 1
},
json: true
}
request(options).then(function (response) {
let queryBook = message.content.split(" ").slice(1).join(" ");
request
.get('https://api.wattpad.com:443/v4/stories')
.set({ 'Authorization': 'Basic ' + config.wattpadkey })
.query({ query: queryBook, limit: 1 })
.then(function (response) {
const embed = new Discord.RichEmbed()
.setColor(0xF89C34)
.setAuthor('Wattpad', 'http://www.selfpubtoolbox.com/wp-content/uploads/2015/05/a6044fd3a88acd5043860484db972ca6.png')
.setURL(response.stories[0].url)
.setTitle(response.stories[0].title)
.setDescription(response.stories[0].description.substr(0, 1500) + " [Read the Rest Here!](" + response.stories[0].url + ")")
.setURL(response.body.stories[0].url)
.setTitle(response.body.stories[0].title)
.setDescription(response.body.stories[0].description.substr(0, 1500) + " [Read the Rest Here!](" + response.body.stories[0].url + ")")
.addField('**Author:**',
response.stories[0].user, true)
response.body.stories[0].user, true)
.addField('**Parts:**',
response.stories[0].numParts, true)
response.body.stories[0].numParts, true)
.addField('**Created On:**',
response.stories[0].createDate, true)
response.body.stories[0].createDate, true)
.addField('**Votes:**',
response.stories[0].voteCount, true)
response.body.stories[0].voteCount, true)
.addField('**Reads:**',
response.stories[0].readCount, true)
response.body.stories[0].readCount, true)
.addField('**Comments:**',
response.stories[0].commentCount, true);
response.body.stories[0].commentCount, true);
message.channel.sendEmbed(embed).catch(console.error);
}).catch(function (err) {
message.channel.send(":x: Error! Book not Found!");
});
}
}
module.exports = WattpadCommand;
};
+7 -11
View File
@@ -2,10 +2,10 @@ const commando = require('discord.js-commando');
const Discord = require('discord.js');
const weather = require('yahoo-weather');
class WeatherCommand extends commando.Command {
module.exports = class WeatherCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'weather',
name: 'weather',
group: 'search',
memberName: 'weather',
description: 'Searches weather for a specified location. (;weather San Francisco)',
@@ -13,15 +13,13 @@ class WeatherCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let locationtosearch = message.content.split(" ").slice(1).join(" ");
weather(locationtosearch, 'f').then(info => {
let locationToSearch = message.content.split(" ").slice(1).join(" ");
weather(locationToSearch, 'f').then(info => {
const embed = new Discord.RichEmbed()
.setColor(0x0000FF)
.setAuthor(info.title, 'http://media.idownloadblog.com/wp-content/uploads/2013/12/yahoo-weather-213x220.png')
@@ -56,6 +54,4 @@ class WeatherCommand extends commando.Command {
message.channel.send(":x: Error! Make sure you typed the location correctly!");
});
}
}
module.exports = WeatherCommand;
};
+16 -23
View File
@@ -1,35 +1,30 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
class WikipediaCommand extends commando.Command {
module.exports = class WikipediaCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'wikipedia',
name: 'wikipedia',
group: 'search',
memberName: 'wikipedia',
description: 'Searches Wikipedia for something. (;wikipedia Cat **Note: CAsE SenSiTiVe!**)',
description: 'Searches Wikipedia for something. (;wikipedia Cat)',
examples: [';wikipedia Cat']
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let wikied = message.content.split(" ").slice(1).join("%20");
const options = {
method: 'GET',
uri: "https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&titles=" + wikied + "&exintro=&explaintext=&redirects=&formatversion=2",
json: true
}
request(options).then(function (response) {
let description = response.query.pages[0].extract;
let name = response.query.pages[0].title;
wikied = wikied.replace(")", "%29");
let thingToSearch = message.content.split(" ").slice(1).join("%20");
request
.get("https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&titles=" + thingToSearch + "&exintro=&explaintext=&redirects=&formatversion=2")
.then(function (response) {
let description = response.body.query.pages[0].extract;
let name = response.body.query.pages[0].title;
thingToSearch = thingToSearch.split(")").join("%29");
if(description === undefined) {
message.channel.send(":x: Error! Entry Not Found!");
} else {
@@ -38,15 +33,13 @@ class WikipediaCommand extends commando.Command {
const embed = new Discord.RichEmbed()
.setColor(0xE7E7E7)
.setTitle(name)
.setURL("https://en.wikipedia.org/wiki/" + wikied)
.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 + "\n\n" + "[Read the Rest Here](https://en.wikipedia.org/wiki/" + wikied + ")");
.setDescription(description + "[Read the Rest Here](https://en.wikipedia.org/wiki/" + thingToSearch + ")");
message.channel.sendEmbed(embed).catch(console.error);
}
}).catch(function (err) {
message.channel.send(":x: Error! Entry Not Found!");
});
}
}
module.exports = WikipediaCommand;
};
+20 -30
View File
@@ -1,12 +1,15 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
const config = require('../../config.json');
class YouTubeCommand extends commando.Command {
module.exports = class YouTubeCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'youtube',
name: 'youtube',
aliases: [
'video'
],
group: 'search',
memberName: 'youtube',
description: 'Searches YouTube for a video. (;youtube video)',
@@ -14,43 +17,30 @@ class YouTubeCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let videotosearch = message.content.split(" ").slice(1).join("-");
const options = {
method: 'GET',
uri: 'https://www.googleapis.com/youtube/v3/search',
qs: {
part: 'snippet',
type: 'video',
maxResults: 1,
q: videotosearch,
key: config.youtubekey
},
json: true
}
request(options).then(function (response) {
if(response.items[0].snippet === undefined) {
let videoToSearch = message.content.split(" ").slice(1).join("-");
request
.get('https://www.googleapis.com/youtube/v3/search')
.query({ part: 'snippet', type: 'video', maxResults: 1, q: videoToSearch, key: config.youtubekey })
.then(function (response) {
if(response.body.items[0].snippet === undefined) {
message.channel.send(':x: Error! No Video Found!');
} else {
const embed = new Discord.RichEmbed()
.setColor(0xDD2825)
.setTitle(response.items[0].snippet.title)
.setDescription(response.items[0].snippet.description)
.setAuthor('YouTube - ' + response.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.items[0].id.videoId)
.setThumbnail(response.items[0].snippet.thumbnails.default.url);
.setTitle(response.body.items[0].snippet.title)
.setDescription(response.body.items[0].snippet.description)
.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).catch(console.error);
}
}).catch(function (err) {
message.channel.send(":x: Error! An error has occurred! Try again (if this continues to occur, the daily quota may have been reached).");
});
}
}
module.exports = YouTubeCommand;
};
+21 -28
View File
@@ -1,11 +1,11 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
const request = require('request-promise');
const request = require('superagent');
class YuGiOhCommand extends commando.Command {
module.exports = class YuGiOhCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'yugioh',
name: 'yugioh',
group: 'search',
memberName: 'yugioh',
description: 'Gets info on a Yu-Gi-Oh! Card. (;yugioh Blue-Eyes White Dragon)',
@@ -13,53 +13,46 @@ class YuGiOhCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let cardname = message.content.split(" ").slice(1).join("%20");
const options = {
method: 'GET',
uri: 'http://yugiohprices.com/api/card_data/' + cardname,
json: true
}
request(options).then(function (response) {
let cardName = message.content.split(" ").slice(1).join("%20");
request
.get('http://yugiohprices.com/api/card_data/' + cardName)
.then(function (response) {
if(response.data.card_type === 'monster') {
const embed = new Discord.RichEmbed()
.setColor(0xBE5F1F)
.setTitle(response.data.name)
.setDescription(response.data.text)
.setTitle(response.body.data.name)
.setDescription(response.body.data.text)
.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.data.card_type, true)
response.body.data.card_type, true)
.addField('**Species:**',
response.data.type, true)
response.body.data.type, true)
.addField('**Attribute:**',
response.data.family, true)
response.body.data.family, true)
.addField('**ATK:**',
response.data.atk, true)
response.body.data.atk, true)
.addField('**DEF:**',
response.data.def, true)
response.body.data.def, true)
.addField('**Level:**',
response.data.level, true);
response.body.data.level, true);
message.channel.sendEmbed(embed).catch(console.error);
} else {
const embed = new Discord.RichEmbed()
.setColor(0xBE5F1F)
.setTitle(response.data.name)
.setDescription(response.data.text)
.setTitle(response.body.data.name)
.setDescription(response.body.data.text)
.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.data.card_type, true);
response.data.body.card_type, true);
message.channel.sendEmbed(embed).catch(console.error);
}
}).catch(function (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!");
});
}
}
module.exports = YuGiOhCommand;
};
+5 -8
View File
@@ -1,10 +1,10 @@
const commando = require('discord.js-commando');
const stringToBinary = require('string-to-binary');
class BinaryCommand extends commando.Command {
module.exports = class BinaryCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'binary',
name: 'binary',
group: 'textedit',
memberName: 'binary',
description: 'Converts text to binary. (;binary This text)',
@@ -12,15 +12,12 @@ class BinaryCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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!'));
}
}
module.exports = BinaryCommand;
};
+5 -8
View File
@@ -1,10 +1,10 @@
const commando = require('discord.js-commando');
const cowsay = require('cowsay');
class CowsayCommand extends commando.Command {
module.exports = class CowsayCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'cowsay',
name: 'cowsay',
group: 'textedit',
memberName: 'cowsay',
description: 'Converts text to cowsay. (;cowsay This text)',
@@ -12,10 +12,9 @@ class CowsayCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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(" ") === "") {
@@ -31,6 +30,4 @@ class CowsayCommand extends commando.Command {
});
}
}
}
module.exports = CowsayCommand;
};
+8 -12
View File
@@ -1,10 +1,10 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class EmbedCommand extends commando.Command {
module.exports = class EmbedCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'embed',
name: 'embed',
group: 'textedit',
memberName: 'embed',
description: 'Sends a message in an embed. (;embed This is an example.)',
@@ -12,27 +12,23 @@ class EmbedCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
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 === "") {
let embedMessage = message.content.split(" ").slice(1).join(" ");
if(embedMessage === "") {
message.channel.send(":x: Error! Nothing to embed!");
} else {
const embed = new Discord.RichEmbed()
.setAuthor(message.author.username, message.author.avatarURL)
.setColor(0x00AE86)
.setTimestamp()
.setDescription(embedmessage);
.setDescription(embedMessage);
message.channel.sendEmbed(embed).catch(console.error);
if (message.channel.type === 'dm') return;
message.delete();
}
}
}
module.exports = EmbedCommand;
};
+8 -8
View File
@@ -1,10 +1,13 @@
const commando = require('discord.js-commando');
const morse = require('morse');
class MorseCommand extends commando.Command {
module.exports = class MorseCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'morse',
name: 'morse',
aliases: [
'morsecode'
],
group: 'textedit',
memberName: 'morse',
description: 'Translates text to and from morse code. (;morse encode This is Morse Code.)',
@@ -12,10 +15,9 @@ class MorseCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let [methodToUse] = message.content.toLowerCase().split(" ").slice(1);
@@ -30,6 +32,4 @@ class MorseCommand extends commando.Command {
message.channel.send(":x: Error! Method not set/not correct! Use either encode or decode.");
}
}
}
module.exports = MorseCommand;
};
+12 -11
View File
@@ -1,10 +1,14 @@
const commando = require('discord.js-commando');
const pirateSpeak = require('pirate-speak');
class PirateCommand extends commando.Command {
module.exports = class PirateCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'pirate',
name: 'pirate',
aliases: [
'piratespeak',
'yarr'
],
group: 'textedit',
memberName: 'pirate',
description: 'Talk like a pirate! (;pirate This is being said like a pirate!)',
@@ -12,15 +16,14 @@ class PirateCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let messagecontent = message.content.split(" ").slice(1).join(" ");
let pirate = pirateSpeak.translate(messagecontent);
if(messagecontent === "") {
let turnToPirate = message.content.split(" ").slice(1).join(" ");
let pirate = pirateSpeak.translate(turnToPirate);
if(turnToPirate === "") {
message.channel.send(":x: Error! Nothing to translate!");
} else {
if(pirate.length > 1950) {
@@ -30,6 +33,4 @@ class PirateCommand extends commando.Command {
}
}
}
}
module.exports = PirateCommand;
};
+8 -14
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class ReverseCommand extends commando.Command {
module.exports = class ReverseCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'reverse',
name: 'reverse',
group: 'textedit',
memberName: 'reverse',
description: 'Reverses text (;reverse This text please)',
@@ -11,23 +11,17 @@ class ReverseCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
function reverseString(str) {
return str.split("").reverse().join("");
}
let messagecontent = message.content.split(" ").slice(1).join(" ");
if(messagecontent === "") {
let stringToReverse = message.content.split(" ").slice(1).join(" ");
if(stringToReverse === "") {
message.channel.send(":x: Error! Nothing to reverse!");
} else {
let reversed = reverseString(messagecontent);
let reversed = stringToReverse.split("").reverse().join("");
message.channel.send(reversed);
}
}
}
module.exports = ReverseCommand;
};
+16 -19
View File
@@ -1,11 +1,14 @@
const commando = require('discord.js-commando');
const request = require('request-promise');
const request = require('superagent');
const config = require('../../config.json');
class RinSayCommand extends commando.Command {
module.exports = class RinSayCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'rin',
name: 'rin',
aliases: [
'rinsay'
],
group: 'textedit',
memberName: 'rin',
description: "Posts a message to the Rin webhook in Heroes of Dreamland. (;rin Hey guys!)",
@@ -16,28 +19,22 @@ class RinSayCommand extends commando.Command {
return this.client.isOwner(msg.author);
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let rinContent = message.content.split(" ").slice(1).join(" ");
const sendPOST = {
method: 'POST',
uri: config.webhook,
body: {
content: rinContent
},
json: true
}
request(sendPOST).then(function (parsedBody) {
if(message.channel.type === 'dm') return;
request
.post(config.webhook)
.send({ content: rinContent })
.then(function (parsedBody) {
message.channel.send('Message sent to the Rin Webhook!');
if(message.content.type === 'dm') return;
message.delete();
}).catch(function (err) {
message.channel.send(':x: Error! Message failed to send! Check the logs for details.');
console.log(err);
});
}
}
module.exports = RinSayCommand;
};
+8 -8
View File
@@ -1,10 +1,13 @@
const commando = require('discord.js-commando');
const hepburn = require('hepburn');
class RomajiCommand extends commando.Command {
module.exports = class RomajiCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'romaji',
name: 'romaji',
aliases: [
'romajify'
],
group: 'textedit',
memberName: 'romaji',
description: 'Convert Hiragana and Katakana to Romaji (;romaji ひらがな)',
@@ -12,10 +15,9 @@ class RomajiCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let romajify = message.content.split(" ").slice(1).join(" ");
@@ -30,6 +32,4 @@ class RomajiCommand extends commando.Command {
message.channel.send(":x: Error! Message contains no Kana!\n:notepad_spiral: Note: You cannot use this command on Kanji!");
}
}
}
module.exports = RomajiCommand;
};
+13 -11
View File
@@ -1,9 +1,14 @@
const commando = require('discord.js-commando');
class SayCommand extends commando.Command {
module.exports = class SayCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'say',
name: 'say',
aliases: [
'copy',
'repeat',
'parrot'
],
group: 'textedit',
memberName: 'say',
description: 'Make XiaoBot say what you wish. (;say I can talk!)',
@@ -11,21 +16,18 @@ class SayCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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 === "") {
let copycat = message.content.split(" ").slice(1).join(" ");
if(copycat === "") {
message.channel.send(":x: Error! Nothing to say!");
} else {
message.channel.send(Copycat);
message.channel.send(copycat);
if (message.channel.type === 'dm') return;
message.delete();
}
}
}
module.exports = SayCommand;
};
+13 -16
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class ShuffleCommand extends commando.Command {
module.exports = class ShuffleCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'shuffle',
name: 'shuffle',
group: 'textedit',
memberName: 'shuffle',
description: 'Shuffles text (;shuffle This Text)',
@@ -11,30 +11,27 @@ class ShuffleCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
String.prototype.shuffle = function () {
var a = this.split(""),
let a = this.split(""),
n = a.length;
for(var i = n - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var tmp = a[i];
for(let i = n - 1; i > 0; i--) {
let j = Math.floor(Math.random() * (i + 1));
let tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}
return a.join("");
}
let shuffled = message.content.split(" ").slice(1).join(" ");
if(shuffled === '') {
};
let thingToShuffle = message.content.split(" ").slice(1).join(" ");
if(thingToShuffle === '') {
message.channel.send(":x: Error! Nothing to shuffle!");
} else {
message.channel.send(shuffled.shuffle());
message.channel.send(thingToShuffle.shuffle());
}
}
}
module.exports = ShuffleCommand;
};
+13 -17
View File
@@ -3,51 +3,47 @@ const Discord = require('discord.js');
const translate = require('google-translate-api');
const languages = require('./languages.json');
class TranslateCommand extends commando.Command {
module.exports = class TranslateCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'translate',
name: 'translate',
group: 'textedit',
memberName: 'translate',
description: 'Translates text to a given language. (;translate ja Give me the money!) (;translate list to see avaliable language codes!)',
description: 'Translates text to a given language. (;translate ja Give me the money!)',
examples: [';translate ja Give me the the money!', ';translate list']
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
let [languageto] = message.content.toLowerCase().split(" ").slice(1);
let messagecontent = message.content.split(" ").slice(2).join(" ");
let thingToTranslate = message.content.split(" ").slice(2).join(" ");
if(languageto === "list") {
message.channel.send("af': 'Afrikaans\nsq': 'Albanian'\n'ar': 'Arabic\nhy': 'Armenian\naz': 'Azerbaijani\neu': 'Basque\nbe': 'Belarusian\nbn': 'Bengali\nbs': 'Bosnian\nbg': 'Bulgarian\nca': 'Catalan\nceb': 'Cebuano\nny': 'Chichewa\nzh-cn': 'Chinese Simplified\nzh-tw': 'Chinese Traditional\nco': 'Corsican\nhr': 'Croatian\ncs': 'Czech\nda': 'Danish\nnl': 'Dutch\nen': 'English\neo': 'Esperanto\net': 'Estonian\ntl': 'Filipino\nfi': 'Finnish\nfr': 'French\nfy': 'Frisian\ngl': 'Galician\nka': 'Georgian\nde': 'German\nel': 'Greek\ngu': 'Gujarati\nht': 'Haitian Creole\nha': 'Hausa\nhaw': 'Hawaiian\niw': 'Hebrew\nhi': 'Hindi\nhmn': 'Hmong\nhu': 'Hungarian\nis': 'Icelandic\nig': 'Igbo\nid': 'Indonesian\nga': 'Irish\nit': 'Italian\nja': 'Japanese\njw': 'Javanese\nkn': 'Kannada\nkk': 'Kazakh\nkm': 'Khmer\nko': 'Korean\nku': 'Kurdish (Kurmanji)\nky': 'Kyrgyz\nlo': 'Lao\nla': 'Latin\nlv': 'Latvian\nlt': 'Lithuanian\nlb': 'Luxembourgish\nmk': 'Macedonian\nmg': 'Malagasy\nms': 'Malay\nml': 'Malayalam\nmt': 'Maltese\nmi': 'Maori\nmr': 'Marathi\nmn': 'Mongolian\nmy': 'Myanmar (Burmese)\nne': 'Nepali\nno': 'Norwegian\nps': 'Pashto\nfa': 'Persian\npl': 'Polish\npt': 'Portuguese\nma': 'Punjabi\nro': 'Romanian\nru': 'Russian\nsm': 'Samoan\ngd': 'Scots Gaelic\nsr': 'Serbian\nst': 'Sesotho\nsn': 'Shona\nsd': 'Sindhi\nsi': 'Sinhala\nsk': 'Slovak\nsl': 'Slovenian\nso': 'Somali\nes': 'Spanish\nsu': 'Sudanese\nsw': 'Swahili\nsv': 'Swedish\ntg': 'Tajik\nta': 'Tamil\nte': 'Telugu\nth': 'Thai\ntr': 'Turkish\nuk': 'Ukrainian\nur': 'Urdu\nuz': 'Uzbek\nvi': 'Vietnamese\ncy': 'Welsh\nxh': 'Xhosa\nyi': 'Yiddish\nyo': 'Yoruba\nzu': 'Zulu'");
} else if(languages.entries[languageto]) {
if(messagecontent === "") {
if(thingToTranslate === "") {
message.channel.send(":x: Error! Nothing to translate!");
} else if(messagecontent.length > 200) {
} else if(thingToTranslate.length > 200) {
message.channel.send(":x: Error! Please keep translations below 200 characters!");
} else {
translate(messagecontent, {to: languageto}).then(res => {
translate(thingToTranslate, {to: languageto}).then(res => {
let languagefrom = res.from.language.iso.toLowerCase();
const embed = new Discord.RichEmbed()
.setColor(0x00AE86)
.addField('Input (From: ' + languages.entries[languagefrom] + '):',
messagecontent)
thingToTranslate)
.addField('Translation (To: ' + languages.entries[languageto] + '):',
res.text);
message.channel.sendEmbed(embed).catch(console.error);
}).catch(err => {
message.channel.send(":x: Error!");
message.channel.send(":x: Error! Something went wrong!");
});
}
} else {
message.channel.send(":x: Error! Language not found!");
message.channel.send(":x: Error! Language not found! Use `;translate list` to view a list of translate codes!");
}
}
}
module.exports = TranslateCommand;
};
+14 -25
View File
@@ -1,11 +1,11 @@
const commando = require('discord.js-commando');
const request = require('request-promise');
const request = require('superagent');
const config = require('../../config.json');
class YodaCommand extends commando.Command {
module.exports = class YodaCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'yoda',
name: 'yoda',
group: 'textedit',
memberName: 'yoda',
description: 'Converts text to Yoda Speak. (;yoda This is Yoda.)',
@@ -13,39 +13,28 @@ class YodaCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
let yodaspeak = message.content.split(" ").slice(1).join(" ");
if(yodaspeak === "") {
let turnToYoda = message.content.split(" ").slice(1).join(" ");
if(turnToYoda === "") {
message.channel.send(':x: Error! Nothing to translate!');
} else {
const options = {
method: 'GET',
uri: 'https://yoda.p.mashape.com/yoda',
qs: {
sentence: yodaspeak
},
headers: {
'X-Mashape-Key': config.mashapekey,
'Accept': "text/plain"
},
json: true
}
request(options).then(function (response) {
request
.get('https://yoda.p.mashape.com/yoda')
.set({ 'X-Mashape-Key': config.mashapekey, 'Accept': 'text/plain' })
.query({ sentence: turnToYoda })
.then(function (response) {
if(response === undefined) {
message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.');
} else {
message.channel.send(response).catch(error => message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
message.channel.send(response.body).catch(error => message.channel.send(':x: Error! Something went wrong! Keep it simple to avoid this error.'));
}
}).catch(function (err) {
message.channel.send(":x: Error! Unknown Error. Try again later!");
});
}
}
}
module.exports = YodaCommand;
};
+5 -8
View File
@@ -1,10 +1,10 @@
const commando = require('discord.js-commando');
const zalgo = require('zalgolize');
class ZalgoCommand extends commando.Command {
module.exports = class ZalgoCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'zalgo',
name: 'zalgo',
group: 'textedit',
memberName: 'zalgo',
description: 'Zalgoizes Text (;zalgo This Text)',
@@ -12,10 +12,9 @@ class ZalgoCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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(" "));
@@ -27,6 +26,4 @@ class ZalgoCommand extends commando.Command {
message.channel.send(zalgoified);
}
}
}
module.exports = ZalgoCommand;
};
+7 -10
View File
@@ -1,9 +1,9 @@
const commando = require('discord.js-commando');
class AvatarCommand extends commando.Command {
module.exports = class AvatarCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'avatar',
name: 'avatar',
group: 'userinfo',
memberName: 'avatar',
description: "Gives a link to someone's avatar. (;avatar @User)",
@@ -11,22 +11,19 @@ class AvatarCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
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: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if(message.mentions.users.first().avatarURL === null) {
message.channel.send(":x: This person has no avatar!");
message.channel.send(":x: Error! This person has no avatar!");
} else {
message.channel.send(message.mentions.users.first().avatarURL);
}
}
}
}
module.exports = AvatarCommand;
};
+16 -16
View File
@@ -1,10 +1,15 @@
const commando = require('discord.js-commando');
const Discord = require('discord.js');
class UserInfoCommand extends commando.Command {
module.exports = class UserInfoCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'user',
name: 'user',
aliases: [
'userinfo',
'member',
'memberinfo'
],
group: 'userinfo',
memberName: 'user',
description: "Gives some info on a user. (;user @User)",
@@ -12,17 +17,12 @@ class UserInfoCommand extends commando.Command {
});
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
}
console.log("[Command] " + message.content);
if (message.channel.type === 'dm') {
message.channel.send(":x: This is a DM!");
} else {
let member = message.guild.member(message.mentions.users.first());
if (message.channel.type !== 'dm') {
let stat;
switch (message.mentions.users.first().presence.status) {
case "online":
@@ -54,7 +54,7 @@ class UserInfoCommand extends commando.Command {
break;
}
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Either too many or no members, only mention one person!');
message.channel.send(':x: Error! Please mention one user!');
} else {
if (message.mentions.users.first().presence.game === null) {
const embed = new Discord.RichEmbed()
@@ -67,7 +67,7 @@ class UserInfoCommand extends commando.Command {
.addField('**Joined Discord On:**',
message.mentions.users.first().createdAt, true)
.addField('**Joined Server On:**',
member.joinedAt, true)
message.guild.member(message.mentions.users.first()).joinedAt, true)
.addField('**Status:**',
stat, true)
.addField('**Playing:**',
@@ -84,7 +84,7 @@ class UserInfoCommand extends commando.Command {
.addField('**Joined Discord On:**',
message.mentions.users.first().createdAt, true)
.addField('**Joined Server On:**',
member.joinedAt, true)
message.guild.member(message.mentions.users.first()).joinedAt, true)
.addField('**Status:**',
stat, true)
.addField('**Playing:**',
@@ -92,8 +92,8 @@ class UserInfoCommand extends commando.Command {
message.channel.sendEmbed(embed).catch(console.error);
}
}
} else {
message.channel.send(":x: Error! This command does not work in DM!");
}
}
}
module.exports = UserInfoCommand;
};
+8 -8
View File
@@ -1,9 +1,12 @@
const commando = require('discord.js-commando');
class ServersCommand extends commando.Command {
module.exports = class ServersCommand extends commando.Command {
constructor(Client){
super(Client, {
name: 'servers',
name: 'servers',
aliases: [
'serverlist'
],
group: 'util',
memberName: 'servers',
description: "Sends a list of all server names and IDs to the log.",
@@ -14,15 +17,12 @@ class ServersCommand extends commando.Command {
return this.client.isOwner(msg.author);
}
async run(message, args) {
async run(message) {
if(message.channel.type !== 'dm') {
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
if(!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log("[Command] " + message.content);
console.log(this.client.guilds.array().length + " Servers: " + this.client.guilds.map(g => g.name + " (" + g.id + ")").join(", "));
message.channel.send("Sent the information to the console!");
}
}
module.exports = ServersCommand;
};
+20 -50
View File
@@ -1,7 +1,7 @@
const Discord = require('discord.js');
const commando = require('discord.js-commando');
const config = require('./config.json');
const request = require('request-promise');
const request = require('superagent');
const clevusers = require('./clevusers.json');
const client = new commando.Client({
commandPrefix: ';',
@@ -43,10 +43,6 @@ client.on('message', (message) => {
console.log("[Command] " + message.content);
message.channel.send("Calm down! ┬─┬ ( ゜-゜ノ)");
}
if(message.content.includes(":Swagolor:")) {
if(message.guild.id !== config.server) return;
message.react(message.guild.emojis.get('254827709459333120'));
}
if (message.content.startsWith("<@" + client.user.id + ">")){
if(message.guild.id === config.server || message.author.id === config.owner || message.guild.id === config.personalServer) {
console.log("[Cleverbot] " + message.content);
@@ -79,35 +75,22 @@ client.on('guildMemberRemove', member => {
client.on('guildCreate', guild => {
console.log("[Guild] I have joined the guild: " + guild.name + ", " + guild.owner.user.username + " (" + guild.id + ")!");
client.guilds.get(config.server).channels.get('265503171835592704').send("I have joined the guild: " + guild.name + " (Owner: " + guild.owner.user.username + ")!");
client.guilds.get(config.server).channels.get(config.announcementChannel).send("I have joined the guild: " + guild.name + " (Owner: " + guild.owner.user.username + ")!");
client.shard.fetchClientValues('guilds.size').then(results => {
console.log("[Guild Count] " + results.reduce((prev, val) => prev + val, 0));
const carbonPOST = {
method: 'POST',
uri: 'https://www.carbonitex.net/discord/data/botdata.php',
body: {
key: config.carbonkey,
servercount: results.reduce((prev, val) => prev + val, 0)
},
json: true
}
const DBotsPOST = {
method: 'POST',
uri: 'https://bots.discord.pw/api/bots/' + config.botid + '/stats',
body: {
server_count: results.reduce((prev, val) => prev + val, 0)
},
headers: {
'Authorization': config.botskey
},
json: true
}
request(carbonPOST).then(function (parsedBody) {
request
.post('https://www.carbonitex.net/discord/data/botdata.php')
.send({ key: config.carbonkey, servercount: results.reduce((prev, val) => prev + val, 0) })
.then(function (parsedBody) {
console.log('[Carbon] Successfully posted to Carbon.');
}).catch(function (err) {
console.log("[Carbon] Failed to post to Carbon.");
});
request(DBotsPOST).then(function (parsedBody) {
request
.post('https://bots.discord.pw/api/bots/' + config.botid + '/stats')
.set({ 'Authorization': config.botskey })
.send({ server_count: results.reduce((prev, val) => prev + val, 0) })
.then(function (parsedBody) {
console.log('[Discord Bots] Successfully posted to Discord Bots.');
}).catch(function (err) {
console.log("[Discord Bots] Failed to post to Discord Bots.");
@@ -120,32 +103,19 @@ client.on('guildDelete', guild => {
client.guilds.get(config.server).channels.get('265503171835592704').send("I have left the guild: " + guild.name + " (Owner: " + guild.owner.user.username + ")...");
client.shard.fetchClientValues('guilds.size').then(results => {
console.log("[Guild Count] " + results.reduce((prev, val) => prev + val, 0));
const carbonPOST = {
method: 'POST',
uri: 'https://www.carbonitex.net/discord/data/botdata.php',
body: {
key: config.carbonkey,
servercount: results.reduce((prev, val) => prev + val, 0)
},
json: true
}
const DBotsPOST = {
method: 'POST',
uri: 'https://bots.discord.pw/api/bots/' + config.botid + '/stats',
body: {
server_count: results.reduce((prev, val) => prev + val, 0)
},
headers: {
'Authorization': config.botskey
},
json: true
}
request(carbonPOST).then(function (parsedBody) {
request
.post('https://www.carbonitex.net/discord/data/botdata.php')
.send({ key: config.carbonkey, servercount: results.reduce((prev, val) => prev + val, 0) })
.then(function (parsedBody) {
console.log('[Carbon] Successfully posted to Carbon.');
}).catch(function (err) {
console.log("[Carbon] Failed to post to Carbon.");
});
request(DBotsPOST).then(function (parsedBody) {
request
.post('https://bots.discord.pw/api/bots/' + config.botid + '/stats')
.set({ 'Authorization': config.botskey })
.send({ server_count: results.reduce((prev, val) => prev + val, 0) })
.then(function (parsedBody) {
console.log('[Discord Bots] Successfully posted to Discord Bots.');
}).catch(function (err) {
console.log("[Discord Bots] Failed to post to Discord Bots.");
+1 -2
View File
@@ -30,10 +30,9 @@
"morse": "^0.1.0",
"opusscript": "0.0.3",
"pirate-speak": "^1.0.1",
"request": "^2.81.0",
"request-promise": "^4.1.1",
"roman-numeral-converter-mmxvi": "^1.0.5",
"string-to-binary": "^0.1.2",
"superagent": "^3.5.1",
"urban": "^0.3.1",
"yahoo-weather": "^2.2.2",
"zalgolize": "^1.2.4"