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
+2 -1
View File
@@ -222,6 +222,7 @@ the [home server](https://discord.gg/sbMe32W).
### Analyzers:
* **age:** Responds with how old someone born in a certain year is.
* **butt:** Determines a user's butt quality.
* **chinese-zodiac:** Responds with the Chinese Zodiac Sign for the given year.
* **coolness:** Determines a user's coolness.
@@ -231,6 +232,7 @@ the [home server](https://discord.gg/sbMe32W).
* **iq:** Determines a user's IQ.
* **psycho-pass:** Determines your Crime Coefficient.
* **read-qr-code:** Reads a QR Code.
* **scrabble-score:** Responds with the scrabble score of a word.
* **severe-toxicity:** Determines the toxicity of text, but less sensitive to milder language.
* **ship:** Ships two users together.
* **spoopy-link:** Determines if a link is spoopy or not.
@@ -395,7 +397,6 @@ the [home server](https://discord.gg/sbMe32W).
* **prime:** Determines if a number is a prime number.
* **roman-numeral:** Converts a number to roman numerals.
* **scientific-notation:** Converts a number to scientific notation.
* **scrabble-score:** Responds with the scrabble score of a word.
* **units:** Converts units to/from other units.
### Other:
+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: [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "96.0.0",
"version": "96.1.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {