This commit is contained in:
Daniel Odendahl Jr
2017-11-09 00:02:59 +00:00
parent 819db49057
commit b6afded306
125 changed files with 743 additions and 289 deletions
+3 -3
View File
@@ -16,13 +16,13 @@ client.registry
.registerGroups([
['util', 'Utility'],
['info', 'Discord Information'],
['random-res', 'Random Response'],
['single-res', 'Single Response'],
['random', 'Random Response'],
['single', 'Single Response'],
['events', 'Daily Events'],
['image-edit', 'Image Manipulation'],
['avatar-edit', 'Avatar Manipulation'],
['text-edit', 'Text Manipulation'],
['num-edit', 'Number Manipulation'],
['number-edit', 'Number Manipulation'],
['search', 'Search'],
['games', 'Games'],
['other', 'Other'],
+2 -1
View File
@@ -997,6 +997,7 @@
"X-Rays",
"Yellowstone Park",
"Zen",
"Zucchini"
"Zucchini",
"<Blank>"
]
}
+2 -1
View File
@@ -3216,6 +3216,7 @@
"A Molson muscle.",
"The Royal Canadian Mounted Police.",
"An icy handjob from an Edmonton hooker.",
"eat pant."
"eat pant.",
"<Blank>"
]
}
+36
View File
@@ -0,0 +1,36 @@
{
"eyeColors": [
"blue",
"brown",
"hazel",
"green",
"yellow"
],
"hairColors": [
"blonde",
"brown",
"red",
"black",
"grey",
"white",
"blue"
],
"hairStyles": [
"curly",
"straight",
"wavy",
"long",
"shoulder-length",
"short",
"balding"
],
"extras": [
"freckles",
"glasses",
"dimples",
"contacts",
"loads of acne",
"pretty smile",
"braces"
]
}
+8
View File
@@ -0,0 +1,8 @@
[
"Maybe someday",
"Nothing",
"Neither",
"I don't think so",
"Yes",
"Try asking again"
]
+410
View File
@@ -0,0 +1,410 @@
[
{
"quote": "I love you the more in that I believe you had liked me for my own sake and for nothing else.",
"author": "John Keats"
},
{
"quote": "But man is not made for defeat. A man can be destroyed but not defeated.",
"author": "Ernest Hemingway"
},
{
"quote": "When you reach the end of your rope, tie a knot in it and hang on.",
"author": "Franklin D. Roosevelt"
},
{
"quote": "There is nothing permanent except change.",
"author": "Heraclitus"
},
{
"quote": "You cannot shake hands with a clenched fist.",
"author": "Indira Gandhi"
},
{
"quote": "Let us sacrifice our today so that our children can have a better tomorrow.",
"author": "A. P. J. Abdul Kalam"
},
{
"quote": "It is better to be feared than loved, if you cannot be both.",
"author": "Niccolo Machiavelli"
},
{
"quote": "The most difficult thing is the decision to act, the rest is merely tenacity. The fears are paper tigers. You can do anything you decide to do. You can act to change and control your life; and the procedure, the process is its own reward.",
"author": "Amelia Earhart"
},
{
"quote": "Do not mind anything that anyone tells you about anyone else. Judge everyone and everything for yourself.",
"author": "Henry James"
},
{
"quote": "Learning never exhausts the mind.",
"author": "Leonardo da Vinci"
},
{
"quote": "There is no charm equal to tenderness of heart.",
"author": "Jane Austen"
},
{
"quote": "All that we see or seem is but a dream within a dream.",
"author": "Edgar Allan Poe"
},
{
"quote": "Lord, make me an instrument of thy peace. Where there is hatred, let me sow love.",
"author": "Francis of Assisi"
},
{
"quote": "The only journey is the one within.",
"author": "Rainer Maria Rilke"
},
{
"quote": "Good judgment comes from experience, and a lot of that comes from bad judgment.",
"author": "Will Rogers"
},
{
"quote": "Think in the morning. Act in the noon. Eat in the evening. Sleep in the night.",
"author": "William Blake"
},
{
"quote": "Life without love is like a tree without blossoms or fruit.",
"author": "Khalil Gibran"
},
{
"quote": "No act of kindness, no matter how small, is ever wasted.",
"author": "Aesop"
},
{
"quote": "Love cures people - both the ones who give it and the ones who receive it.",
"author": "Karl A. Menninger"
},
{
"quote": "Work like you don't need the money. Love like you've never been hurt. Dance like nobody's watching.",
"author": "Satchel Paige"
},
{
"quote": "It is far better to be alone, than to be in bad company.",
"author": "George Washington"
},
{
"quote": "If you cannot do great things, do small things in a great way.",
"author": "Napoleon Hill"
},
{
"quote": "Permanence, perseverance and persistence in spite of all obstacles, discouragements, and impossibilities: It is this, that in all things distinguishes the strong soul from the weak.",
"author": "Thomas Carlyle"
},
{
"quote": "Independence is happiness.",
"author": "Susan B. Anthony"
},
{
"quote": "The supreme art of war is to subdue the enemy without fighting.",
"author": "Sun Tzu"
},
{
"quote": "Keep your face always toward the sunshine - and shadows will fall behind you.",
"author": "Walt Whitman"
},
{
"quote": "Being entirely honest with oneself is a good exercise.",
"author": "Sigmund Freud"
},
{
"quote": "Happiness can exist only in acceptance.",
"author": "George Orwell"
},
{
"quote": "Love has no age, no limit; and no death.",
"author": "John Galsworthy"
},
{
"quote": "You can't blame gravity for falling in love.",
"author": "Albert Einstein"
},
{
"quote": "There is only one corner of the universe you can be certain of improving, and that's your own self.",
"author": "Aldous Huxley"
},
{
"quote": "Honesty is the first chapter in the book of wisdom.",
"author": "Thomas Jefferson"
},
{
"quote": "The journey of a thousand miles begins with one step.",
"author": "Lao Tzu"
},
{
"quote": "The best preparation for tomorrow is doing your best today.",
"author": "H. Jackson Brown, Jr."
},
{
"quote": "A new command I give you: Love one another. As I have loved you, so you must love one another.",
"author": "Jesus Christ"
},
{
"quote": "There are two ways of spreading light: to be the candle or the mirror that reflects it.",
"author": "Edith Wharton"
},
{
"quote": "Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.",
"author": "Samuel Beckett"
},
{
"quote": "God gave us the gift of life; it is up to us to give ourselves the gift of living well.",
"author": "Voltaire"
},
{
"quote": "Coming together is a beginning; keeping together is progress; working together is success.",
"author": "Henry Ford"
},
{
"quote": "Change your life today. Don't gamble on the future, act now, without delay.",
"author": "Simone de Beauvoir"
},
{
"quote": "Not all those who wander are lost.",
"author": "J. R. R. Tolkien"
},
{
"quote": "Whoever is happy will make others happy too.",
"author": "Anne Frank"
},
{
"quote": "I have not failed. I've just found 10,000 ways that won't work.",
"author": "Thomas A. Edison"
},
{
"quote": "Tell me and I forget. Teach me and I remember. Involve me and I learn.",
"author": "Benjamin Franklin"
},
{
"quote": "There is nothing on this earth more to be prized than true friendship.",
"author": "Thomas Aquinas"
},
{
"quote": "A leader is one who knows the way, goes the way, and shows the way.",
"author": "John C. Maxwell"
},
{
"quote": "Very little is needed to make a happy life; it is all within yourself, in your way of thinking.",
"author": "Marcus Aurelius"
},
{
"quote": "There is only one happiness in this life, to love and be loved.",
"author": "George Sand"
},
{
"quote": "If opportunity doesn't knock, build a door.",
"author": "Milton Berle"
},
{
"quote": "The secret of getting ahead is getting started.",
"author": "Mark Twain"
},
{
"quote": "Let us be grateful to people who make us happy, they are the charming gardeners who make our souls blossom.",
"author": "Marcel Proust"
},
{
"quote": "Always remember that you are absolutely unique. Just like everyone else.",
"author": "Margaret Mead"
},
{
"quote": "Wise men speak because they have something to say; Fools because they have to say something.",
"author": "Plato"
},
{
"quote": "The World is my country, all mankind are my brethren, and to do good is my religion.",
"author": "Thomas Paine"
},
{
"quote": "When we are no longer able to change a situation - we are challenged to change ourselves.",
"author": "Viktor E. Frankl"
},
{
"quote": "Problems are not stop signs, they are guidelines.",
"author": "Robert H. Schuller"
},
{
"quote": "What we achieve inwardly will change outer reality.",
"author": "Plutarch"
},
{
"quote": "Spread love everywhere you go. Let no one ever come to you without leaving happier.",
"author": "Mother Teresa"
},
{
"quote": "We love life, not because we are used to living but because we are used to loving.",
"author": "Friedrich Nietzsche"
},
{
"quote": "All our dreams can come true, if we have the courage to pursue them.",
"author": "Walt Disney"
},
{
"quote": "It's not what you look at that matters, it's what you see.",
"author": "Henry David Thoreau"
},
{
"quote": "A single rose can be my garden... a single friend, my world.",
"author": "Leo Buscaglia"
},
{
"quote": "Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success.",
"author": "Swami Vivekananda"
},
{
"quote": "Friends show their love in times of trouble, not in happiness.",
"author": "Euripides"
},
{
"quote": "You don't choose your family. They are God's gift to you, as you are to them.",
"author": "Desmond Tutu"
},
{
"quote": "Life is not a problem to be solved, but a reality to be experienced.",
"author": "Soren Kierkegaard"
},
{
"quote": "Life isn't about finding yourself. Life is about creating yourself.",
"author": "George Bernard Shaw"
},
{
"quote": "The only true wisdom is in knowing you know nothing.",
"author": "Socrates"
},
{
"quote": "Everything has beauty, but not everyone sees it.",
"author": "Confucius"
},
{
"quote": "A kiss is a lovely trick designed by nature to stop speech when words become superfluous.",
"author": "Ingrid Bergman"
},
{
"quote": "For it was not into my ear you whispered, but into my heart. It was not my lips you kissed, but my soul.",
"author": "Judy Garland"
},
{
"quote": "If you live to be a hundred, I want to live to be a hundred minus one day so I never have to live without you.",
"author": "A. A. Milne"
},
{
"quote": "As we express our gratitude, we must never forget that the highest appreciation is not to utter words, but to live by them.",
"author": "John F. Kennedy"
},
{
"quote": "Life's most persistent and urgent question is, 'What are you doing for others?'",
"author": "Martin Luther King, Jr."
},
{
"quote": "Believe you can and you're halfway there.",
"author": "Theodore Roosevelt"
},
{
"quote": "The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails.",
"author": "William Arthur Ward"
},
{
"quote": "Happiness resides not in possessions, and not in gold, happiness dwells in the soul.",
"author": "Democritus"
},
{
"quote": "The future belongs to those who believe in the beauty of their dreams.",
"author": "Eleanor Roosevelt"
},
{
"quote": "Today you are you! That is truer than true! There is no one alive who is you-er than you!",
"author": "Dr. Seuss"
},
{
"quote": "Education is the most powerful weapon which you can use to change the world.",
"author": "Nelson Mandela"
},
{
"quote": "Change your thoughts and you change your world.",
"author": "Norman Vincent Peale"
},
{
"quote": "In three words I can sum up everything I've learned about life: it goes on.",
"author": "Robert Frost"
},
{
"quote": "Love isn't something you find. Love is something that finds you.",
"author": "Loretta Young"
},
{
"quote": "Don't walk behind me; I may not lead. Don't walk in front of me; I may not follow. Just walk beside me and be my friend.",
"author": "Albert Camus"
},
{
"quote": "Do all things with love.",
"author": "Og Mandino"
},
{
"quote": "Success is not final, failure is not fatal: it is the courage to continue that counts.",
"author": "Winston Churchill"
},
{
"quote": "Do not go where the path may lead, go instead where there is no path and leave a trail.",
"author": "Ralph Waldo Emerson"
},
{
"quote": "Love is composed of a single soul inhabiting two bodies.",
"author": "Aristotle"
},
{
"quote": "Where there is love there is life.",
"author": "Mahatma Gandhi"
},
{
"quote": "One of the most beautiful qualities of true friendship is to understand and to be understood.",
"author": "Lucius Annaeus Seneca"
},
{
"quote": "The only thing necessary for the triumph of evil is for good men to do nothing.",
"author": "Edmund Burke"
},
{
"quote": "Do not dwell in the past, do not dream of the future, concentrate the mind on the present moment.",
"author": "Buddha"
},
{
"quote": "Don't judge each day by the harvest you reap but by the seeds that you plant.",
"author": "Robert Louis Stevenson"
},
{
"quote": "Nothing is impossible, the word itself says 'I'm possible'!",
"author": "Audrey Hepburn"
},
{
"quote": "Find a place inside where there's joy, and the joy will burn out the pain.",
"author": "Joseph Campbell"
},
{
"quote": "Try to be a rainbow in someone's cloud.",
"author": "Maya Angelou"
},
{
"quote": "It is during our darkest moments that we must focus to see the light.",
"author": "Aristotle"
},
{
"quote": "Keep love in your heart. A life without it is like a sunless garden when the flowers are dead.",
"author": "Oscar Wilde"
},
{
"quote": "The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart.",
"author": "Helen Keller"
},
{
"quote": "Yesterday is history, tomorrow is a mystery, today is a gift of God, which is why we call it the present.",
"author": "Bil Keane"
},
{
"quote": "Youve got mountains of your own, Ill bet on it. Take heart. Be encouraged. Remain steadfast. Hang on for dear life. Youve got a better grip than you realize.",
"author": "Adam Young"
},
{
"quote": "Eat pant.",
"author": "Dragon Fire"
}
]
+8
View File
@@ -0,0 +1,8 @@
[
"airhorn",
"cat",
"dun-dun-dun",
"laugh track",
"pikachu",
"space"
]
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class ContrastCommand extends Command {
name: 'contrast',
group: 'avatar-edit',
memberName: 'contrast',
description: 'Draws a user\'s avatar, but with contrast.',
description: 'Draws a user\'s avatar but with contrast.',
throttling: {
usages: 1,
duration: 15
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class DexterCommand extends Command {
name: 'dexter',
group: 'avatar-edit',
memberName: 'dexter',
description: 'Draws a user\'s avatar over Dexter from Pokémon\'s screen.',
description: 'Draws a user\'s avatar over the screen of Dexter from Pokémon.',
throttling: {
usages: 1,
duration: 15
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class InvertCommand extends Command {
name: 'invert',
group: 'avatar-edit',
memberName: 'invert',
description: 'Draws a user\'s avatar inverted.',
description: 'Draws a user\'s avatar but inverted.',
throttling: {
usages: 1,
duration: 15
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class LookWhatKarenHaveCommand extends Command {
aliases: ['look-at-what-karen-has', 'look-what-karen-has'],
group: 'avatar-edit',
memberName: 'look-what-karen-have',
description: 'Draws a user\'s avatar over Karen\'s photo.',
description: 'Draws a user\'s avatar over Karen\'s piece of paper.',
throttling: {
usages: 1,
duration: 15
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = class PixelizeCommand extends Command {
name: 'pixelize',
group: 'avatar-edit',
memberName: 'pixelize',
description: 'Draws a user\'s avatar pixelized.',
description: 'Draws a user\'s avatar but pixelized.',
throttling: {
usages: 1,
duration: 15
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class SteamCardCommand extends Command {
aliases: ['valve-card'],
group: 'avatar-edit',
memberName: 'steam-card',
description: 'Draws a user\'s avatar over a Steam Trading Card.',
description: 'Draws a user\'s avatar on a Steam Trading Card.',
guildOnly: true,
throttling: {
usages: 1,
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class TriggeredCommand extends Command {
name: 'triggered',
group: 'avatar-edit',
memberName: 'triggered',
description: 'Draws a user\'s avatar over a Triggered meme.',
description: 'Draws a user\'s avatar over the "Triggered" meme.',
throttling: {
usages: 1,
duration: 15
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class DaysUntilCommand extends Command {
aliases: ['days-until-christmas'],
group: 'events',
memberName: 'days-until',
description: 'Responds with how many days until a certain date this year.',
description: 'Responds with how many days there are until a certain date.',
args: [
{
key: 'date',
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class GoogleDoodleCommand extends Command {
name: 'google-doodle',
group: 'events',
memberName: 'google-doodle',
description: 'Responds with a Google doodle, either the latest or a random one from a specific month/year.',
description: 'Responds with a Google Doodle, either the latest one or a random one from the past.',
clientPermissions: ['ATTACH_FILES'],
args: [
{
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class HoroscopeCommand extends Command {
name: 'horoscope',
group: 'events',
memberName: 'horoscope',
description: 'Responds with today\'s horoscope for a particular sign.',
description: 'Responds with today\'s horoscope for a specific Zodiac sign.',
details: `**Signs**: ${signs.join(', ')}`,
clientPermissions: ['EMBED_LINKS'],
args: [
+4 -13
View File
@@ -9,22 +9,14 @@ module.exports = class TodayInHistoryCommand extends Command {
aliases: ['event', 'today', 'history'],
group: 'events',
memberName: 'today-in-history',
description: 'Responds with an event that occurred today in history, or on a specific day.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'date',
prompt: 'What date do you want events for? Month/Day format.',
type: 'string',
default: ''
}
]
description: 'Responds with an event that occurred today in history.',
clientPermissions: ['EMBED_LINKS']
});
}
async run(msg, { date }) {
async run(msg) {
try {
const { text } = await snekfetch.get(`http://history.muffinlabs.com/date${date ? `/${date}` : ''}`);
const { text } = await snekfetch.get('http://history.muffinlabs.com/date');
const body = JSON.parse(text);
const events = body.data.Events;
const event = events[Math.floor(Math.random() * events.length)];
@@ -38,7 +30,6 @@ module.exports = class TodayInHistoryCommand extends Command {
event.links.map(link => `[${link.title}](${link.link.replace(/\)/g, '%29')})`).join(', '));
return msg.embed(embed);
} catch (err) {
if (err.status === 404 || err.status === 500) return msg.say('Could not find any results.');
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class WordOfTheDayCommand extends Command {
aliases: ['wordnik-word-of-the-day'],
group: 'events',
memberName: 'word-of-the-day',
description: 'Gets the word of the day.'
description: 'Responds with today\'s word of the day.'
});
}
+7 -7
View File
@@ -9,24 +9,24 @@ module.exports = class XKCDCommand extends Command {
aliases: ['kcd'],
group: 'events',
memberName: 'xkcd',
description: 'Gets an XKCD Comic, optionally opting for today\'s or a specific number.',
description: 'Responds with an XKCD comic, either today\'s, a random one, or a specific one.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'type',
key: 'query',
prompt: 'Please enter either a specific comic number, today, or random.',
type: 'string',
default: 'today',
parse: type => type.toLowerCase()
parse: query => query.toLowerCase()
}
]
});
}
async run(msg, { type }) {
async run(msg, { query }) {
try {
const current = await snekfetch.get('https://xkcd.com/info.0.json');
if (type === 'today') {
if (query === 'today') {
const embed = new MessageEmbed()
.setTitle(`${current.body.num} - ${current.body.title}`)
.setColor(0x9797FF)
@@ -35,7 +35,7 @@ module.exports = class XKCDCommand extends Command {
.setFooter(current.body.alt);
return msg.embed(embed);
}
if (type === 'random') {
if (query === 'random') {
const random = Math.floor(Math.random() * current.body.num) + 1;
const { body } = await snekfetch.get(`https://xkcd.com/${random}/info.0.json`);
const embed = new MessageEmbed()
@@ -46,7 +46,7 @@ module.exports = class XKCDCommand extends Command {
.setFooter(body.alt);
return msg.embed(embed);
}
const choice = parseInt(type, 10);
const choice = parseInt(query, 10);
if (isNaN(choice) || current.body.num < choice || choice < 1) return msg.say('Could not find any results.');
const { body } = await snekfetch.get(`https://xkcd.com/${choice}/info.0.json`);
const embed = new MessageEmbed()
+4 -6
View File
@@ -11,7 +11,7 @@ module.exports = class AkinatorCommand extends Command {
aliases: ['the-web-genie', 'web-genie'],
group: 'games',
memberName: 'akinator',
description: 'Play a game of Akinator.',
description: 'Think about a real or fictional character, I will try to guess who it is.',
clientPermissions: ['EMBED_LINKS']
});
@@ -22,7 +22,7 @@ module.exports = class AkinatorCommand extends Command {
if (this.sessions.has(msg.channel.id)) return msg.reply('Only one game may be occuring per channel.');
try {
let ans = null;
this.sessions.set(msg.channel.id, { progress: null });
this.sessions.set(msg.channel.id, { progress: 0 });
while (this.sessions.get(msg.channel.id).progress < 99) {
const data = ans === null ? await this.createSession(msg.channel) : await this.progress(msg.channel, ans);
if (!data || this.sessions.get(msg.channel.id).step >= 80) break;
@@ -30,7 +30,7 @@ module.exports = class AkinatorCommand extends Command {
answers.push('end');
await msg.say(stripIndents`
**${++data.step}.** ${data.question}
${data.answers.map(answer => answer.answer).join(' | ')}
${data.answers.map(answer => answer.answer).join(' | ')} | End
`);
const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase());
const msgs = await msg.channel.awaitMessages(filter, {
@@ -48,9 +48,7 @@ module.exports = class AkinatorCommand extends Command {
const embed = new MessageEmbed()
.setColor(0xF78B26)
.setTitle(`I'm ${Math.round(guess.proba * 100)}% sure it's...`)
.setDescription(stripIndents`
${guess.name}${guess.description ? `\n_${guess.description}_` : ''}
`)
.setDescription(`${guess.name}${guess.description ? `\n_${guess.description}_` : ''}`)
.setThumbnail(guess.absolute_picture_path);
await msg.embed(embed);
const verification = await verify(msg.channel, msg.author);
+21 -4
View File
@@ -10,7 +10,7 @@ module.exports = class ApplesToApplesCommand extends Command {
name: 'apples-to-apples',
group: 'games',
memberName: 'apples-to-apples',
description: 'Play a game of Apples to Apples.',
description: 'Compete to see who can come up with the best card to match an adjective.',
guildOnly: true,
args: [
{
@@ -31,8 +31,8 @@ module.exports = class ApplesToApplesCommand extends Command {
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
await msg.say('You will need at least 2 more players, at maximum 20. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 20, 3);
await msg.say('You will need at least 2 more players, at maximum 10. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 10, 3);
if (!awaitedPlayers) {
this.playing.delete(msg.channel.id);
return msg.say('Game could not be started...');
@@ -86,7 +86,24 @@ module.exports = class ApplesToApplesCommand extends Command {
await player.user.send('Skipping your turn...');
continue;
}
player.hand.delete(chosen);
if (chosen === '<Blank>') {
await player.user.send(stripIndents`
What do you want the blank card to say?
Only answers under 100 characters will be counted.
`);
const blank = await player.user.dmChannel.awaitMessages(res => res.content.length < 100, {
max: 1,
time: 120000
});
if (!blank.size) { // eslint-disable-line max-depth
await player.user.send('Skipping your turn...');
continue;
}
player.hand.delete('<Blank>');
chosen = blank.first().content;
} else {
player.hand.delete(chosen);
}
chosenCards.push({
id: player.id,
card: chosen
+19 -3
View File
@@ -11,7 +11,7 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
aliases: ['crude-cards', 'pretend-youre-xyzzy', 'cah'],
group: 'games',
memberName: 'cards-against-humanity',
description: 'Play a game of Cards Against Humanity.',
description: 'Compete to see who can come up with the best card to fill in the blank.',
guildOnly: true,
args: [
{
@@ -32,8 +32,8 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
await msg.say('You will need at least 2 more players, at maximum 20. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 20, 3);
await msg.say('You will need at least 2 more players, at maximum 10. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 10, 3);
if (!awaitedPlayers) {
this.playing.delete(msg.channel.id);
return msg.say('Game could not be started...');
@@ -88,6 +88,22 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
await player.user.send('Skipping your turn...');
continue;
}
if (chosen.includes('<Blank>')) {
await player.user.send(stripIndents`
What do you want the blank card to say?
Only answers under 100 characters will be counted.
`);
const blank = await player.user.dmChannel.awaitMessages(res => res.content.length < 100, {
max: 1,
time: 120000
});
if (!blank.size) { // eslint-disable-line max-depth
await player.user.send('Skipping your turn...');
continue;
}
player.hand.delete('<Blank>');
chosen[chosen.indexOf('<Blank>')] = blank.first().content;
}
for (const card of chosen) player.hand.delete(card);
chosenCards.push({
id: player.id,
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command {
aliases: ['eer'],
group: 'games',
memberName: 'emoji-emoji-revolution',
description: 'Play a game of Emoji Emoji Revolution.',
description: 'Can you type arrow emoji faster than anyone else has ever typed them before?',
guildOnly: true,
args: [
{
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class GunfightCommand extends Command {
aliases: ['western-gunfight'],
group: 'games',
memberName: 'gunfight',
description: 'Engage in a western gunfight against another user.',
description: 'Engage in a western gunfight against another user. High noon.',
guildOnly: true,
args: [
{
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class HangmanCommand extends Command {
name: 'hangman',
group: 'games',
memberName: 'hangman',
description: 'Play a game of hangman.'
description: 'Prevent a man from being hanged by guessing a word as fast as you can.'
});
this.playing = new Set();
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class HungerGamesCommand extends Command {
aliases: ['hunger-games-simulator', 'brant-steele'],
group: 'games',
memberName: 'hunger-games',
description: 'Simulate a Hunger Games match.',
description: 'Simulate a Hunger Games match with up to 24 tributes.',
args: [
{
key: 'tributes',
+2 -2
View File
@@ -6,12 +6,12 @@ module.exports = class LotteryCommand extends Command {
name: 'lottery',
group: 'games',
memberName: 'lottery',
description: 'Attempt to win the lottery, with a 1 in 100 chance of winning.'
description: 'Attempt to win the lottery, with a 1 in 1000 chance of winning.'
});
}
run(msg) {
const lottery = Math.floor(Math.random() * 100) + 1;
const lottery = Math.floor(Math.random() * 1000) + 1;
if (lottery === 1) return msg.reply('Nice job! 10/10! You deserve some cake!');
return msg.reply('Nope, sorry, you lost.');
}
@@ -17,7 +17,7 @@ module.exports = class MathGameCommand extends Command {
name: 'math-game',
aliases: ['math-quiz', 'math-test'],
group: 'games',
memberName: 'math-game',
memberName: 'math',
description: 'See how fast you can answer a math problem in a given time limit.',
args: [
{
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = class TicTacToeCommand extends Command {
name: 'tic-tac-toe',
group: 'games',
memberName: 'tic-tac-toe',
description: 'Play a game of tic-tac-toe.',
description: 'Play a game of tic-tac-toe with another user.',
args: [
{
key: 'opponent',
@@ -17,7 +17,7 @@ module.exports = class TypingGameCommand extends Command {
name: 'typing-game',
aliases: ['typing-quiz', 'typing-test'],
group: 'games',
memberName: 'typing-game',
memberName: 'typing',
description: 'See how fast you can type a sentence in a given time limit.',
args: [
{
+2 -2
View File
@@ -21,8 +21,8 @@ module.exports = class WizardConventionCommand extends Command {
if (this.playing.has(msg.channel.id)) return msg.reply('Only one game may be occurring per channel.');
this.playing.add(msg.channel.id);
try {
await msg.say('You will need at least 2 more players, at maximum 15. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 15, 3);
await msg.say('You will need at least 2 more players, at maximum 10. To join, type `join game`.');
const awaitedPlayers = await awaitPlayers(msg, 10, 3);
if (!awaitedPlayers) {
this.playing.delete(msg.channel.id);
return msg.say('Game could not be started...');
+2 -2
View File
@@ -5,7 +5,7 @@ const types = {
group: 'Group DM',
text: 'Text Channel',
voice: 'Voice Channel',
category: 'Channel Category',
category: 'Category',
unknown: 'Unknown'
};
@@ -15,7 +15,7 @@ module.exports = class ChannelInfoCommand extends Command {
name: 'channel-info',
aliases: ['channel'],
group: 'info',
memberName: 'channel-info',
memberName: 'channel',
description: 'Responds with detailed information on a channel.',
guildOnly: true,
clientPermissions: ['EMBED_LINKS'],
+1
View File
@@ -12,6 +12,7 @@ module.exports = class DiscriminatorCommand extends Command {
args: [
{
key: 'discrim',
label: 'discriminator',
prompt: 'Which discriminator would you like to search for?',
type: 'string',
default: '',
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class EmojiInfoCommand extends Command {
name: 'emoji-info',
aliases: ['emoji'],
group: 'info',
memberName: 'emoji-info',
memberName: 'emoji',
description: 'Responds with detailed information on an emoji.',
guildOnly: true,
clientPermissions: ['EMBED_LINKS'],
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = class RoleInfoCommand extends Command {
name: 'role-info',
aliases: ['role'],
group: 'info',
memberName: 'role-info',
memberName: 'role',
description: 'Responds with detailed information on a role.',
guildOnly: true,
clientPermissions: ['EMBED_LINKS'],
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class ServerInfoCommand extends Command {
name: 'server-info',
aliases: ['guild', 'server', 'guild-info'],
group: 'info',
memberName: 'server-info',
memberName: 'server',
description: 'Responds with detailed information on the server.',
guildOnly: true,
clientPermissions: ['EMBED_LINKS']
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = class UserInfoCommand extends Command {
name: 'user-info',
aliases: ['user', 'member', 'member-info'],
group: 'info',
memberName: 'user-info',
memberName: 'user',
description: 'Responds with detailed information on a user.',
guildOnly: true,
clientPermissions: ['EMBED_LINKS'],
@@ -8,9 +8,9 @@ module.exports = class CurrencyCommand extends Command {
super(client, {
name: 'currency',
aliases: ['currency-convert', 'convert-currency'],
group: 'num-edit',
group: 'number-edit',
memberName: 'currency',
description: 'Converts a number from one currency to another.',
description: 'Converts money from one currency to another.',
details: `**Codes**: ${codes.join(', ')}`,
args: [
{
@@ -6,9 +6,9 @@ module.exports = class MathCommand extends Command {
super(client, {
name: 'math',
aliases: ['calculator', 'calc'],
group: 'num-edit',
group: 'number-edit',
memberName: 'math',
description: 'Evaluates math expressions.',
description: 'Evaluates a math expression.',
args: [
{
key: 'expression',
@@ -7,7 +7,7 @@ module.exports = class TemperatureCommand extends Command {
super(client, {
name: 'temperature',
aliases: ['temperature-convert', 'convert-temperature', 'temp-convert', 'convert-temp'],
group: 'num-edit',
group: 'number-edit',
memberName: 'temperature',
description: `Converts temperatures to/from ${list(units, 'or')}.`,
args: [
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class CleverbotCommand extends Command {
aliases: ['clevs'],
group: 'other',
memberName: 'cleverbot',
description: 'Talk to Cleverbot!',
description: 'Chat with Cleverbot.',
ownerOnly: true,
args: [
{
+1 -1
View File
@@ -6,7 +6,7 @@ module.exports = class CoolnessCommand extends Command {
name: 'coolness',
group: 'other',
memberName: 'coolness',
description: 'Determines your coolness.',
description: 'Determines a user\'s coolness.',
args: [
{
key: 'user',
+1 -1
View File
@@ -1,7 +1,7 @@
const { Command } = require('discord.js-commando');
const { list } = require('../../util/Util');
const path = require('path');
const sounds = ['airhorn', 'cat', 'dun-dun-dun', 'laugh track', 'pikachu', 'space'];
const sounds = require('../../assets/json/soundboard');
module.exports = class SoundboardCommand extends Command {
constructor(client) {
+2 -2
View File
@@ -8,7 +8,7 @@ module.exports = class SpoopyLinkCommand extends Command {
name: 'spoopy-link',
group: 'other',
memberName: 'spoopy-link',
description: 'Checks if a link is spoopy or not.',
description: 'Determines if a link is spoopy or not.',
args: [
{
key: 'site',
@@ -25,7 +25,7 @@ module.exports = class SpoopyLinkCommand extends Command {
try {
const { body } = await snekfetch.get(`https://spoopy.link/api/${site}`);
return msg.say(stripIndents`
${body.safe ? 'Safe!' : 'Not safe...'}
${body.safe ? 'Safe!' : 'Not safe...'}
${body.chain.map(url => `<${url.url}> ${url.safe ? '✅' : `❌ (${url.reasons.join(', ')})`}`).join('\n')}
`);
} catch (err) {
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class StrawpollCommand extends Command {
aliases: ['poll'],
group: 'other',
memberName: 'strawpoll',
description: 'Creates a Strawpoll from the options you provide.',
description: 'Generates a Strawpoll with the options you provide.',
args: [
{
key: 'title',
-22
View File
@@ -1,22 +0,0 @@
const { Command } = require('discord.js-commando');
const snekfetch = require('snekfetch');
module.exports = class QuoteCommand extends Command {
constructor(client) {
super(client, {
name: 'quote',
group: 'random-res',
memberName: 'quote',
description: 'Responds with a random quote.'
});
}
async run(msg) {
try {
const { body } = await snekfetch.get('https://talaikis.com/api/quotes/random/');
return msg.say(`${body.quote} - _${body.author}_`);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-18
View File
@@ -1,18 +0,0 @@
const { Command } = require('discord.js-commando');
const crypto = require('crypto');
module.exports = class SecurityKeyCommand extends Command {
constructor(client) {
super(client, {
name: 'security-key',
aliases: ['crypto', 'crypto-key'],
group: 'random-res',
memberName: 'security-key',
description: 'Generates a random security key.'
});
}
run(msg) {
return msg.say(crypto.randomBytes(15).toString('hex'));
}
};
@@ -7,7 +7,7 @@ module.exports = class EightBallCommand extends Command {
super(client, {
name: '8-ball',
aliases: ['magic-8-ball', 'eight-ball', 'magic-eight-ball'],
group: 'random-res',
group: 'random',
memberName: '8-ball',
description: 'Asks your question to the Magic 8 Ball.',
args: [
@@ -6,9 +6,9 @@ module.exports = class CatFactCommand extends Command {
super(client, {
name: 'cat-fact',
aliases: ['neko-fact', 'kitty-fact'],
group: 'random-res',
group: 'random',
memberName: 'cat-fact',
description: 'Responds with a cat fact.'
description: 'Responds with a random cat fact.'
});
}
@@ -6,7 +6,7 @@ module.exports = class CatCommand extends Command {
super(client, {
name: 'cat',
aliases: ['neko', 'kitty'],
group: 'random-res',
group: 'random',
memberName: 'cat',
description: 'Responds with a random cat image.',
clientPermissions: ['ATTACH_FILES']
@@ -7,7 +7,7 @@ module.exports = class CharlieCharlieChallengeCommand extends Command {
super(client, {
name: 'charlie-charlie-challenge',
aliases: ['charlie-charlie'],
group: 'random-res',
group: 'random',
memberName: 'charlie-charlie-challenge',
description: 'Asks your question to Charlie.',
args: [
@@ -5,7 +5,7 @@ module.exports = class ChooseCommand extends Command {
super(client, {
name: 'choose',
aliases: ['pick'],
group: 'random-res',
group: 'random',
memberName: 'choose',
description: 'Chooses between options you provide.',
args: [
@@ -6,9 +6,9 @@ module.exports = class ChuckNorrisCommand extends Command {
super(client, {
name: 'chuck-norris',
aliases: ['chuck', 'norris'],
group: 'random-res',
group: 'random',
memberName: 'chuck-norris',
description: 'Responds with a Chuck Norris quote.',
description: 'Responds with a random Chuck Norris joke.',
args: [
{
key: 'name',
@@ -6,7 +6,7 @@ module.exports = class CoinCommand extends Command {
super(client, {
name: 'coin',
aliases: ['coin-flip', 'flip'],
group: 'random-res',
group: 'random',
memberName: 'coin',
description: 'Flips a coin.'
});
@@ -5,7 +5,7 @@ module.exports = class ComplimentCommand extends Command {
constructor(client) {
super(client, {
name: 'compliment',
group: 'random-res',
group: 'random',
memberName: 'compliment',
description: 'Compliments a user.',
args: [
@@ -6,9 +6,9 @@ module.exports = class DogFactCommand extends Command {
super(client, {
name: 'dog-fact',
aliases: ['puppy-fact'],
group: 'random-res',
group: 'random',
memberName: 'dog-fact',
description: 'Responds with a dog fact.'
description: 'Responds with a random dog fact.'
});
}
@@ -6,7 +6,7 @@ module.exports = class DogCommand extends Command {
super(client, {
name: 'dog',
aliases: ['puppy'],
group: 'random-res',
group: 'random',
memberName: 'dog',
description: 'Responds with a random dog image.',
clientPermissions: ['ATTACH_FILES']
@@ -5,7 +5,7 @@ module.exports = class FactCoreCommand extends Command {
constructor(client) {
super(client, {
name: 'fact-core',
group: 'random-res',
group: 'random',
memberName: 'fact-core',
description: 'Responds with a random Fact Core quote.'
});
@@ -6,7 +6,7 @@ module.exports = class FidgetCommand extends Command {
super(client, {
name: 'fidget',
aliases: ['nimbat'],
group: 'random-res',
group: 'random',
memberName: 'fidget',
description: 'Responds with a random image of Fidget.',
clientPermissions: ['ATTACH_FILES']
@@ -7,7 +7,7 @@ module.exports = class FortuneCommand extends Command {
super(client, {
name: 'fortune',
aliases: ['fortune-cookie'],
group: 'random-res',
group: 'random',
memberName: 'fortune',
description: 'Responds with a random fortune.'
});
@@ -2,19 +2,16 @@ const { Command } = require('discord.js-commando');
const { oneLine } = require('common-tags');
const { randomRange } = require('../../util/Util');
const genders = ['male', 'female'];
const eyeColors = ['blue', 'brown', 'hazel', 'green', 'yellow'];
const hairColors = ['blonde', 'brown', 'red', 'black', 'grey', 'white'];
const hairStyles = ['curly', 'straight', 'wavy', 'long', 'shoulder-length', 'short', 'balding'];
const extras = ['freckles', 'glasses', 'dimples', 'contacts', 'loads of acne', 'pretty smile', 'braces'];
const { eyeColors, hairColors, hairStyles, extras } = require('../../assets/json/guess-looks');
module.exports = class GuessMyLooksCommand extends Command {
module.exports = class GuessLooksCommand extends Command {
constructor(client) {
super(client, {
name: 'guess-my-looks',
aliases: ['guess-looks'],
group: 'random-res',
memberName: 'guess-my-looks',
description: 'Guesses what you look like.',
name: 'guess-looks',
aliases: ['guess-my-looks'],
group: 'random',
memberName: 'guess-looks',
description: 'Guesses what a user looks like.',
args: [
{
key: 'user',
@@ -5,7 +5,7 @@ module.exports = class JokeCommand extends Command {
constructor(client) {
super(client, {
name: 'joke',
group: 'random-res',
group: 'random',
memberName: 'joke',
description: 'Responds with a random joke.'
});
@@ -6,26 +6,26 @@ module.exports = class KissMarryKillCommand extends Command {
super(client, {
name: 'kiss-marry-kill',
aliases: ['kiss-kill-marry', 'kill-kiss-marry', 'kill-marry-kiss', 'marry-kiss-kill', 'marry-kill-kiss'],
group: 'random-res',
group: 'random',
memberName: 'kiss-marry-kill',
description: 'Decides who to kiss, who to marry, and who to kill.',
description: 'Determines who to kiss, who to marry, and who to kill.',
args: [
{
key: 'thing1',
key: 'first',
label: 'first name',
prompt: 'Who is the first person you choose?',
type: 'string',
max: 500
},
{
key: 'thing2',
key: 'second',
label: 'second name',
prompt: 'Who is the second person you choose?',
type: 'string',
max: 500
},
{
key: 'thing3',
key: 'third',
label: 'third name',
prompt: 'Who is the third person you choose?',
type: 'string',
@@ -35,8 +35,8 @@ module.exports = class KissMarryKillCommand extends Command {
});
}
run(msg, { thing1, thing2, thing3 }) {
const things = shuffle([thing1, thing2, thing3]);
run(msg, { first, second, third }) {
const things = shuffle([first, second, third]);
return msg.say(`I'd kiss ${things[0]}, marry ${things[1]}, and kill ${things[2]}.`);
}
};
@@ -1,13 +1,13 @@
const { Command } = require('discord.js-commando');
const { stripIndents } = require('common-tags');
const answers = ['Maybe someday', 'Nothing', 'Neither', 'I don\'t think so', 'Yes', 'Try asking again'];
const answers = require('../../assets/json/magic-conch');
module.exports = class MagicConchCommand extends Command {
constructor(client) {
super(client, {
name: 'magic-conch',
aliases: ['magic-conch-shell'],
group: 'random-res',
group: 'random',
memberName: 'magic-conch',
description: 'Asks your question to the Magic Conch.',
args: [
@@ -7,7 +7,7 @@ module.exports = class NameCommand extends Command {
constructor(client) {
super(client, {
name: 'name',
group: 'random-res',
group: 'random',
memberName: 'name',
description: 'Responds with a random name, with the gender of your choice.',
args: [
@@ -5,9 +5,9 @@ module.exports = class NumberFactCommand extends Command {
constructor(client) {
super(client, {
name: 'number-fact',
group: 'random-res',
group: 'random',
memberName: 'number-fact',
description: 'Responds with a random fact about a number.',
description: 'Responds with a random fact about a specific number.',
args: [
{
key: 'number',
@@ -6,9 +6,9 @@ module.exports = class OffspringCommand extends Command {
super(client, {
name: 'offspring',
aliases: ['sex'],
group: 'random-res',
group: 'random',
memberName: 'offspring',
description: 'Decides if your new child will be a boy or a girl.'
description: 'Determines if your new child will be a boy or a girl.'
});
}
@@ -6,7 +6,7 @@ module.exports = class PikachuCommand extends Command {
super(client, {
name: 'pikachu',
aliases: ['pika'],
group: 'random-res',
group: 'random',
memberName: 'pikachu',
description: 'Responds with a random image of Pikachu.',
clientPermissions: ['ATTACH_FILES']
@@ -1,18 +1,18 @@
const { Command } = require('discord.js-commando');
const sides = ['on NaN', 'on 0', 'in the air', 'on null', 'on undefined', 'on \'\''];
const sides = [NaN, 0, null, undefined, ''];
module.exports = class QuantumCoinCommand extends Command {
constructor(client) {
super(client, {
name: 'quantum-coin',
aliases: ['q-coin'],
group: 'random-res',
group: 'random',
memberName: 'quantum-coin',
description: 'Flips a coin that lands on some form of nothing.'
});
}
run(msg) {
return msg.say(`It landed ${sides[Math.floor(Math.random() * sides.length)]}.`);
return msg.say(`It landed on ${sides[Math.floor(Math.random() * sides.length)]}.`);
}
};
+18
View File
@@ -0,0 +1,18 @@
const { Command } = require('discord.js-commando');
const quotes = require('../../assets/json/quote');
module.exports = class QuoteCommand extends Command {
constructor(client) {
super(client, {
name: 'quote',
group: 'random',
memberName: 'quote',
description: 'Responds with a random quote.'
});
}
run(msg) {
const quote = quotes[Math.floor(Math.random() * quotes.length)];
return msg.say(`${quote.quote} - _${quote.author}_`);
}
};
@@ -5,9 +5,9 @@ module.exports = class RateWaifuCommand extends Command {
super(client, {
name: 'rate-waifu',
aliases: ['waifu', 'rate'],
group: 'random-res',
group: 'random',
memberName: 'rate-waifu',
description: 'Rates your waifu.',
description: 'Rates a waifu.',
args: [
{
key: 'waifu',
@@ -7,9 +7,9 @@ module.exports = class RedditCommand extends Command {
super(client, {
name: 'reddit',
aliases: ['subreddit'],
group: 'search',
group: 'random',
memberName: 'reddit',
description: 'Gets a random recent post from a subreddit.',
description: 'Responds with a random post from a subreddit.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
@@ -5,7 +5,7 @@ module.exports = class RoastCommand extends Command {
constructor(client) {
super(client, {
name: 'roast',
group: 'random-res',
group: 'random',
memberName: 'roast',
description: 'Roasts a user.',
args: [
@@ -5,7 +5,7 @@ module.exports = class RollCommand extends Command {
super(client, {
name: 'roll',
aliases: ['dice'],
group: 'random-res',
group: 'random',
memberName: 'roll',
description: 'Rolls a dice with a maximum value of your choice.',
args: [
@@ -4,9 +4,9 @@ module.exports = class RouletteCommand extends Command {
constructor(client) {
super(client, {
name: 'roulette',
group: 'random-res',
group: 'random',
memberName: 'roulette',
description: 'Chooses a random member of the server.',
description: 'Randomly chooses a member of the server.',
guildOnly: true
});
}
@@ -4,19 +4,19 @@ module.exports = class ShipCommand extends Command {
constructor(client) {
super(client, {
name: 'ship',
group: 'random-res',
group: 'random',
memberName: 'ship',
description: 'Ships things/people together.',
description: 'Ships two people together.',
args: [
{
key: 'thing1',
key: 'first',
label: 'first name',
prompt: 'Who is the first person in the ship?',
type: 'string',
max: 500
},
{
key: 'thing2',
key: 'second',
label: 'second name',
prompt: 'Who is the second person in the ship?',
type: 'string',
@@ -26,7 +26,7 @@ module.exports = class ShipCommand extends Command {
});
}
run(msg, { thing1, thing2 }) {
return msg.say(`I'd give ${thing1} and ${thing2} a ${Math.floor(Math.random() * 100) + 1}%!`);
run(msg, { first, second }) {
return msg.say(`I'd give ${first} and ${second} a ${Math.floor(Math.random() * 100) + 1}%!`);
}
};
@@ -6,7 +6,7 @@ module.exports = class ShowerThoughtCommand extends Command {
super(client, {
name: 'shower-thought',
aliases: ['shower-thoughts'],
group: 'random-res',
group: 'random',
memberName: 'shower-thought',
description: 'Responds with a random shower thought, directly from r/Showerthoughts.'
});
@@ -6,9 +6,9 @@ module.exports = class WouldYouRatherCommand extends Command {
super(client, {
name: 'would-you-rather',
aliases: ['wy-rather'],
group: 'random-res',
group: 'random',
memberName: 'would-you-rather',
description: 'Responds with a random would you rather question.'
description: 'Responds with a random "Would you rather ...?" question.'
});
}
@@ -6,7 +6,7 @@ module.exports = class XiaoCommand extends Command {
super(client, {
name: 'xiao',
aliases: ['xiao-pai', 'iao'],
group: 'random-res',
group: 'random',
memberName: 'xiao',
description: 'Responds with a random image of Xiao Pai.',
clientPermissions: ['ATTACH_FILES']
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = class BotInfoCommand extends Command {
aliases: ['discord-bots', 'dbots'],
group: 'search',
memberName: 'bot-info',
description: 'Searches Discord Bots for information on a bot.',
description: 'Responds with information on a specific Discord bot.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = class BulbapediaCommand extends Command {
.setTitle(data.title)
.setAuthor('Bulbapedia', 'https://i.imgur.com/ePpoeFA.png')
.setThumbnail(data.thumbnail ? data.thumbnail.source : null)
.setURL(`https://bulbapedia.bulbagarden.net/wiki/${encodeURIComponent(query.replace(/\)/g, '%29'))}`)
.setURL(`https://bulbapedia.bulbagarden.net/wiki/${encodeURIComponent(query).replace(/\)/g, '%29')}`)
.setDescription(shorten(data.extract.replace(/\n/g, '\n\n')));
return msg.embed(embed);
} catch (err) {
+4 -4
View File
@@ -13,19 +13,19 @@ module.exports = class DictionaryCommand extends Command {
description: 'Defines a word.',
args: [
{
key: 'query',
key: 'word',
prompt: 'What word would you like to look up?',
type: 'string',
parse: query => encodeURIComponent(query)
parse: word => encodeURIComponent(word)
}
]
});
}
async run(msg, { query }) {
async run(msg, { word }) {
try {
const { body } = await snekfetch
.get(`http://api.wordnik.com/v4/word.json/${query}/definitions`)
.get(`http://api.wordnik.com/v4/word.json/${word}/definitions`)
.query({
limit: 1,
includeRelated: false,
+1 -1
View File
@@ -11,7 +11,7 @@ module.exports = class GitHubCommand extends Command {
aliases: ['github-repository', 'github-repo', 'git-repo'],
group: 'search',
memberName: 'github',
description: 'Searches GitHub for information on a repository.',
description: 'Responds with information on a GitHub repository.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = class GoogleAutofillCommand extends Command {
aliases: ['google-autocomplete', 'autofill', 'autocomplete'],
group: 'search',
memberName: 'google-autofill',
description: 'Gets a list of Google Autofill results for a particular query.',
description: 'Responds with a list of the Google Autofill results for a particular query.',
args: [
{
key: 'query',
+3 -3
View File
@@ -12,7 +12,7 @@ module.exports = class JishoCommand extends Command {
description: 'Defines a word, but with Japanese.',
args: [
{
key: 'query',
key: 'word',
prompt: 'What word would you like to look up?',
type: 'string'
}
@@ -20,11 +20,11 @@ module.exports = class JishoCommand extends Command {
});
}
async run(msg, { query }) {
async run(msg, { word }) {
try {
const { body } = await snekfetch
.get('http://jisho.org/api/v1/search/words')
.query({ keyword: query });
.query({ keyword: word });
if (!body.data.length) return msg.say('Could not find any results.');
const data = body.data[0];
return msg.say(stripIndents`
@@ -8,10 +8,10 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
constructor(client) {
super(client, {
name: 'league-of-legends-champion',
aliases: ['lol-champion', 'champion', 'league-of-legends-champ', 'lol-champ', 'champ'],
aliases: ['lol-champion', 'league-of-legends-champ', 'lol-champ'],
group: 'search',
memberName: 'league-of-legends-champion',
description: 'Gets information on a League of Legends champion.',
description: 'Responds with information on a League of Legends champion.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
@@ -79,9 +79,9 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
.addField(' Spell Block',
`${data.stats.spellblock} (${data.stats.spellblockperlevel}/level)`, true)
.addField(' Passive',
data.passive.name)
data.passive.name, true)
.addField(' Spells',
data.spells.map((spell, i) => `${spell.name} (${buttons[i]})`).join('\n'));
data.spells.map((spell, i) => `${spell.name} (${buttons[i]})`).join('\n'), true);
return msg.say(`Tip: ${tips[Math.floor(Math.random() * tips.length)]}`, { embed });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+5 -5
View File
@@ -9,7 +9,7 @@ module.exports = class MapCommand extends Command {
aliases: ['google-maps', 'google-map'],
group: 'search',
memberName: 'map',
description: 'Responds with a map based upon your query.',
description: 'Responds with a map of a specific location.',
clientPermissions: ['ATTACH_FILES'],
args: [
{
@@ -21,7 +21,7 @@ module.exports = class MapCommand extends Command {
max: 20
},
{
key: 'query',
key: 'location',
prompt: 'What location would you like to get a map of?',
type: 'string'
}
@@ -29,17 +29,17 @@ module.exports = class MapCommand extends Command {
});
}
async run(msg, { zoom, query }) {
async run(msg, { zoom, location }) {
try {
const { body } = await snekfetch
.get('https://maps.googleapis.com/maps/api/staticmap')
.query({
center: query,
center: location,
zoom,
size: '500x500',
key: GOOGLE_KEY
});
const url = `https://www.google.com/maps/search/${encodeURIComponent(query)}`;
const url = `https://www.google.com/maps/search/${encodeURIComponent(location)}`;
return msg.say(`<${url}>`, { files: [{ attachment: body, name: 'map.png' }] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class NASACommand extends Command {
aliases: ['nasa-image'],
group: 'search',
memberName: 'nasa',
description: 'Responds with an image from NASA based upon your query.',
description: 'Search NASA\'s image archive for your query.',
clientPermissions: ['ATTACH_FILES'],
args: [
{
+4 -4
View File
@@ -8,10 +8,10 @@ module.exports = class NeopetCommand extends Command {
aliases: ['neopet-image', 'neopet-image-finder'],
group: 'search',
memberName: 'neopet',
description: 'Searches for Neopets with the username of your query.',
description: 'Responds with the image of a specific Neopet.',
args: [
{
key: 'query',
key: 'pet',
prompt: 'What pet would you like to get an image of?',
type: 'string'
}
@@ -19,12 +19,12 @@ module.exports = class NeopetCommand extends Command {
});
}
async run(msg, { query }) {
async run(msg, { pet }) {
try {
const { text } = await snekfetch
.get('http://www.sunnyneo.com/petimagefinder.php')
.query({
name: query,
name: pet,
size: 5,
mood: 1
});
+1 -1
View File
@@ -11,7 +11,7 @@ module.exports = class NewYorkTimesCommand extends Command {
aliases: ['ny-times', 'new-york-times-article', 'ny-times-article'],
group: 'search',
memberName: 'new-york-times',
description: 'Responds with an article from the New York Times.',
description: 'Searches the New York Times for your query.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
+7 -6
View File
@@ -10,22 +10,23 @@ module.exports = class NPMCommand extends Command {
aliases: ['npm-package'],
group: 'search',
memberName: 'npm',
description: 'Gets information on an NPM package.',
description: 'Responds with information on an NPM package.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'query',
key: 'pkg',
label: 'package',
prompt: 'What package would you like to get information on?',
type: 'string',
parse: query => encodeURIComponent(query.replace(/ /g, '-'))
parse: pkg => encodeURIComponent(pkg.replace(/ /g, '-'))
}
]
});
}
async run(msg, { query }) {
async run(msg, { pkg }) {
try {
const { body } = await snekfetch.get(`https://registry.npmjs.com/${query}`);
const { body } = await snekfetch.get(`https://registry.npmjs.com/${pkg}`);
const version = body.versions[body['dist-tags'].latest];
const maintainers = trimArray(body.maintainers.map(user => user.name));
const dependencies = version.dependencies ? trimArray(Object.keys(version.dependencies)) : null;
@@ -33,7 +34,7 @@ module.exports = class NPMCommand extends Command {
.setColor(0xCB0000)
.setAuthor('NPM', 'https://i.imgur.com/ErKf5Y0.png')
.setTitle(body.name)
.setURL(`https://www.npmjs.com/package/${query}`)
.setURL(`https://www.npmjs.com/package/${pkg}`)
.setDescription(body.description || 'No description.')
.addField(' Version',
body['dist-tags'].latest, true)
+4 -4
View File
@@ -10,11 +10,11 @@ module.exports = class OsuCommand extends Command {
aliases: ['osu-user', 'osu-stats'],
group: 'search',
memberName: 'osu',
description: 'Searches osu! usernames for your query.',
description: 'Responds with information on an Osu! user.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'query',
key: 'user',
prompt: 'What user would you like to get information on?',
type: 'string'
}
@@ -22,13 +22,13 @@ module.exports = class OsuCommand extends Command {
});
}
async run(msg, { query }) {
async run(msg, { user }) {
try {
const { body } = await snekfetch
.get('https://osu.ppy.sh/api/get_user')
.query({
k: OSU_KEY,
u: query,
u: user,
type: 'string'
});
if (!body.length) return msg.say('Could not find any results.');
+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = class RecipeCommand extends Command {
aliases: ['recipe-puppy'],
group: 'search',
memberName: 'recipe',
description: 'Searches for recipes that include your query.',
description: 'Searches for recipes based on your query.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
+2 -2
View File
@@ -10,12 +10,12 @@ module.exports = class StocksCommand extends Command {
aliases: ['stock', 'alpha-vantage'],
group: 'search',
memberName: 'stocks',
description: 'Get the current stocks for a symbol.',
description: 'Responds with the current stocks for a specific symbol.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'symbol',
prompt: 'What symbol would you like to get the stocks for?',
prompt: 'What symbol would you like to get the stocks of?',
type: 'string'
}
]
+6 -6
View File
@@ -10,22 +10,22 @@ module.exports = class ThesaurusCommand extends Command {
aliases: ['synonym', 'antonym', 'wordnik-thesaurus'],
group: 'search',
memberName: 'thesaurus',
description: 'Gets the synonyms and antonyms of a word.',
description: 'Responds with the synonyms and antonyms of a word.',
args: [
{
key: 'query',
key: 'word',
prompt: 'What word would you like to look up?',
type: 'string',
parse: query => encodeURIComponent(query)
parse: word => encodeURIComponent(word)
}
]
});
}
async run(msg, { query }) {
async run(msg, { word }) {
try {
const { body } = await snekfetch
.get(`http://api.wordnik.com/v4/word.json/${query}/relatedWords`)
.get(`http://api.wordnik.com/v4/word.json/${word}/relatedWords`)
.query({
relationshipTypes: 'synonym,antonym',
limitPerRelationshipType: 5,
@@ -35,7 +35,7 @@ module.exports = class ThesaurusCommand extends Command {
const synonyms = body.find(words => words.relationshipType === 'synonym');
const antonyms = body.find(words => words.relationshipType === 'antonym');
return msg.say(stripIndents`
**${query}**
**${word}**
__Synonyms:__ ${synonyms ? synonyms.words.join(', ') : '???'}
__Antonyms:__ ${antonyms ? antonyms.words.join(', ') : '???'}
`);
+2 -2
View File
@@ -10,12 +10,12 @@ module.exports = class TumblrCommand extends Command {
aliases: ['tumblr-blog'],
group: 'search',
memberName: 'tumblr',
description: 'Searches Tumblr for information on a blog.',
description: 'Responds with information on a Tumblr blog.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'blog',
prompt: 'What is the url of the blog you would like to get information on?',
prompt: 'What blog would you like to get information on?',
type: 'string',
parse: blog => encodeURIComponent(blog)
}
+5 -5
View File
@@ -10,23 +10,23 @@ module.exports = class UrbanDictionaryCommand extends Command {
aliases: ['urban', 'define-urban'],
group: 'search',
memberName: 'urban-dictionary',
description: 'Searches Urban Dictionary for your query.',
description: 'Defines a word, but with Urban Dictionary.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'query',
prompt: 'What would you like to define?',
key: 'word',
prompt: 'What word would you like to look up?',
type: 'string'
}
]
});
}
async run(msg, { query }) {
async run(msg, { word }) {
try {
const { body } = await snekfetch
.get('http://api.urbandictionary.com/v0/define')
.query({ term: query });
.query({ term: word });
if (!body.list.length) return msg.say('Could not find any results.');
const data = body.list[Math.floor(Math.random() * body.list.length)];
const embed = new MessageEmbed()
+4 -4
View File
@@ -10,11 +10,11 @@ module.exports = class WeatherCommand extends Command {
aliases: ['open-weather-map'],
group: 'search',
memberName: 'weather',
description: 'Responds with weather information for a specified location.',
description: 'Responds with weather information for a specific location.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'query',
key: 'location',
prompt: 'What location would you like to get the weather of?',
type: 'string'
}
@@ -22,12 +22,12 @@ module.exports = class WeatherCommand extends Command {
});
}
async run(msg, { query }) {
async run(msg, { location }) {
try {
const { body } = await snekfetch
.get('http://api.openweathermap.org/data/2.5/weather')
.query({
q: query,
q: location,
units: 'metric',
appid: OWM_KEY
});
+9 -15
View File
@@ -21,30 +21,24 @@ module.exports = class What3WordsCommand extends Command {
max: 20
},
{
key: 'word1',
prompt: 'What is the first word you would like to use?',
type: 'string'
},
{
key: 'word2',
prompt: 'What is the second word you would like to use?',
type: 'string'
},
{
key: 'word3',
prompt: 'What is the third word you would like to use?',
type: 'string'
key: 'location',
prompt: 'What location would you like to get a map of? Use three nouns, like "cat.dog.parrot".',
type: 'string',
validate: location => {
if (location.split('.').length === 3) return true;
return 'Invalid location, please enter a valid location, like "cat.dog.parrot".';
}
}
]
});
}
async run(msg, { zoom, word1, word2, word3 }) {
async run(msg, { zoom, location }) {
try {
const { body } = await snekfetch
.get('https://api.what3words.com/v2/forward')
.query({
addr: `${word1}.${word2}.${word3}`,
addr: location,
key: W3W_KEY
});
if (body.status.code === 300) return msg.say('Could not find any results.');

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