From 5af6a50835896a947dd453bead2d3c432e11ee29 Mon Sep 17 00:00:00 2001 From: lilyissillyyy Date: Fri, 5 Sep 2025 23:41:55 -0400 Subject: [PATCH] Waist-Hip Ratio command --- README.md | 3 ++- commands/analyze/age.js | 2 +- commands/analyze/waist-hip.js | 31 +++++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 commands/analyze/waist-hip.js diff --git a/README.md b/README.md index 8ff2870a..d554081b 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ Only if you want to use the DECTalk command. 18. Start Xiao up! ## Commands -Total: 513 +Total: 514 ### Utility: @@ -321,6 +321,7 @@ Total: 513 * **screenshot:** Takes a screenshot of any webpage. * **text-diff:** Compares two different bits of text. * **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. ### Single-Player Games: diff --git a/commands/analyze/age.js b/commands/analyze/age.js index e1c0534c..5068c99e 100644 --- a/commands/analyze/age.js +++ b/commands/analyze/age.js @@ -20,6 +20,6 @@ module.exports = class AgeCommand extends Command { const currentYear = new Date().getFullYear(); const age = currentYear - year; 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.`); } }; diff --git a/commands/analyze/waist-hip.js b/commands/analyze/waist-hip.js new file mode 100644 index 00000000..f46aad13 --- /dev/null +++ b/commands/analyze/waist-hip.js @@ -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}**.`); + } +}; diff --git a/package.json b/package.json index d91712d6..d81e5b94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "155.0.2", + "version": "155.1.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {