Name Masc/Fem

This commit is contained in:
lilyissillyyy
2025-08-27 20:58:20 -04:00
parent d9a818b20d
commit 8c7f0458d0
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -1,5 +1,9 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
const genders = {
male: 'masculine',
female: 'feminine'
};
module.exports = class NameGenderCommand extends Command {
constructor(client) {
@@ -30,6 +34,7 @@ module.exports = class NameGenderCommand extends Command {
.get(`https://api.genderize.io/`)
.query({ name });
if (!body.gender) return msg.say(`I have no idea what gender ${body.name} is.`);
return msg.say(`I'm ${Math.round(body.probability * 100)}% sure ${body.name} is a ${body.gender} name.`);
const prob = Math.round(body.probability * 100);
return msg.say(`I'm ${prob}% sure ${body.name} is a ${genders[body.gender]} name.`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "153.2.0",
"version": "153.2.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {