mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 08:12:04 +02:00
33 lines
991 B
JavaScript
33 lines
991 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
const eastereggs = require('./eastereggs');
|
|
|
|
module.exports = class EasterEggCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'easteregg',
|
|
aliases: [
|
|
'tag'
|
|
],
|
|
group: 'random',
|
|
memberName: 'easteregg',
|
|
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: text => text.toLowerCase()
|
|
}]
|
|
});
|
|
}
|
|
|
|
run(message, args) {
|
|
const { tag } = args;
|
|
return message.say(eastereggs[tag]);
|
|
}
|
|
};
|