mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Age Command
This commit is contained in:
@@ -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: [
|
||||
Reference in New Issue
Block a user