mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
33 lines
749 B
JavaScript
33 lines
749 B
JavaScript
const Command = require('../../framework/Command');
|
|
const { formatNumber } = require('../../util/Util');
|
|
|
|
module.exports = class WaistHipCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'waist-hip',
|
|
aliases: ['waist-hip-ratio', 'w-h-ratio', 'whr'],
|
|
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 = formatNumber(waist / hip);
|
|
return msg.say(`The waist-hip ratio of someone with a ${waist} inch waist and ${hip} inch hips is **${ratio}**.`);
|
|
}
|
|
};
|