diff options
| author | 8cy <[email protected]> | 2020-04-27 17:33:27 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-27 17:33:27 -0700 |
| commit | df64667168cdc33a2a8ffe2c0fba3b5fc6414520 (patch) | |
| tree | c9535ffdf33de34bb135e5db86063142e0e81daa /src/commands/fun | |
| parent | add support and embed cmd, v8.0.2 (diff) | |
| download | dep-core-df64667168cdc33a2a8ffe2c0fba3b5fc6414520.tar.xz dep-core-df64667168cdc33a2a8ffe2c0fba3b5fc6414520.zip | |
fix quote commands, add motivate, v8.1.0
Diffstat (limited to 'src/commands/fun')
| -rw-r--r-- | src/commands/fun/motivate.ts | 29 | ||||
| -rw-r--r-- | src/commands/fun/quote.ts | 61 |
2 files changed, 77 insertions, 13 deletions
diff --git a/src/commands/fun/motivate.ts b/src/commands/fun/motivate.ts new file mode 100644 index 0000000..a0e53e9 --- /dev/null +++ b/src/commands/fun/motivate.ts @@ -0,0 +1,29 @@ +import mq from 'motivations'; +import { Command, CommandoMessage } from 'discord.js-commando'; +import emoji from 'emoji-random'; + +module.exports = class MotivateFun extends Command { + constructor(client) { + super(client, { + name: 'motivate', + aliases: ['motivateme'], + group: 'fun', + memberName: 'motivate', + description: 'Gives you a random motivating quote from Star Wars.', + throttling: { + usages: 5, + duration: 30 + }, + examples: [ + 'uwu!motivate', + 'uwu!motivateme' + ], + userPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], + clientPermissions: ['SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] + }); + } + run(msg: CommandoMessage) { + var quoteNum = Math.floor((Math.random() * 62) + 1); + msg.reply(mq[quoteNum] + ' ' + emoji.random()) + } +};
\ No newline at end of file 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 |