Add Easter Egg Command

This commit is contained in:
Daniel Odendahl Jr
2017-04-20 20:30:29 +00:00
parent 3401ab5e22
commit b2b9ab9d73
12 changed files with 537 additions and 487 deletions
+37
View File
@@ -0,0 +1,37 @@
const { Command } = require('discord.js-commando');
const eastereggs = require('./eastereggs.json');
module.exports = class EasterEggCommand extends Command {
constructor(client) {
super(client, {
name: 'easteregg',
aliases: [
'tag',
'easter-egg'
],
group: 'random',
memberName: 'easteregg',
description: 'Can you discover all the easter eggs? (x;easteregg I\'m an easter egg)',
examples: ['x;easteregg I\'m an easter egg'],
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!';
}
}]
});
}
run(message, args) {
if (message.channel.type !== 'dm') {
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return;
}
const { tag } = args;
return message.say(eastereggs[tag.toLowerCase()]);
}
};
+21
View File
@@ -0,0 +1,21 @@
{
"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:",
"snek": "*Blame :snake:*",
"snekfetch": "superagent is better.",
"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",
"neopets": "I got robbed by the pant devil.",
"koneko-chan": "https://i.ytimg.com/vi/YStwTmG4Ex0/hqdefault.jpg",
"shrug": "¯\\_(ツ)_/¯",
"vulcan": ":vulcan:",
"soundboard": "Rest in Peace...",
"me": "You.",
"no u": "no u",
"eat pant": "https://i.redd.it/226fiufo2slx.jpg",
"heroku": ":heart:"
}