mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
Chinese Zodiac Command
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const signs = require('../../assets/json/chinese-zodiac');
|
||||
|
||||
module.exports = class ChineseZodiacCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'chinese-zodiac',
|
||||
aliases: ['chinese-zodiac-sign'],
|
||||
group: 'analyze',
|
||||
memberName: 'chinese-zodiac',
|
||||
description: 'Responds with the Chinese Zodiac Sign for the given year.',
|
||||
args: [
|
||||
{
|
||||
key: 'year',
|
||||
prompt: 'What year would you like to get the Chinese Zodiac Sign for?',
|
||||
type: 'integer',
|
||||
min: 1
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { year }) {
|
||||
return msg.say(`The Chinese Zodiac Sign for ${year} is ${signs[year % signs.length]}.`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user