args and more

This commit is contained in:
Daniel Odendahl Jr
2017-03-25 04:16:27 +00:00
parent 8dd6ec1f9b
commit e2a4a92990
82 changed files with 1089 additions and 1021 deletions
+8 -6
View File
@@ -7,21 +7,23 @@ module.exports = class MagicBall extends commando.Command {
group: 'response',
memberName: '8ball',
description: 'Predicts your future. (;8ball Am I stupid?)',
examples: [';8ball <INSERT QUESTION HERE>']
examples: [';8ball <INSERT QUESTION HERE>'],
args: [{
key: 'question',
prompt: 'What do you want to ask the 8 ball?',
type: 'string'
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
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 question = args.question;
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.";
}
return message.channel.send(`Question: ${question}\n:8ball: ${answers} :8ball:`);
}
};
+13 -10
View File
@@ -10,22 +10,25 @@ module.exports = class ChooseCommand extends commando.Command {
group: 'response',
memberName: 'choose',
description: 'Chooses between things. (;choose Cow | Sheep)',
examples: [';choose Cow | Sheep', ';choose Bark | Woof | Meow | Moo']
examples: [';choose Cow | Sheep', ';choose Bark | Woof | Meow | Moo'],
args: [{
key: 'choices',
prompt: 'What choices do you want me pick from? Split them with " | "!',
type: 'string',
validate: (str) => {
str.includes(" | ");
}
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
if (message.content.includes(" | ")) {
let choices = message.content.split(" ").slice(1).join(" ").split(' | ');
choices = choices[Math.floor(Math.random() * choices.length)];
return message.channel.send(`I choose ${choices}!`);
}
else {
return message.channel.send(":x: Split your two choices with a ' | '!");
}
let choices = args.choices.split(' | ');
choices = choices[Math.floor(Math.random() * choices.length)];
return message.channel.send(`I choose ${choices}!`);
}
};
+10 -9
View File
@@ -7,23 +7,24 @@ module.exports = class ComplimentCommand extends commando.Command {
group: 'response',
memberName: 'compliment',
description: 'Compliments the user of your choice. (;compliment @User)',
examples: [';compliment @User']
examples: [';compliment @User'],
args: [{
key: 'thing',
prompt: 'What do you want to compliment?',
type: 'string',
default: ''
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let thingToCompliment = message.content.split(" ").slice(1).join(" ");
let thingToCompliment = args.thing || message.author;
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) {
return message.reply(compliments);
}
else {
return message.channel.send(`${thingToCompliment}, ${compliments}`);
}
return message.channel.send(`${thingToCompliment}, ${compliments}`);
}
};
+9 -9
View File
@@ -11,21 +11,21 @@ module.exports = class MotivateCommand extends commando.Command {
group: 'response',
memberName: 'motivate',
description: 'Motivates someone. (;motivate @User)',
examples: [';motivate @User']
examples: [';motivate @User'],
args: [{
key: 'thing',
prompt: 'What do you want to motivate?',
type: 'string'
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let userToMotivate = message.content.split(" ").slice(1).join(" ");
if (!userToMotivate) {
return message.reply('https://www.youtube.com/watch?v=ZXsQAXx_ao0');
}
else {
return message.channel.send(`${userToMotivate}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
}
let userToMotivate = args.thing || message.author;
return message.channel.send(`${userToMotivate}, https://www.youtube.com/watch?v=ZXsQAXx_ao0`);
}
};
+13 -9
View File
@@ -11,11 +11,19 @@ module.exports = class RandomNameGen extends commando.Command {
group: 'response',
memberName: 'name',
description: 'Generates a random name (;name Male)',
examples: [';name', ';name male', ';name female']
examples: [';name', ';name male', ';name female'],
args: [{
key: 'gender',
prompt: 'Which gender do you want to generate a name for?',
type: 'string',
validate: (str) => {
str.toLowerCase() === 'male' || str.toLowerCase() === 'female';
}
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
@@ -26,16 +34,12 @@ module.exports = class RandomNameGen extends commando.Command {
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")) {
let gender = args.gender;
if (gender === "male") {
return message.channel.send(`${randomFirstMale} ${randomLast}`);
}
else if (message.content.toLowerCase().split(" ").slice(1).includes("female")) {
else if (gender === "female") {
return message.channel.send(`${randomFirstFemale} ${randomLast}`);
}
else {
return message.channel.send(`${randomFirstBoth} ${randomLast}`);
}
}
};
+3
View File
@@ -4,6 +4,9 @@ module.exports = class PotatoCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'potato',
aliases: [
'tater'
],
group: 'response',
memberName: 'potato',
description: 'Sends a random Potato picture. (;potato)',
+8 -3
View File
@@ -10,16 +10,21 @@ module.exports = class RateWaifuCommand extends commando.Command {
group: 'response',
memberName: 'ratewaifu',
description: 'Rates your Waifu. (;ratewaifu Xiao Pai)',
examples: [';ratewaifu Xiao Pai']
examples: [';ratewaifu Xiao Pai'],
args: [{
key: 'waifu',
prompt: 'Who do you want to rate?',
type: 'string'
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let waifuToRate = message.content.split(" ").slice(1).join(" ");
let waifuToRate = args.waifu;
let rating = Math.floor(Math.random() * 10) + 1;
return message.channel.send(`I'd give ${waifuToRate} a ${rating}/10!`);
}
+9 -3
View File
@@ -10,16 +10,22 @@ module.exports = class RoastMeCommand extends commando.Command {
group: 'response',
memberName: 'roast',
description: 'Roasts the user of your choice. (;roast @User)',
examples: [';roast @username']
examples: [';roast @username'],
args: [{
key: 'thing',
prompt: 'What do you want to roast?',
type: 'string',
default: ''
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let userToRoast = message.content.split(" ").slice(1).join(" ");
let userToRoast = args.thing || message.author;
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) {
-65
View File
@@ -1,65 +0,0 @@
const commando = require('discord.js-commando');
module.exports = class RockPaperScissors extends commando.Command {
constructor(Client) {
super(Client, {
name: 'rps',
aliases: [
'rockpaperscissors'
],
group: 'response',
memberName: 'rps',
description: 'Play Rock Paper Scissors (;rps Rock)',
examples: [';rps Rock']
});
}
run(message) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let [rps] = message.content.toLowerCase().split(" ").slice(1);
let response = ['Paper', 'Rock', 'Scissors'];
response = response[Math.floor(Math.random() * response.length)];
if (!rps) {
return message.channel.send(":x: Error! Your message contains nothing!");
}
else if (rps.includes("rock")) {
if (response === "Rock") {
return message.channel.send("Rock! Aw, it's a tie!");
}
if (response === "Paper") {
return message.channel.send("Paper! Yes! I win!");
}
if (response === "Scissors") {
return message.channel.send("Scissors! Aw... I lose...");
}
}
else if (rps.includes("paper")) {
if (response === "Rock") {
return message.channel.send("Rock! Aw... I lose...");
}
if (response === "Paper") {
return message.channel.send("Paper! Aw, it's a tie!");
}
if (response === "Scissors") {
return message.channel.send("Scissors! Yes! I win!");
}
}
else if (rps.includes("scissors")) {
if (response === "Rock") {
return message.channel.send("Rock! Yes! I win!");
}
if (response === "Paper") {
return message.channel.send("Paper! Aw... I lose...");
}
if (response === "Scissors") {
return message.channel.send("Scissors! Aw, it's a tie!");
}
}
else {
return message.channel.send(":x: Error! Your choice is not Rock, Paper, or Scissors!");
}
}
};
+11 -14
View File
@@ -11,26 +11,23 @@ module.exports = class RollChooseCommand extends commando.Command {
group: 'response',
memberName: 'roll',
description: 'Rolls a Dice of your choice. (;roll 6)',
examples: [';roll 6']
examples: [';roll 6'],
args: [{
key: 'number',
prompt: 'Which number do you want to roll?',
type: 'integer',
default: 6
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
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) {
let roll = Math.floor(Math.random() * 6) + 1;
return message.channel.send(`You rolled a ${roll}.`);
}
else if (value.match(/^[0-9]+$/)) {
let roll = Math.floor(Math.random() * value) + 1;
return message.channel.send(`You rolled a ${roll}.`);
}
else {
return message.channel.send(":x: Error! Your message either contains a number but the number is invalid, or the number is in the wrong place.\n:notepad_spiral: (Note: When using numbers such as 1,000, do not use a comma)");
}
let value = args.number;
let roll = Math.floor(Math.random() * value) + 1;
return message.channel.send(`You rolled a ${roll}.`);
}
};
+3 -7
View File
@@ -13,7 +13,8 @@ module.exports = class RouletteCommand extends commando.Command {
group: 'response',
memberName: 'roulette',
description: 'Chooses a random member. (;roulette Who is the best?)',
examples: [";roulette Who is the best?"]
examples: [";roulette Who is the best?"],
guildOnly: true
});
}
@@ -22,11 +23,6 @@ module.exports = class RouletteCommand extends commando.Command {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
if (message.channel.type !== 'dm') {
return message.channel.send(`I choose ${message.guild.members.random().displayName}!`);
}
else {
return message.channel.send(':x: Error! This command does not work in DM!');
}
return message.channel.send(`I choose ${message.guild.members.random().displayName}!`);
}
};
+8 -3
View File
@@ -10,16 +10,21 @@ module.exports = class ShipCommand extends commando.Command {
group: 'response',
memberName: 'ship',
description: 'Ships two people. (;ship @Rem and @Nate)',
examples: [';ship @Rem and @Nate']
examples: [';ship @Rem and @Nate'],
args: [{
key: 'things',
prompt: 'What do you want to ship together?',
type: 'string'
}]
});
}
run(message) {
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let thingToShip = message.content.split(" ").slice(1).join(" ");
let thingToShip = args.things;
let percentage = Math.floor(Math.random() * 100) + 1;
return message.channel.send(`I'd give ${thingToShip} a ${percentage}%!`);
}
-31
View File
@@ -1,31 +0,0 @@
const commando = require('discord.js-commando');
module.exports = class SlotsCommand extends commando.Command {
constructor(Client) {
super(Client, {
name: 'slots',
group: 'response',
memberName: 'slots',
description: 'Play slots. (;slots)',
examples: [';slots']
});
}
run(message) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
console.log(`[Command] ${message.content}`);
let slotThing = [':grapes:', ':tangerine:', ':pear:', ':cherries:'];
let slotOne = slotThing[Math.floor(Math.random() * slotThing.length)];
let slotTwo = slotThing[Math.floor(Math.random() * slotThing.length)];
let slotThree = slotThing[Math.floor(Math.random() * slotThing.length)];
let slotFour = slotThing[Math.floor(Math.random() * slotThing.length)];
if (slotOne === slotTwo && slotOne === slotThree && slotOne === slotFour) {
return message.channel.send(`${slotOne}|${slotTwo}|${slotThree}|${slotFour}\nWow! You won! Great job... er... luck!`);
}
else {
return message.channel.send(`${slotOne}|${slotTwo}|${slotThree}|${slotFour}\nAww... You lost... Guess it's just bad luck, huh?`);
}
}
};