mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Waist-Hip Ratio command
This commit is contained in:
@@ -101,7 +101,7 @@ Only if you want to use the DECTalk command.
|
|||||||
18. Start Xiao up!
|
18. Start Xiao up!
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
Total: 513
|
Total: 514
|
||||||
|
|
||||||
### Utility:
|
### Utility:
|
||||||
|
|
||||||
@@ -321,6 +321,7 @@ Total: 513
|
|||||||
* **screenshot:** Takes a screenshot of any webpage.
|
* **screenshot:** Takes a screenshot of any webpage.
|
||||||
* **text-diff:** Compares two different bits of text.
|
* **text-diff:** Compares two different bits of text.
|
||||||
* **valid-url:** Tests whether a URL is valid or not.
|
* **valid-url:** Tests whether a URL is valid or not.
|
||||||
|
* **waist-hip:** Responds with the waist-hip ratio of measurements.
|
||||||
* **zodiac-sign:** Responds with the Zodiac Sign for the given month/day.
|
* **zodiac-sign:** Responds with the Zodiac Sign for the given month/day.
|
||||||
|
|
||||||
### Single-Player Games:
|
### Single-Player Games:
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ module.exports = class AgeCommand extends Command {
|
|||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const age = currentYear - year;
|
const age = currentYear - year;
|
||||||
if (age < 0) return msg.say(`Someone born in ${year} will be born in ${Math.abs(age)} years.`);
|
if (age < 0) return msg.say(`Someone born in ${year} will be born in ${Math.abs(age)} years.`);
|
||||||
return msg.say(`Someone born in ${year} would be ${age} years old.`);
|
return msg.say(`Someone born in ${year} would be ${age} years old after their birthday.`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
const Command = require('../../framework/Command');
|
||||||
|
|
||||||
|
module.exports = class WaistHipCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'waist-hip',
|
||||||
|
aliases: ['waist-hip-ratio', 'w-h-ratio'],
|
||||||
|
group: 'analyze',
|
||||||
|
description: 'Responds with the waist-hip ratio of measurements.',
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
key: 'waist',
|
||||||
|
type: 'integer',
|
||||||
|
min: 1,
|
||||||
|
max: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'hip',
|
||||||
|
type: 'integer',
|
||||||
|
min: 1,
|
||||||
|
max: 200
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
run(msg, { waist, hip }) {
|
||||||
|
const ratio = waist / hip;
|
||||||
|
return msg.say(`The waist-hip ratio of someone with a ${waist} inch waist and ${hip} inch hips is **${ratio}**.`);
|
||||||
|
}
|
||||||
|
};
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "155.0.2",
|
"version": "155.1.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user