mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 15:58:06 +02:00
Guess Looks using random-js seeding
This commit is contained in:
@@ -65,7 +65,6 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
|||||||
* **fidget**: Responds with a random image of Fidget.
|
* **fidget**: Responds with a random image of Fidget.
|
||||||
* **fortune**: Responds with a random fortune.
|
* **fortune**: Responds with a random fortune.
|
||||||
* **fruit**: Responds with a random fruit.
|
* **fruit**: Responds with a random fruit.
|
||||||
* **guess-looks**: Guesses what a user looks like.
|
|
||||||
* **joke**: Responds with a random joke.
|
* **joke**: Responds with a random joke.
|
||||||
* **karen**: Responds with a random image of Karen.
|
* **karen**: Responds with a random image of Karen.
|
||||||
* **kiss-marry-kill**: Determines who to kiss, who to marry, and who to kill.
|
* **kiss-marry-kill**: Determines who to kiss, who to marry, and who to kill.
|
||||||
@@ -182,6 +181,7 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
|||||||
* **dick**: Determines your dick size.
|
* **dick**: Determines your dick size.
|
||||||
* **face-analyze**: Determines the age, gender, and race of a face.
|
* **face-analyze**: Determines the age, gender, and race of a face.
|
||||||
* **gender-analyze**: Determines the gender of a name.
|
* **gender-analyze**: Determines the gender of a name.
|
||||||
|
* **guess-looks**: Guesses what a user looks like.
|
||||||
* **read-qr-code**: Reads a QR Code.
|
* **read-qr-code**: Reads a QR Code.
|
||||||
* **severe-toxicity**: Determines the toxicity of text, but less sensitive to milder language.
|
* **severe-toxicity**: Determines the toxicity of text, but less sensitive to milder language.
|
||||||
* **ship**: Ships two users together.
|
* **ship**: Ships two users together.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const { oneLine } = require('common-tags');
|
const { oneLine } = require('common-tags');
|
||||||
const { randomRange } = require('../../util/Util');
|
const Random = require('random-js');
|
||||||
const genders = ['male', 'female'];
|
const genders = ['male', 'female'];
|
||||||
const { eyeColors, hairColors, hairStyles, extras } = require('../../assets/json/guess-looks');
|
const { eyeColors, hairColors, hairStyles, extras } = require('../../assets/json/guess-looks');
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ module.exports = class GuessLooksCommand extends Command {
|
|||||||
super(client, {
|
super(client, {
|
||||||
name: 'guess-looks',
|
name: 'guess-looks',
|
||||||
aliases: ['guess-my-looks'],
|
aliases: ['guess-my-looks'],
|
||||||
group: 'random',
|
group: 'analyze',
|
||||||
memberName: 'guess-looks',
|
memberName: 'guess-looks',
|
||||||
description: 'Guesses what a user looks like.',
|
description: 'Guesses what a user looks like.',
|
||||||
args: [
|
args: [
|
||||||
@@ -24,15 +24,16 @@ module.exports = class GuessLooksCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(msg, { user }) {
|
run(msg, { user }) {
|
||||||
const gender = genders[Math.floor(Math.random() * genders.length)];
|
const random = new Random(Random.engines.mt19937().seed(user.id));
|
||||||
const eyeColor = eyeColors[Math.floor(Math.random() * eyeColors.length)];
|
const gender = genders[random.integer(0, genders.length - 1)];
|
||||||
const hairColor = hairColors[Math.floor(Math.random() * hairColors.length)];
|
const eyeColor = eyeColors[random.integer(0, eyeColors.length - 1)];
|
||||||
const hairStyle = hairStyles[Math.floor(Math.random() * hairStyles.length)];
|
const hairColor = hairColors[random.integer(0, hairColors.length - 1)];
|
||||||
const age = randomRange(10, 100);
|
const hairStyle = hairStyles[random.integer(0, hairStyles.length - 1)];
|
||||||
const feet = randomRange(3, 7);
|
const age = random.integer(10, 100);
|
||||||
const inches = Math.floor(Math.random() * 12);
|
const feet = random.integer(3, 7);
|
||||||
const weight = randomRange(50, 300);
|
const inches = random.integer(0, 12);
|
||||||
const extra = extras[Math.floor(Math.random() * extras.length)];
|
const weight = random.integer(50, 300);
|
||||||
|
const extra = extras[random.integer(0, extras.length - 1)];
|
||||||
return msg.say(oneLine`
|
return msg.say(oneLine`
|
||||||
I think ${user.username} is a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor}
|
I think ${user.username} is a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor}
|
||||||
hair. They are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}!
|
hair. They are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}!
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "73.2.6",
|
"version": "73.2.7",
|
||||||
"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