mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
random-js is cool
This commit is contained in:
@@ -57,7 +57,6 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
||||
* **chuck-norris**: Responds with a random Chuck Norris joke.
|
||||
* **coin**: Flips a coin.
|
||||
* **compliment**: Compliments a user.
|
||||
* **dick**: Determines your dick size.
|
||||
* **discord-email-fun-fact**: Responds with a random fun fact from the Discord emails.
|
||||
* **dog-fact**: Responds with a random dog fact.
|
||||
* **dog**: Responds with a random dog image.
|
||||
@@ -84,7 +83,6 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
||||
* **roast**: Roasts a user.
|
||||
* **roll**: Rolls a dice with a maximum value of your choice.
|
||||
* **security-key**: Responds with a random security key.
|
||||
* **ship**: Ships two people together.
|
||||
* **shower-thought**: Responds with a random shower thought, directly from r/Showerthoughts.
|
||||
* **user-roulette**: Randomly chooses a member of the server.
|
||||
* **would-you-rather**: Responds with a random "Would you rather ...?" question.
|
||||
@@ -182,10 +180,12 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
||||
### Analyzers:
|
||||
|
||||
* **coolness**: Determines a user's coolness.
|
||||
* **dick**: Determines your dick size.
|
||||
* **face-analyze**: Determines the age, gender, and race of a face.
|
||||
* **gender-analyze**: Determines the gender of a name.
|
||||
* **read-qr-code**: Reads a QR Code.
|
||||
* **severe-toxicity**: Determines the toxicity of text, but less sensitive to milder language.
|
||||
* **ship**: Ships two users together.
|
||||
* **toxicity**: Determines the toxicity of text.
|
||||
|
||||
### Games:
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
"the coolest being to walk this Earth.",
|
||||
"extremely amazingly amazing.",
|
||||
"as cool as ice.",
|
||||
"cooler than cool.",
|
||||
"an extremely cool dude.",
|
||||
"pretty sweet, not gonna lie.",
|
||||
"okay, nothing special.",
|
||||
"just not all that neat.",
|
||||
"awful, honestly.",
|
||||
"terrible in every way.",
|
||||
"the worst thing I've ever had the displeasure of knowing."
|
||||
"an absolute train wreck.",
|
||||
"a horrible, horrible person.",
|
||||
"the worst person I've ever had the displeasure of knowing."
|
||||
]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Random = require('random-js');
|
||||
const texts = require('../../assets/json/coolness');
|
||||
|
||||
module.exports = class CoolnessCommand extends Command {
|
||||
@@ -21,13 +22,13 @@ module.exports = class CoolnessCommand extends Command {
|
||||
|
||||
run(msg, { user }) {
|
||||
const authorUser = user.id === msg.author.id;
|
||||
const coolness = Math.round(((user.id / this.client.user.id) * 10) / 2);
|
||||
if (user.id === this.client.user.id) return msg.reply('Me? I think I\'m the very best, like no one ever was.');
|
||||
if (this.client.isOwner(user)) {
|
||||
if (authorUser) return msg.reply('You\'re the best owner a bot could ask for! ❤');
|
||||
return msg.reply(`Don't tell them I said this but I think ${user.username} smells like a sack of diapers.`);
|
||||
}
|
||||
const text = texts[Math.min(coolness, texts.length - 1)];
|
||||
return msg.reply(`${authorUser ? 'You are' : `${user.username} is`} ${text}`);
|
||||
const random = new Random(Random.engines.mt19937().seed(user.id));
|
||||
const coolness = random.integer(0, texts.length - 1);
|
||||
return msg.reply(`${authorUser ? 'You are' : `${user.username} is`} ${texts[coolness]}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Random = require('random-js');
|
||||
|
||||
module.exports = class DickCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dick',
|
||||
aliases: ['dick-size'],
|
||||
group: 'analyze',
|
||||
memberName: 'dick',
|
||||
description: 'Determines your dick size.',
|
||||
nsfw: true,
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
prompt: 'What user do you want to determine the dick size of?',
|
||||
type: 'user',
|
||||
default: msg => msg.author
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
const random = new Random(Random.engines.mt19937().seed(user.id));
|
||||
return msg.reply(`8${'='.repeat(random.integer(0, 200))}D`);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const Random = require('random-js');
|
||||
|
||||
module.exports = class ShipCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'ship',
|
||||
group: 'analyze',
|
||||
memberName: 'ship',
|
||||
description: 'Ships two users together.',
|
||||
args: [
|
||||
{
|
||||
key: 'first',
|
||||
label: 'first user',
|
||||
prompt: 'Who is the first user in the ship?',
|
||||
type: 'user'
|
||||
},
|
||||
{
|
||||
key: 'second',
|
||||
label: 'second user',
|
||||
prompt: 'Who is the second user in the ship?',
|
||||
type: 'user'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { first, second }) {
|
||||
const random = new Random(Random.engines.mt19937().seed(first.id - second.id));
|
||||
return msg.say(`I'd give ${first.username} and ${second.username} a ${random.integer(0, 100)}%!`);
|
||||
}
|
||||
};
|
||||
@@ -1,18 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class DickCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'dick',
|
||||
aliases: ['dick-size'],
|
||||
group: 'random',
|
||||
memberName: 'dick',
|
||||
description: 'Determines your dick size.',
|
||||
nsfw: true
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say(`8${'='.repeat(Math.floor(Math.random() * 200) + 1)}D`);
|
||||
}
|
||||
};
|
||||
@@ -1,32 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class ShipCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'ship',
|
||||
group: 'random',
|
||||
memberName: 'ship',
|
||||
description: 'Ships two people together.',
|
||||
args: [
|
||||
{
|
||||
key: 'first',
|
||||
label: 'first name',
|
||||
prompt: 'Who is the first person in the ship?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
},
|
||||
{
|
||||
key: 'second',
|
||||
label: 'second name',
|
||||
prompt: 'Who is the second person in the ship?',
|
||||
type: 'string',
|
||||
max: 500
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { first, second }) {
|
||||
return msg.say(`I'd give ${first} and ${second} a ${Math.floor(Math.random() * 100) + 1}%!`);
|
||||
}
|
||||
};
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "72.0.5",
|
||||
"version": "73.0.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
@@ -41,6 +41,7 @@
|
||||
"node-opus": "^0.2.7",
|
||||
"pg": "^6.4.2",
|
||||
"pg-hstore": "^2.3.2",
|
||||
"random-js": "^1.0.8",
|
||||
"sequelize": "^4.37.6",
|
||||
"snekfetch": "^3.6.4",
|
||||
"uws": "^9.147.0",
|
||||
|
||||
Reference in New Issue
Block a user