From e8a6bb2669d258b19703e1e4545ae26618d2653a Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 6 Sep 2017 19:22:53 +0000 Subject: [PATCH] throwback --- assets/json/{easter-egg.json => tag.json} | 9 +++---- commands/random/can-you-not.js | 16 ++++++++++++ commands/random/easter-egg.js | 31 ---------------------- commands/random/eat-pant.js | 17 ++++++++++++ commands/random/slow-clap.js | 16 ++++++++++++ commands/random/tag.js | 32 +++++++++++++++++++++++ commands/{random => search}/stocks.js | 2 +- package.json | 2 +- 8 files changed, 86 insertions(+), 39 deletions(-) rename assets/json/{easter-egg.json => tag.json} (87%) create mode 100644 commands/random/can-you-not.js delete mode 100644 commands/random/easter-egg.js create mode 100644 commands/random/eat-pant.js create mode 100644 commands/random/slow-clap.js create mode 100644 commands/random/tag.js rename commands/{random => search}/stocks.js (98%) diff --git a/assets/json/easter-egg.json b/assets/json/tag.json similarity index 87% rename from assets/json/easter-egg.json rename to assets/json/tag.json index b5272431..f3d3b3e7 100644 --- a/assets/json/easter-egg.json +++ b/assets/json/tag.json @@ -2,13 +2,13 @@ "if900hp": "All cars unlocked!", "i'm an easter egg": "You're also an example.", "not a valid tag": "No, it's not valid at all.", - "tag": "This command is *easter egg*, not *tag* :yum:", - "easter egg": ":egg:", + "easter egg": "This command is *tag*, not *easter egg* :yum:", + "tag": "Invalid tag!", "snek": "*Blame :snake:*", "snekfetch": "The best.", "xiaobot": "That's my name.", "dragonfire535": "http://dragonfire535.tk", - "heroes of dreamland": "https://www.wattpad.com/story/8712240-heroes-of-dreamland-book-1-kirby-and-the-monstrous", + "heroes of dreamland": "https://www.wattpad.com/story/8712240", "neopets": "I got robbed by the pant devil.", "koneko-chan": "https://i.ytimg.com/vi/YStwTmG4Ex0/hqdefault.jpg", "shrug": "¯\\_(ツ)_/¯", @@ -16,14 +16,11 @@ "soundboard": "Rest in Peace...", "me": "You.", "no u": "no u", - "eat pant": "https://i.redd.it/226fiufo2slx.jpg", "i never asked for this": "https://cdn.discordapp.com/attachments/252317073814978561/304811008457834516/image.jpg", "egg": "You're an egg.", "beta": "https://cdn.discordapp.com/attachments/252317073814978561/304812045851688963/image.jpg", "pathetic": "https://cdn.discordapp.com/attachments/252317073814978561/304812045851688963/image.jpg", "swagolor": "https://cdn.discordapp.com/attachments/252317073814978561/306110096491151363/Swagolor.png", - "canyounot": "Can YOU not?", - "slowclap": "*slow clap*", "just do it": "https://www.youtube.com/watch?v=ZXsQAXx_ao0", "april": "https://i.imgur.com/c60iG3E.png", "captain karen": "https://i.imgur.com/8TFq5If.jpg", diff --git a/commands/random/can-you-not.js b/commands/random/can-you-not.js new file mode 100644 index 00000000..72e3e945 --- /dev/null +++ b/commands/random/can-you-not.js @@ -0,0 +1,16 @@ +const Command = require('../../structures/Command'); + +module.exports = class CanYouNotCommand extends Command { + constructor(client) { + super(client, { + name: 'can-you-not', + group: 'random', + memberName: 'can-you-not', + description: 'Can YOU not?' + }); + } + + run(msg) { + return msg.say('Can YOU not?'); + } +}; diff --git a/commands/random/easter-egg.js b/commands/random/easter-egg.js deleted file mode 100644 index 5b9335cc..00000000 --- a/commands/random/easter-egg.js +++ /dev/null @@ -1,31 +0,0 @@ -const Command = require('../../structures/Command'); -const eastereggs = require('../../assets/json/easter-egg'); - -module.exports = class EasterEggCommand extends Command { - constructor(client) { - super(client, { - name: 'easter-egg', - aliases: ['tag'], - group: 'random', - memberName: 'easter-egg', - description: 'Can you discover all the easter eggs?', - args: [ - { - key: 'tag', - prompt: 'What easter egg do you want to view?', - type: 'string', - validate: tag => { - if (eastereggs[tag.toLowerCase()]) return true; - return 'Nope, that\'s not a valid easter egg. Try again!'; - }, - parse: tag => tag.toLowerCase() - } - ] - }); - } - - run(msg, args) { - const { tag } = args; - return msg.say(eastereggs[tag]); - } -}; diff --git a/commands/random/eat-pant.js b/commands/random/eat-pant.js new file mode 100644 index 00000000..03305336 --- /dev/null +++ b/commands/random/eat-pant.js @@ -0,0 +1,17 @@ +const Command = require('../../structures/Command'); + +module.exports = class EatPantCommand extends Command { + constructor(client) { + super(client, { + name: 'eat-pant', + group: 'random', + memberName: 'eat-pant', + description: 'eat pant', + clientPermissions: ['ATTACH_FILES'] + }); + } + + run(msg) { + return msg.say({ files: ['https://i.imgur.com/9zWcsXx.jpg'] }); + } +}; diff --git a/commands/random/slow-clap.js b/commands/random/slow-clap.js new file mode 100644 index 00000000..1d261aa7 --- /dev/null +++ b/commands/random/slow-clap.js @@ -0,0 +1,16 @@ +const Command = require('../../structures/Command'); + +module.exports = class SlowClapCommand extends Command { + constructor(client) { + super(client, { + name: 'slow-clap', + group: 'random', + memberName: 'slow-clap', + description: '_slow clap_' + }); + } + + run(msg) { + return msg.say('_slow clap_'); + } +}; diff --git a/commands/random/tag.js b/commands/random/tag.js new file mode 100644 index 00000000..e26090a8 --- /dev/null +++ b/commands/random/tag.js @@ -0,0 +1,32 @@ +const Command = require('../../structures/Command'); +const { list } = require('../../structures/Util'); +const tags = require('../../assets/json/tag'); + +module.exports = class TagCommand extends Command { + constructor(client) { + super(client, { + name: 'tag', + aliases: ['easter-egg', 'mini-command'], + group: 'random', + memberName: 'tag', + description: 'Little mini responses that didn\'t quite make the command cut.', + args: [ + { + key: 'tag', + prompt: `What tag do you want to view? Either ${list(Object.keys(tags), 'or')}.`, + type: 'string', + validate: tag => { + if (tags[tag.toLowerCase()]) return true; + return `Invalid tag, please enter either ${list(Object.keys(tags), 'or')}.`; + }, + parse: tag => tag.toLowerCase() + } + ] + }); + } + + run(msg, args) { + const { tag } = args; + return msg.say(tags[tag]); + } +}; diff --git a/commands/random/stocks.js b/commands/search/stocks.js similarity index 98% rename from commands/random/stocks.js rename to commands/search/stocks.js index 6c47a48f..8a4db39a 100644 --- a/commands/random/stocks.js +++ b/commands/search/stocks.js @@ -8,7 +8,7 @@ module.exports = class StocksCommand extends Command { super(client, { name: 'stocks', aliases: ['stock'], - group: 'random', + group: 'search', memberName: 'stocks', description: 'Get the current stocks for a symbol.', args: [ diff --git a/package.json b/package.json index 37037b4b..6b78a974 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "37.0.0", + "version": "37.1.0", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {