From df64667168cdc33a2a8ffe2c0fba3b5fc6414520 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Mon, 27 Apr 2020 17:33:27 -0700 Subject: fix quote commands, add motivate, v8.1.0 --- src/commands/fun/quote.ts | 61 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 13 deletions(-) (limited to 'src/commands/fun/quote.ts') diff --git a/src/commands/fun/quote.ts b/src/commands/fun/quote.ts index 0961d1d..81850cb 100644 --- a/src/commands/fun/quote.ts +++ b/src/commands/fun/quote.ts @@ -1,4 +1,11 @@ -import atquotes from 'at-quotes'; +// Quote Packages +import mq from 'popular-movie-quotes'; +import hsq from 'harvey-specter-quotes' +import aq from 'animequote' +import cq from 'chewbacca-quotes' +import asq from 'arnie-quote' +import lotrq from 'random-lotr-movie-quote' + import { Command, CommandoMessage } from 'discord.js-commando'; import emoji from 'emoji-random'; @@ -9,7 +16,7 @@ module.exports = class QuoteFun extends Command { aliases: ['quotes'], group: 'fun', memberName: 'quote', - description: '[Broken] Gives you a random quote from Adventure Time.', + description: 'Gives you a random quote from Adventure Time.', throttling: { usages: 5, duration: 30 @@ -17,13 +24,13 @@ module.exports = class QuoteFun extends Command { examples: [ 'uwu!quote', 'uwu!qutoes', - 'uwu!quote finn', - 'uwu!quotes ice king' + 'uwu!quote movie', + 'uwu!quotes harvey specter' ], args: [ { key: 'atCharacter', - prompt: 'Would you like a specific character? (Finn, Jake, Ice King, No)', + prompt: 'Would you like a specific type?\nTypes: movie, harvey specter, anime, chewbacca, arnold schwarzenegger or lotr.', type: 'string' } ], @@ -32,14 +39,42 @@ module.exports = class QuoteFun extends Command { }); } run(msg: CommandoMessage, { atCharacter }) { - if (!atCharacter || atCharacter == 'no' || atCharacter == 'n') { - msg.reply(atquotes.getQuote() + ' ' + emoji.random()); - } else if (atCharacter == 'finn' || atCharacter == 'f') { - msg.reply(atquotes.getFinnQuote() + ' ' + emoji.random()); - } else if (atCharacter == 'jake' || atCharacter == 'j') { - msg.reply(atquotes.getJakeQuote() + ' ' + emoji.random()); - } else if (atCharacter == 'ice king' || atCharacter == 'ik') { - msg.reply(atquotes.getIceKingQuote() + ' ' + emoji.random()); + if (atCharacter == 'random' || atCharacter == 'no') { + var quoteNum = Math.floor((Math.random() * 6) + 1); + switch (quoteNum) { + case 1: + msg.reply(mq.getRandomQuote() + ' ' + emoji.random()); + break + case 2: + msg.reply(hsq.random() + ' ' + emoji.random()); + break + case 3: + msg.reply(aq().quotesentence + ' ' + emoji.random()); + break + case 4: + msg.reply(cq() + ' ' + emoji.random()) + break + case 5: + msg.reply(asq() + ' ' + emoji.random()) + break + case 6: + msg.reply(lotrq() + ' ' + emoji.random()) + break + } + } else if (atCharacter == 'movie' || atCharacter == 'movies') { + msg.reply(mq.getRandomQuote() + ' ' + emoji.random()); + } else if (atCharacter == 'harvey specter' || atCharacter == 'harvey') { + msg.reply(hsq.random() + ' ' + emoji.random()); + } else if (atCharacter == 'anime' || atCharacter == 'animes') { + msg.reply(aq().quotesentence + ' ' + emoji.random()); + } else if (atCharacter == 'chewbacca') { + msg.reply(cq() + ' ' + emoji.random()) + } else if (atCharacter == 'arnold schwarzenegger' || atCharacter == 'arnold' || atCharacter == 'schwarzenegger') { + msg.reply(asq() + ' ' + emoji.random()) + } else if (atCharacter == 'lotr' || atCharacter == 'lord of the rings') { + msg.reply(lotrq() + ' ' + emoji.random()) + } else { + msg.reply('That was not at option. ' + emoji.random()) } } }; \ No newline at end of file -- cgit v1.2.3