Age Command

This commit is contained in:
Daniel Odendahl Jr
2018-10-25 11:02:25 +00:00
parent d5481dd862
commit 088ae5c335
4 changed files with 29 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
const Command = require('../../structures/Command');
module.exports = class AgeCommand extends Command {
constructor(client) {
super(client, {
name: 'age',
group: 'analyze',
memberName: 'age',
description: 'Responds with how old someone born in a certain year is.',
args: [
{
key: 'year',
prompt: 'What year would you like to get the age for?',
type: 'integer',
min: 1
}
]
});
}
run(msg, { year }) {
const currentYear = new Date().getYear();
return msg.say(`Someone born in ${year} would be ${currentYear - year} years old.`);
}
};
@@ -7,7 +7,7 @@ module.exports = class ScrabbleScoreCommand extends Command {
super(client, {
name: 'scrabble-score',
aliases: ['scrabble'],
group: 'number-edit',
group: 'analyze',
memberName: 'scrabble-score',
description: 'Responds with the scrabble score of a word.',
args: [