Face Gender Command

This commit is contained in:
lilyissillyyy
2025-08-23 02:00:50 -04:00
parent 6f3c791d62
commit 408319bef1
4 changed files with 40 additions and 6 deletions
+3 -2
View File
@@ -108,7 +108,7 @@ things, I'm not taking any chances.
19. Start Xiao up!
## Commands
Total: 516
Total: 517
### Utility:
@@ -317,12 +317,13 @@ Total: 516
* **character-count:** Responds with the character count of text.
* **chinese-zodiac:** Responds with the Chinese Zodiac Sign for the given year.
* **dominant-color:** Determines the dominant color of an image.
* **face-gender:** Determines the gender of a face.
* **faces:** Shows all detected faces in an image.
* **gender:** Determines the gender of a name.
* **generation:** Responds with the Generation for the given year.
* **image-size:** Determines the size of an image.
* **is-it-down:** Determines if a website is down or not.
* **levenshtein:** Determines the levenshtein distance between two strings.
* **name-gender:** Determines the gender of a name.
* **nsfw-image:** Determines if an image is NSFW.
* **nsfw-url:** Determines if a URL is NSFW.
* **parse-time:** Analyzes the time duration you provide and gives the result.
+33
View File
@@ -0,0 +1,33 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
module.exports = class FaceGenderCommand extends Command {
constructor(client) {
super(client, {
name: 'face-gender',
aliases: ['guess-face-gender', 'face-gender-guess', 'gender-face', 'gender'],
group: 'analyze',
description: 'Determines the gender of a face.',
credit: [
{
name: 'Nyckel',
url: 'https://www.nyckel.com/pretrained-classifiers/gender-detector/',
reason: 'API'
}
],
args: [
{
key: 'image',
type: 'image'
}
]
});
}
async run(msg, { image }) {
const { body } = await request
.post(`https://www.nyckel.com/v1/functions/gender-detector/invoke`)
.send({ data: image });
return msg.say(`I'm ${Math.round(body.confidence * 100)}% sure this is a ${body.labelName}.`);
}
};
@@ -1,11 +1,11 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
module.exports = class GenderCommand extends Command {
module.exports = class NameGenderCommand extends Command {
constructor(client) {
super(client, {
name: 'gender',
aliases: ['guess-gender', 'gender-guess'],
name: 'name-gender',
aliases: ['guess-name-gender', 'name-gender-guess', 'gender-name'],
group: 'analyze',
description: 'Determines the gender of a name.',
credit: [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "153.0.1",
"version": "153.1.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {