diff --git a/XiaoBot.js b/XiaoBot.js index eb6ccbe6..6671b55a 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -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'], diff --git a/assets/json/apples-to-apples.json b/assets/json/apples-to-apples.json index df735c20..97b87815 100644 --- a/assets/json/apples-to-apples.json +++ b/assets/json/apples-to-apples.json @@ -997,6 +997,7 @@ "X-Rays", "Yellowstone Park", "Zen", - "Zucchini" + "Zucchini", + "" ] } diff --git a/assets/json/cards-against-humanity.json b/assets/json/cards-against-humanity.json index 44d7efc8..675a9fc3 100644 --- a/assets/json/cards-against-humanity.json +++ b/assets/json/cards-against-humanity.json @@ -3216,6 +3216,7 @@ "A Molson muscle.", "The Royal Canadian Mounted Police.", "An icy handjob from an Edmonton hooker.", - "eat pant." + "eat pant.", + "" ] } diff --git a/assets/json/guess-looks.json b/assets/json/guess-looks.json new file mode 100644 index 00000000..e2615252 --- /dev/null +++ b/assets/json/guess-looks.json @@ -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" + ] +} diff --git a/assets/json/magic-conch.json b/assets/json/magic-conch.json new file mode 100644 index 00000000..8e1ac304 --- /dev/null +++ b/assets/json/magic-conch.json @@ -0,0 +1,8 @@ +[ + "Maybe someday", + "Nothing", + "Neither", + "I don't think so", + "Yes", + "Try asking again" +] diff --git a/assets/json/quote.json b/assets/json/quote.json new file mode 100644 index 00000000..671bffcc --- /dev/null +++ b/assets/json/quote.json @@ -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": "You’ve got mountains of your own, I’ll bet on it. Take heart. Be encouraged. Remain steadfast. Hang on for dear life. You’ve got a better grip than you realize.", + "author": "Adam Young" + }, + { + "quote": "Eat pant.", + "author": "Dragon Fire" + } +] diff --git a/assets/json/soundboard.json b/assets/json/soundboard.json new file mode 100644 index 00000000..9129627e --- /dev/null +++ b/assets/json/soundboard.json @@ -0,0 +1,8 @@ +[ + "airhorn", + "cat", + "dun-dun-dun", + "laugh track", + "pikachu", + "space" +] diff --git a/commands/avatar-edit/contrast.js b/commands/avatar-edit/contrast.js index dddc85e4..bf5b19b8 100644 --- a/commands/avatar-edit/contrast.js +++ b/commands/avatar-edit/contrast.js @@ -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 diff --git a/commands/avatar-edit/dexter.js b/commands/avatar-edit/dexter.js index 8f36e1aa..0bf83ae7 100644 --- a/commands/avatar-edit/dexter.js +++ b/commands/avatar-edit/dexter.js @@ -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 diff --git a/commands/avatar-edit/invert.js b/commands/avatar-edit/invert.js index f3e6421e..0c89f24d 100644 --- a/commands/avatar-edit/invert.js +++ b/commands/avatar-edit/invert.js @@ -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 diff --git a/commands/avatar-edit/look-what-karen-have.js b/commands/avatar-edit/look-what-karen-have.js index 624b5224..d89291ed 100644 --- a/commands/avatar-edit/look-what-karen-have.js +++ b/commands/avatar-edit/look-what-karen-have.js @@ -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 diff --git a/commands/avatar-edit/pixelize.js b/commands/avatar-edit/pixelize.js index 78952d5c..4f47b7a7 100644 --- a/commands/avatar-edit/pixelize.js +++ b/commands/avatar-edit/pixelize.js @@ -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 diff --git a/commands/avatar-edit/steam-card.js b/commands/avatar-edit/steam-card.js index c8072c98..7246f621 100644 --- a/commands/avatar-edit/steam-card.js +++ b/commands/avatar-edit/steam-card.js @@ -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, diff --git a/commands/avatar-edit/triggered.js b/commands/avatar-edit/triggered.js index 37b8b6cc..2bee4ed0 100644 --- a/commands/avatar-edit/triggered.js +++ b/commands/avatar-edit/triggered.js @@ -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 diff --git a/commands/events/days-until.js b/commands/events/days-until.js index 01f5bdf9..7f532d76 100644 --- a/commands/events/days-until.js +++ b/commands/events/days-until.js @@ -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', diff --git a/commands/events/google-doodle.js b/commands/events/google-doodle.js index 6d1e7d26..eecf5f00 100644 --- a/commands/events/google-doodle.js +++ b/commands/events/google-doodle.js @@ -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: [ { diff --git a/commands/events/horoscope.js b/commands/events/horoscope.js index f975cedd..2b8fa1c2 100644 --- a/commands/events/horoscope.js +++ b/commands/events/horoscope.js @@ -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: [ diff --git a/commands/events/today-in-history.js b/commands/events/today-in-history.js index b1a61d9e..e8b7c3e9 100644 --- a/commands/events/today-in-history.js +++ b/commands/events/today-in-history.js @@ -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!`); } } diff --git a/commands/events/word-of-the-day.js b/commands/events/word-of-the-day.js index 0964ea8b..5b055e95 100644 --- a/commands/events/word-of-the-day.js +++ b/commands/events/word-of-the-day.js @@ -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.' }); } diff --git a/commands/events/xkcd.js b/commands/events/xkcd.js index 789084d4..990c87ec 100644 --- a/commands/events/xkcd.js +++ b/commands/events/xkcd.js @@ -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() diff --git a/commands/games/akinator.js b/commands/games/akinator.js index 95280f08..62fb42f9 100644 --- a/commands/games/akinator.js +++ b/commands/games/akinator.js @@ -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); diff --git a/commands/games/apples-to-apples.js b/commands/games/apples-to-apples.js index 36d926a7..a500ff92 100644 --- a/commands/games/apples-to-apples.js +++ b/commands/games/apples-to-apples.js @@ -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 === '') { + 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(''); + chosen = blank.first().content; + } else { + player.hand.delete(chosen); + } chosenCards.push({ id: player.id, card: chosen diff --git a/commands/games/cards-against-humanity.js b/commands/games/cards-against-humanity.js index 1663e3f6..76584b9a 100644 --- a/commands/games/cards-against-humanity.js +++ b/commands/games/cards-against-humanity.js @@ -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('')) { + 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(''); + chosen[chosen.indexOf('')] = blank.first().content; + } for (const card of chosen) player.hand.delete(card); chosenCards.push({ id: player.id, diff --git a/commands/games/emoji-emoji-revolution.js b/commands/games/emoji-emoji-revolution.js index eec73791..15d7084f 100644 --- a/commands/games/emoji-emoji-revolution.js +++ b/commands/games/emoji-emoji-revolution.js @@ -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: [ { diff --git a/commands/games/gunfight.js b/commands/games/gunfight.js index 0f45bfb8..a32556ac 100644 --- a/commands/games/gunfight.js +++ b/commands/games/gunfight.js @@ -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: [ { diff --git a/commands/games/hangman.js b/commands/games/hangman.js index 3025d9bd..05901932 100644 --- a/commands/games/hangman.js +++ b/commands/games/hangman.js @@ -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(); diff --git a/commands/games/hunger-games.js b/commands/games/hunger-games.js index ed854d3f..34bf5104 100644 --- a/commands/games/hunger-games.js +++ b/commands/games/hunger-games.js @@ -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', diff --git a/commands/games/lottery.js b/commands/games/lottery.js index 50c87c8a..9e12cda0 100644 --- a/commands/games/lottery.js +++ b/commands/games/lottery.js @@ -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.'); } diff --git a/commands/games/math-game.js b/commands/games/math.js similarity index 98% rename from commands/games/math-game.js rename to commands/games/math.js index 8253aa74..0545dcfd 100644 --- a/commands/games/math-game.js +++ b/commands/games/math.js @@ -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: [ { diff --git a/commands/games/tic-tac-toe.js b/commands/games/tic-tac-toe.js index d861c8b9..226e3391 100644 --- a/commands/games/tic-tac-toe.js +++ b/commands/games/tic-tac-toe.js @@ -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', diff --git a/commands/games/typing-game.js b/commands/games/typing.js similarity index 98% rename from commands/games/typing-game.js rename to commands/games/typing.js index 55ce1707..d7d2e48a 100644 --- a/commands/games/typing-game.js +++ b/commands/games/typing.js @@ -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: [ { diff --git a/commands/games/wizard-convention.js b/commands/games/wizard-convention.js index 2c3d0537..723905bf 100644 --- a/commands/games/wizard-convention.js +++ b/commands/games/wizard-convention.js @@ -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...'); diff --git a/commands/info/channel-info.js b/commands/info/channel-info.js index 994c5b92..01c56118 100644 --- a/commands/info/channel-info.js +++ b/commands/info/channel-info.js @@ -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'], diff --git a/commands/info/discriminator.js b/commands/info/discriminator.js index ad552845..8bb77a1b 100644 --- a/commands/info/discriminator.js +++ b/commands/info/discriminator.js @@ -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: '', diff --git a/commands/info/emoji-info.js b/commands/info/emoji-info.js index 9db24cc1..3f17e5cc 100644 --- a/commands/info/emoji-info.js +++ b/commands/info/emoji-info.js @@ -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'], diff --git a/commands/info/role-info.js b/commands/info/role-info.js index 5f1a54b7..a9f22bd4 100644 --- a/commands/info/role-info.js +++ b/commands/info/role-info.js @@ -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'], diff --git a/commands/info/server-info.js b/commands/info/server-info.js index 7745ee0e..aa239f55 100644 --- a/commands/info/server-info.js +++ b/commands/info/server-info.js @@ -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'] diff --git a/commands/info/user-info.js b/commands/info/user-info.js index 30722f63..5e183ce9 100644 --- a/commands/info/user-info.js +++ b/commands/info/user-info.js @@ -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'], diff --git a/commands/num-edit/currency.js b/commands/number-edit/currency.js similarity index 95% rename from commands/num-edit/currency.js rename to commands/number-edit/currency.js index ed67f259..49aaa59c 100644 --- a/commands/num-edit/currency.js +++ b/commands/number-edit/currency.js @@ -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: [ { diff --git a/commands/num-edit/math.js b/commands/number-edit/math.js similarity index 89% rename from commands/num-edit/math.js rename to commands/number-edit/math.js index 7cc31437..e073cb31 100644 --- a/commands/num-edit/math.js +++ b/commands/number-edit/math.js @@ -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', diff --git a/commands/num-edit/temperature.js b/commands/number-edit/temperature.js similarity index 98% rename from commands/num-edit/temperature.js rename to commands/number-edit/temperature.js index b9c0b498..32d6deda 100644 --- a/commands/num-edit/temperature.js +++ b/commands/number-edit/temperature.js @@ -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: [ diff --git a/commands/other/cleverbot.js b/commands/other/cleverbot.js index 6bd91e82..9de6f5c4 100644 --- a/commands/other/cleverbot.js +++ b/commands/other/cleverbot.js @@ -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: [ { diff --git a/commands/other/coolness.js b/commands/other/coolness.js index 9d259847..c626ed03 100644 --- a/commands/other/coolness.js +++ b/commands/other/coolness.js @@ -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', diff --git a/commands/other/soundboard.js b/commands/other/soundboard.js index 881e63e6..293ceb14 100644 --- a/commands/other/soundboard.js +++ b/commands/other/soundboard.js @@ -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) { diff --git a/commands/other/spoopy-link.js b/commands/other/spoopy-link.js index 606b55a3..fc79f890 100644 --- a/commands/other/spoopy-link.js +++ b/commands/other/spoopy-link.js @@ -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) { diff --git a/commands/other/strawpoll.js b/commands/other/strawpoll.js index 1268f0c8..776738b6 100644 --- a/commands/other/strawpoll.js +++ b/commands/other/strawpoll.js @@ -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', diff --git a/commands/random-res/quote.js b/commands/random-res/quote.js deleted file mode 100644 index 13c757bb..00000000 --- a/commands/random-res/quote.js +++ /dev/null @@ -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!`); - } - } -}; diff --git a/commands/random-res/security-key.js b/commands/random-res/security-key.js deleted file mode 100644 index 3b5b915c..00000000 --- a/commands/random-res/security-key.js +++ /dev/null @@ -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')); - } -}; diff --git a/commands/random-res/8-ball.js b/commands/random/8-ball.js similarity index 96% rename from commands/random-res/8-ball.js rename to commands/random/8-ball.js index 05f3bf49..f0db9149 100644 --- a/commands/random-res/8-ball.js +++ b/commands/random/8-ball.js @@ -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: [ diff --git a/commands/random-res/cat-fact.js b/commands/random/cat-fact.js similarity index 84% rename from commands/random-res/cat-fact.js rename to commands/random/cat-fact.js index dd059365..25e9912d 100644 --- a/commands/random-res/cat-fact.js +++ b/commands/random/cat-fact.js @@ -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.' }); } diff --git a/commands/random-res/cat.js b/commands/random/cat.js similarity index 96% rename from commands/random-res/cat.js rename to commands/random/cat.js index b8a0c034..b31ab82d 100644 --- a/commands/random-res/cat.js +++ b/commands/random/cat.js @@ -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'] diff --git a/commands/random-res/charlie-charlie-challenge.js b/commands/random/charlie-charlie-challenge.js similarity index 98% rename from commands/random-res/charlie-charlie-challenge.js rename to commands/random/charlie-charlie-challenge.js index 26229344..4fd99b88 100644 --- a/commands/random-res/charlie-charlie-challenge.js +++ b/commands/random/charlie-charlie-challenge.js @@ -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: [ diff --git a/commands/random-res/choose.js b/commands/random/choose.js similarity index 95% rename from commands/random-res/choose.js rename to commands/random/choose.js index 78f67961..e0ce6a09 100644 --- a/commands/random-res/choose.js +++ b/commands/random/choose.js @@ -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: [ diff --git a/commands/random-res/chuck-norris.js b/commands/random/chuck-norris.js similarity index 90% rename from commands/random-res/chuck-norris.js rename to commands/random/chuck-norris.js index 5b1eec98..43480b68 100644 --- a/commands/random-res/chuck-norris.js +++ b/commands/random/chuck-norris.js @@ -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', diff --git a/commands/random-res/coin.js b/commands/random/coin.js similarity index 94% rename from commands/random-res/coin.js rename to commands/random/coin.js index c1dc6fcc..21e57229 100644 --- a/commands/random-res/coin.js +++ b/commands/random/coin.js @@ -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.' }); diff --git a/commands/random-res/compliment.js b/commands/random/compliment.js similarity index 96% rename from commands/random-res/compliment.js rename to commands/random/compliment.js index d6277d45..0169337a 100644 --- a/commands/random-res/compliment.js +++ b/commands/random/compliment.js @@ -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: [ diff --git a/commands/random-res/dog-fact.js b/commands/random/dog-fact.js similarity index 84% rename from commands/random-res/dog-fact.js rename to commands/random/dog-fact.js index 6b1730ad..71c1349c 100644 --- a/commands/random-res/dog-fact.js +++ b/commands/random/dog-fact.js @@ -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.' }); } diff --git a/commands/random-res/dog.js b/commands/random/dog.js similarity index 96% rename from commands/random-res/dog.js rename to commands/random/dog.js index 0c2901aa..849edc92 100644 --- a/commands/random-res/dog.js +++ b/commands/random/dog.js @@ -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'] diff --git a/commands/random-res/fact-core.js b/commands/random/fact-core.js similarity index 94% rename from commands/random-res/fact-core.js rename to commands/random/fact-core.js index d42154f2..fa25ef1d 100644 --- a/commands/random-res/fact-core.js +++ b/commands/random/fact-core.js @@ -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.' }); diff --git a/commands/random-res/fidget.js b/commands/random/fidget.js similarity index 95% rename from commands/random-res/fidget.js rename to commands/random/fidget.js index 06d58b87..e987fba6 100644 --- a/commands/random-res/fidget.js +++ b/commands/random/fidget.js @@ -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'] diff --git a/commands/random-res/fortune.js b/commands/random/fortune.js similarity index 96% rename from commands/random-res/fortune.js rename to commands/random/fortune.js index d7f5c243..699a49e4 100644 --- a/commands/random-res/fortune.js +++ b/commands/random/fortune.js @@ -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.' }); diff --git a/commands/random-res/guess-my-looks.js b/commands/random/guess-looks.js similarity index 68% rename from commands/random-res/guess-my-looks.js rename to commands/random/guess-looks.js index d6781171..a9113092 100644 --- a/commands/random-res/guess-my-looks.js +++ b/commands/random/guess-looks.js @@ -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', diff --git a/commands/random-res/joke.js b/commands/random/joke.js similarity index 94% rename from commands/random-res/joke.js rename to commands/random/joke.js index 94e3abe1..235a6fbb 100644 --- a/commands/random-res/joke.js +++ b/commands/random/joke.js @@ -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.' }); diff --git a/commands/random-res/kiss-marry-kill.js b/commands/random/kiss-marry-kill.js similarity index 77% rename from commands/random-res/kiss-marry-kill.js rename to commands/random/kiss-marry-kill.js index 5ccd0549..8ff5c8cb 100644 --- a/commands/random-res/kiss-marry-kill.js +++ b/commands/random/kiss-marry-kill.js @@ -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]}.`); } }; diff --git a/commands/random-res/magic-conch.js b/commands/random/magic-conch.js similarity index 83% rename from commands/random-res/magic-conch.js rename to commands/random/magic-conch.js index a3c5660e..c096c7a4 100644 --- a/commands/random-res/magic-conch.js +++ b/commands/random/magic-conch.js @@ -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: [ diff --git a/commands/random-res/name.js b/commands/random/name.js similarity index 97% rename from commands/random-res/name.js rename to commands/random/name.js index 398083f5..9cf0f8ec 100644 --- a/commands/random-res/name.js +++ b/commands/random/name.js @@ -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: [ diff --git a/commands/random-res/number-fact.js b/commands/random/number-fact.js similarity index 88% rename from commands/random-res/number-fact.js rename to commands/random/number-fact.js index 3a0f1a66..f5cd20a4 100644 --- a/commands/random-res/number-fact.js +++ b/commands/random/number-fact.js @@ -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', diff --git a/commands/random-res/offspring.js b/commands/random/offspring.js similarity index 79% rename from commands/random-res/offspring.js rename to commands/random/offspring.js index 1803babc..e25d4868 100644 --- a/commands/random-res/offspring.js +++ b/commands/random/offspring.js @@ -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.' }); } diff --git a/commands/random-res/pikachu.js b/commands/random/pikachu.js similarity index 95% rename from commands/random-res/pikachu.js rename to commands/random/pikachu.js index 9863af90..2e20d5b3 100644 --- a/commands/random-res/pikachu.js +++ b/commands/random/pikachu.js @@ -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'] diff --git a/commands/random-res/quantum-coin.js b/commands/random/quantum-coin.js similarity index 63% rename from commands/random-res/quantum-coin.js rename to commands/random/quantum-coin.js index 7b3c9535..7cabf894 100644 --- a/commands/random-res/quantum-coin.js +++ b/commands/random/quantum-coin.js @@ -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)]}.`); } }; diff --git a/commands/random/quote.js b/commands/random/quote.js new file mode 100644 index 00000000..a20a3584 --- /dev/null +++ b/commands/random/quote.js @@ -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}_`); + } +}; diff --git a/commands/random-res/rate-waifu.js b/commands/random/rate-waifu.js similarity index 88% rename from commands/random-res/rate-waifu.js rename to commands/random/rate-waifu.js index b96ff594..f11b405b 100644 --- a/commands/random-res/rate-waifu.js +++ b/commands/random/rate-waifu.js @@ -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', diff --git a/commands/search/reddit.js b/commands/random/reddit.js similarity index 95% rename from commands/search/reddit.js rename to commands/random/reddit.js index a340c745..4389ad02 100644 --- a/commands/search/reddit.js +++ b/commands/random/reddit.js @@ -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: [ { diff --git a/commands/random-res/roast.js b/commands/random/roast.js similarity index 95% rename from commands/random-res/roast.js rename to commands/random/roast.js index 5e1d775b..2aac50bd 100644 --- a/commands/random-res/roast.js +++ b/commands/random/roast.js @@ -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: [ diff --git a/commands/random-res/roll.js b/commands/random/roll.js similarity index 95% rename from commands/random-res/roll.js rename to commands/random/roll.js index 85afa116..6c4cd7a0 100644 --- a/commands/random-res/roll.js +++ b/commands/random/roll.js @@ -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: [ diff --git a/commands/random-res/roulette.js b/commands/random/roulette.js similarity index 79% rename from commands/random-res/roulette.js rename to commands/random/roulette.js index 1b0d77d9..00ce5339 100644 --- a/commands/random-res/roulette.js +++ b/commands/random/roulette.js @@ -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 }); } diff --git a/commands/random-res/ship.js b/commands/random/ship.js similarity index 66% rename from commands/random-res/ship.js rename to commands/random/ship.js index f3659604..b2f9cb10 100644 --- a/commands/random-res/ship.js +++ b/commands/random/ship.js @@ -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}%!`); } }; diff --git a/commands/random-res/shower-thought.js b/commands/random/shower-thought.js similarity index 97% rename from commands/random-res/shower-thought.js rename to commands/random/shower-thought.js index 4a492be8..e72bd21e 100644 --- a/commands/random-res/shower-thought.js +++ b/commands/random/shower-thought.js @@ -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.' }); diff --git a/commands/random-res/would-you-rather.js b/commands/random/would-you-rather.js similarity index 81% rename from commands/random-res/would-you-rather.js rename to commands/random/would-you-rather.js index a51a326d..c7fc9e9b 100644 --- a/commands/random-res/would-you-rather.js +++ b/commands/random/would-you-rather.js @@ -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.' }); } diff --git a/commands/random-res/xiao.js b/commands/random/xiao.js similarity index 95% rename from commands/random-res/xiao.js rename to commands/random/xiao.js index 8006fcac..d108fd7b 100644 --- a/commands/random-res/xiao.js +++ b/commands/random/xiao.js @@ -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'] diff --git a/commands/search/bot-info.js b/commands/search/bot-info.js index bbcf93cf..67149c7c 100644 --- a/commands/search/bot-info.js +++ b/commands/search/bot-info.js @@ -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: [ { diff --git a/commands/search/bulbapedia.js b/commands/search/bulbapedia.js index c743f950..305999ec 100644 --- a/commands/search/bulbapedia.js +++ b/commands/search/bulbapedia.js @@ -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) { diff --git a/commands/search/dictionary.js b/commands/search/dictionary.js index 5c67c282..b34d4874 100644 --- a/commands/search/dictionary.js +++ b/commands/search/dictionary.js @@ -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, diff --git a/commands/search/github.js b/commands/search/github.js index 784edc80..d6ff3386 100644 --- a/commands/search/github.js +++ b/commands/search/github.js @@ -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: [ { diff --git a/commands/search/google-autofill.js b/commands/search/google-autofill.js index aaff1207..ce515513 100644 --- a/commands/search/google-autofill.js +++ b/commands/search/google-autofill.js @@ -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', diff --git a/commands/search/jisho.js b/commands/search/jisho.js index 93ca645d..857c1e6b 100644 --- a/commands/search/jisho.js +++ b/commands/search/jisho.js @@ -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` diff --git a/commands/search/league-of-legends-champion.js b/commands/search/league-of-legends-champion.js index 6a4dd015..b621237a 100644 --- a/commands/search/league-of-legends-champion.js +++ b/commands/search/league-of-legends-champion.js @@ -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!`); diff --git a/commands/search/map.js b/commands/search/map.js index 687af88a..7198f1bd 100644 --- a/commands/search/map.js +++ b/commands/search/map.js @@ -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!`); diff --git a/commands/search/nasa.js b/commands/search/nasa.js index 6213532c..aa28ef47 100644 --- a/commands/search/nasa.js +++ b/commands/search/nasa.js @@ -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: [ { diff --git a/commands/search/neopet.js b/commands/search/neopet.js index 1178d48a..a5d6a34b 100644 --- a/commands/search/neopet.js +++ b/commands/search/neopet.js @@ -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 }); diff --git a/commands/search/new-york-times.js b/commands/search/new-york-times.js index 909b20eb..43186e17 100644 --- a/commands/search/new-york-times.js +++ b/commands/search/new-york-times.js @@ -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: [ { diff --git a/commands/search/npm.js b/commands/search/npm.js index c8fe1f7f..297a04f1 100644 --- a/commands/search/npm.js +++ b/commands/search/npm.js @@ -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) diff --git a/commands/search/osu.js b/commands/search/osu.js index 281122a6..33eb9411 100644 --- a/commands/search/osu.js +++ b/commands/search/osu.js @@ -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.'); diff --git a/commands/search/recipe.js b/commands/search/recipe.js index c1724324..3b938ed6 100644 --- a/commands/search/recipe.js +++ b/commands/search/recipe.js @@ -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: [ { diff --git a/commands/search/stocks.js b/commands/search/stocks.js index 95370ae6..ef67a290 100644 --- a/commands/search/stocks.js +++ b/commands/search/stocks.js @@ -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' } ] diff --git a/commands/search/thesaurus.js b/commands/search/thesaurus.js index 9f857871..e33b45ca 100644 --- a/commands/search/thesaurus.js +++ b/commands/search/thesaurus.js @@ -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(', ') : '???'} `); diff --git a/commands/search/tumblr.js b/commands/search/tumblr.js index 36564752..d519d753 100644 --- a/commands/search/tumblr.js +++ b/commands/search/tumblr.js @@ -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) } diff --git a/commands/search/urban-dictionary.js b/commands/search/urban-dictionary.js index 73cc430a..91c8ce1d 100644 --- a/commands/search/urban-dictionary.js +++ b/commands/search/urban-dictionary.js @@ -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() diff --git a/commands/search/weather.js b/commands/search/weather.js index d8a07536..2688ed56 100644 --- a/commands/search/weather.js +++ b/commands/search/weather.js @@ -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 }); diff --git a/commands/search/what-3-words.js b/commands/search/what-3-words.js index e908758a..db6c6fcd 100644 --- a/commands/search/what-3-words.js +++ b/commands/search/what-3-words.js @@ -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.'); diff --git a/commands/search/wikipedia.js b/commands/search/wikipedia.js index ba00ee23..c270755d 100644 --- a/commands/search/wikipedia.js +++ b/commands/search/wikipedia.js @@ -44,7 +44,7 @@ module.exports = class WikipediaCommand extends Command { .setTitle(data.title) .setAuthor('Wikipedia', 'https://i.imgur.com/Z7NJBK2.png') .setThumbnail(data.thumbnail ? data.thumbnail.source : null) - .setURL(`https://en.wikipedia.org/wiki/${encodeURIComponent(query.replace(/\)/g, '%29'))}`) + .setURL(`https://en.wikipedia.org/wiki/${encodeURIComponent(query).replace(/\)/g, '%29')}`) .setDescription(shorten(data.extract.replace(/\n/g, '\n\n'))); return msg.embed(embed); } catch (err) { diff --git a/commands/single-res/can-you-not.js b/commands/single/can-you-not.js similarity index 92% rename from commands/single-res/can-you-not.js rename to commands/single/can-you-not.js index 52827224..106d523e 100644 --- a/commands/single-res/can-you-not.js +++ b/commands/single/can-you-not.js @@ -4,7 +4,7 @@ module.exports = class CanYouNotCommand extends Command { constructor(client) { super(client, { name: 'can-you-not', - group: 'single-res', + group: 'single', memberName: 'can-you-not', description: 'Can YOU not?' }); diff --git a/commands/single-res/dark-theme-light-theme.js b/commands/single/dark-theme-light-theme.js similarity index 95% rename from commands/single-res/dark-theme-light-theme.js rename to commands/single/dark-theme-light-theme.js index 2b7c722b..3258665b 100644 --- a/commands/single-res/dark-theme-light-theme.js +++ b/commands/single/dark-theme-light-theme.js @@ -5,7 +5,7 @@ module.exports = class DarkThemeLightThemeCommand extends Command { super(client, { name: 'dark-theme-light-theme', aliases: ['light-theme-dark-theme', 'dark-theme', 'light-theme'], - group: 'single-res', + group: 'single', memberName: 'dark-theme-light-theme', description: 'Determines whether you use dark or light theme.', clientPermissions: ['ATTACH_FILES'] diff --git a/commands/single-res/eat-pant.js b/commands/single/eat-pant.js similarity index 86% rename from commands/single-res/eat-pant.js rename to commands/single/eat-pant.js index f6aae436..56386114 100644 --- a/commands/single-res/eat-pant.js +++ b/commands/single/eat-pant.js @@ -4,9 +4,9 @@ module.exports = class EatPantCommand extends Command { constructor(client) { super(client, { name: 'eat-pant', - group: 'single-res', + group: 'single', memberName: 'eat-pant', - description: 'eat pant', + description: 'Eat pant.', clientPermissions: ['ATTACH_FILES'] }); } diff --git a/commands/single-res/give-flower.js b/commands/single/give-flower.js similarity index 94% rename from commands/single-res/give-flower.js rename to commands/single/give-flower.js index d87758cd..f7871f22 100644 --- a/commands/single-res/give-flower.js +++ b/commands/single/give-flower.js @@ -4,7 +4,7 @@ module.exports = class GiveFlowerCommand extends Command { constructor(client) { super(client, { name: 'give-flower', - group: 'single-res', + group: 'single', memberName: 'give-flower', description: 'Gives Xiao Pai a flower.' }); diff --git a/commands/single-res/isnt-joke.js b/commands/single/isnt-joke.js similarity index 94% rename from commands/single-res/isnt-joke.js rename to commands/single/isnt-joke.js index 56a42cd0..6eec252d 100644 --- a/commands/single-res/isnt-joke.js +++ b/commands/single/isnt-joke.js @@ -5,7 +5,7 @@ module.exports = class ItsJokeCommand extends Command { super(client, { name: 'isnt-joke', aliases: ['its-not-joke'], - group: 'single-res', + group: 'single', memberName: 'isnt-joke', description: 'Isn\'t joke...', clientPermissions: ['ATTACH_FILES'] diff --git a/commands/single-res/its-joke.js b/commands/single/its-joke.js similarity index 94% rename from commands/single-res/its-joke.js rename to commands/single/its-joke.js index 60e37ab9..705134e2 100644 --- a/commands/single-res/its-joke.js +++ b/commands/single/its-joke.js @@ -5,7 +5,7 @@ module.exports = class ItsJokeCommand extends Command { super(client, { name: 'its-joke', aliases: ['is-joke'], - group: 'single-res', + group: 'single', memberName: 'its-joke', description: 'It\'s joke!', clientPermissions: ['ATTACH_FILES'] diff --git a/commands/single-res/lenny.js b/commands/single/lenny.js similarity index 92% rename from commands/single-res/lenny.js rename to commands/single/lenny.js index df171eb3..c45629b8 100644 --- a/commands/single-res/lenny.js +++ b/commands/single/lenny.js @@ -4,7 +4,7 @@ module.exports = class LennyCommand extends Command { constructor(client) { super(client, { name: 'lenny', - group: 'single-res', + group: 'single', memberName: 'lenny', description: 'Responds with the lenny face.' }); diff --git a/commands/single-res/nitro.js b/commands/single/nitro.js similarity index 97% rename from commands/single-res/nitro.js rename to commands/single/nitro.js index 2367d866..f557ba6a 100644 --- a/commands/single-res/nitro.js +++ b/commands/single/nitro.js @@ -7,7 +7,7 @@ module.exports = class NitroCommand extends Command { super(client, { name: 'nitro', aliases: ['discord-nitro', 'nitro-message', 'nitro-msg'], - group: 'single-res', + group: 'single', memberName: 'nitro', description: 'Sends the "This message can only be viewed by users with Discord Nitro." message.', clientPermissions: ['EMBED_LINKS'] diff --git a/commands/single-res/slow-clap.js b/commands/single/slow-clap.js similarity index 92% rename from commands/single-res/slow-clap.js rename to commands/single/slow-clap.js index 65025dc7..70f27556 100644 --- a/commands/single-res/slow-clap.js +++ b/commands/single/slow-clap.js @@ -4,7 +4,7 @@ module.exports = class SlowClapCommand extends Command { constructor(client) { super(client, { name: 'slow-clap', - group: 'single-res', + group: 'single', memberName: 'slow-clap', description: '_slow clap_' }); diff --git a/commands/single-res/spam.js b/commands/single/spam.js similarity index 93% rename from commands/single-res/spam.js rename to commands/single/spam.js index 05ac619a..2807a0b8 100644 --- a/commands/single-res/spam.js +++ b/commands/single/spam.js @@ -4,7 +4,7 @@ module.exports = class SpamCommand extends Command { constructor(client) { super(client, { name: 'spam', - group: 'single-res', + group: 'single', memberName: 'spam', description: 'Responds with a picture of Spam.', clientPermissions: ['ATTACH_FILES'] diff --git a/commands/single-res/tableflip.js b/commands/single/tableflip.js similarity index 96% rename from commands/single-res/tableflip.js rename to commands/single/tableflip.js index c78dd8d0..e5def073 100644 --- a/commands/single-res/tableflip.js +++ b/commands/single/tableflip.js @@ -13,7 +13,7 @@ module.exports = class TableflipCommand extends Command { super(client, { name: 'tableflip', aliases: ['a-tableflip', 'animated-tableflip', 'tableflip-animated', 'tableflip-a'], - group: 'single-res', + group: 'single', memberName: 'tableflip', description: 'Flips a table... With animation!' }); diff --git a/commands/single-res/wynaut.js b/commands/single/wynaut.js similarity index 94% rename from commands/single-res/wynaut.js rename to commands/single/wynaut.js index 899f7317..f299c080 100644 --- a/commands/single-res/wynaut.js +++ b/commands/single/wynaut.js @@ -5,7 +5,7 @@ module.exports = class WynautCommand extends Command { super(client, { name: 'wynaut', aliases: ['why-not'], - group: 'single-res', + group: 'single', memberName: 'wynaut', description: 'Why not? Wynaut?', clientPermissions: ['ATTACH_FILES'] diff --git a/commands/text-edit/b.js b/commands/text-edit/b.js index 5630faea..47d51eb8 100644 --- a/commands/text-edit/b.js +++ b/commands/text-edit/b.js @@ -7,7 +7,7 @@ module.exports = class BCommand extends Command { aliases: ['🅱'], group: 'text-edit', memberName: 'b', - description: '🅱.', + description: 'Replaces b with 🅱.', args: [ { key: 'text', diff --git a/commands/text-edit/cow-say.js b/commands/text-edit/cow-say.js index 9638455d..f46b37f8 100644 --- a/commands/text-edit/cow-say.js +++ b/commands/text-edit/cow-say.js @@ -7,7 +7,7 @@ module.exports = class CowSayCommand extends Command { name: 'cow-say', group: 'text-edit', memberName: 'cow-say', - description: 'Converts text to cow-say.', + description: 'Makes a cow say your text.', args: [ { key: 'text', diff --git a/commands/text-edit/dec-talk.js b/commands/text-edit/dec-talk.js index 2a6132e1..691d54b6 100644 --- a/commands/text-edit/dec-talk.js +++ b/commands/text-edit/dec-talk.js @@ -20,7 +20,7 @@ module.exports = class DECTalkCommand extends Command { args: [ { key: 'text', - prompt: 'What text do you want to convert to TTS?', + prompt: 'What text do you want to say?', type: 'string', max: 1000 } diff --git a/commands/text-edit/embed.js b/commands/text-edit/embed.js index fc0e5fcb..e7de6968 100644 --- a/commands/text-edit/embed.js +++ b/commands/text-edit/embed.js @@ -7,7 +7,7 @@ module.exports = class EmbedCommand extends Command { name: 'embed', group: 'text-edit', memberName: 'embed', - description: 'Sends a message in an embed.', + description: 'Sends text in an embed.', clientPermissions: ['EMBED_LINKS'], args: [ { diff --git a/commands/text-edit/portal-send.js b/commands/text-edit/portal-send.js index 4374a1c0..c099252d 100644 --- a/commands/text-edit/portal-send.js +++ b/commands/text-edit/portal-send.js @@ -7,12 +7,12 @@ module.exports = class PortalSendCommand extends Command { aliases: ['send-portal-message', 'portal-message', 'send-portal-msg', 'portal-msg'], group: 'text-edit', memberName: 'portal-send', - description: 'Send a message to a random channel with `` in the topic.', + description: 'Send a message to a random channel with "" in the topic.', guildOnly: true, args: [ { - key: 'text', - prompt: 'What text would you like to send?', + key: 'message', + prompt: 'What message would you like to send?', type: 'string', max: 1000 } @@ -20,14 +20,14 @@ module.exports = class PortalSendCommand extends Command { }); } - async run(msg, { text }) { - if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(text)) return msg.reply('Please do not send invites.'); + async run(msg, { message }) { + if (/discord(\.gg|app\.com\/invite|\.me)\//gi.test(message)) return msg.reply('Please do not send invites.'); const valid = this.client.channels.filter(channel => channel.type === 'text' && channel.guild.id !== msg.guild.id); const channels = valid.filter(channel => channel.topic && channel.topic.toLowerCase().includes('')); if (!channels.size) return msg.say('No channels have an open portal.'); const channel = channels.random(); try { - await channel.send(`**${msg.author.tag} (${msg.guild.name})**: ${text}`); + await channel.send(`**${msg.author.tag} (${msg.guild.name})**: ${message}`); return msg.say(`Message sent to **${channel.name}** in **${channel.guild.name}**!`); } catch (err) { return msg.reply('Failed to send the message. Try again later!'); diff --git a/commands/text-edit/say.js b/commands/text-edit/say.js index 5a9eac7c..ad7f571b 100644 --- a/commands/text-edit/say.js +++ b/commands/text-edit/say.js @@ -12,11 +12,7 @@ module.exports = class SayCommand extends Command { { key: 'text', prompt: 'What text would you like XiaoBot to say?', - type: 'string', - validate: text => { - if (!text.includes('@everyone') && !text.includes('@here')) return true; - return 'Invalid text, please do not say everyone or here mentions.'; - } + type: 'string' } ] }); diff --git a/commands/text-edit/superscript.js b/commands/text-edit/superscript.js index 67871ba9..1367e610 100644 --- a/commands/text-edit/superscript.js +++ b/commands/text-edit/superscript.js @@ -9,11 +9,11 @@ module.exports = class SuperscriptCommand extends Command { aliases: ['tiny-text', 'small-text'], group: 'text-edit', memberName: 'superscript', - description: 'Makes text become tiny text.', + description: 'Converts text to tiny text.', args: [ { key: 'text', - prompt: 'What text would you like to make tiny?', + prompt: 'What text would you like to convert to tiny text?', type: 'string' } ] diff --git a/commands/text-edit/translate.js b/commands/text-edit/translate.js index 02fc9e59..4d550f50 100644 --- a/commands/text-edit/translate.js +++ b/commands/text-edit/translate.js @@ -12,7 +12,7 @@ module.exports = class TranslateCommand extends Command { aliases: ['yandex', 'yandex-translate'], group: 'text-edit', memberName: 'translate', - description: 'Translates text to a specified language.', + description: 'Translates text to a specific language.', details: `**Codes**: ${Object.keys(codes).join(', ')}`, clientPermissions: ['EMBED_LINKS'], args: [ diff --git a/commands/text-edit/webhook.js b/commands/text-edit/webhook.js index d26ea79e..26e588d8 100644 --- a/commands/text-edit/webhook.js +++ b/commands/text-edit/webhook.js @@ -14,7 +14,7 @@ module.exports = class WebhookCommand extends Command { clientPermissions: ['MANAGE_MESSAGES'], args: [ { - key: 'content', + key: 'message', prompt: 'What text would you like the webhook to say?', type: 'string' } @@ -22,10 +22,10 @@ module.exports = class WebhookCommand extends Command { }); } - async run(msg, { content }) { + async run(msg, { message }) { if (msg.channel.type === 'text') await msg.delete(); try { - await snekfetch.post(WEBHOOK_URL).send({ content }); + await snekfetch.post(WEBHOOK_URL).send({ content: message }); return null; } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); diff --git a/commands/text-edit/yoda.js b/commands/text-edit/yoda.js index b91e603b..c553c331 100644 --- a/commands/text-edit/yoda.js +++ b/commands/text-edit/yoda.js @@ -13,7 +13,8 @@ module.exports = class YodaCommand extends Command { args: [ { key: 'sentence', - prompt: 'What sentence would you like to convert to Yoda speak?', + label: 'text', + prompt: 'What text would you like to convert to Yoda speak?', type: 'string', max: 500 } diff --git a/package.json b/package.json index 92ec27ba..1c81b196 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "53.1.1", + "version": "54.0.0", "description": "Your personal server companion.", "main": "XiaoBot.js", "scripts": { diff --git a/util/Util.js b/util/Util.js index 8632e9d2..04463c28 100644 --- a/util/Util.js +++ b/util/Util.js @@ -88,7 +88,7 @@ class Util { const filter = res => { if (msg.author.bot) return false; if (joined.includes(res.author.id)) return false; - if (res.content.toLowerCase() !== text) return false; + if (res.content.toLowerCase() !== text.toLowerCase()) return false; joined.push(res.author.id); return true; };