Split Seeded Randomizers from Analyze

This commit is contained in:
Dragon Fire
2019-12-03 16:41:03 -05:00
parent c95bbfaede
commit 6ba24f0e0d
10 changed files with 19 additions and 15 deletions
+36
View File
@@ -0,0 +1,36 @@
const Command = require('../../structures/Command');
const { MersenneTwister19937, integer } = require('random-js');
const texts = require('../../assets/json/butt');
module.exports = class ButtCommand extends Command {
constructor(client) {
super(client, {
name: 'butt',
aliases: ['butts', 'ass', 'booty'],
group: 'seeded',
memberName: 'butt',
description: 'Determines a user\'s butt quality.',
credit: [
{
name: 'iCrawl/Tohru',
url: 'https://github.com/iCrawl/Tohru/blob/master/src/commands/fun/butts.js'
}
],
args: [
{
key: 'user',
prompt: 'Which user do you want to determine the butt quality of?',
type: 'user',
default: msg => msg.author
}
]
});
}
run(msg, { user }) {
if (user.id === this.client.user.id) return msg.reply('Me? I think I have the best butt around!');
const random = MersenneTwister19937.seed(user.id);
const quality = integer(0, texts.length - 1)(random);
return msg.reply(`${user.id === msg.author.id ? 'ur' : `${user.username}'s`} butt is ${texts[quality]}`);
}
};
+34
View File
@@ -0,0 +1,34 @@
const Command = require('../../structures/Command');
const { MersenneTwister19937, integer } = require('random-js');
const texts = require('../../assets/json/coolness');
module.exports = class CoolnessCommand extends Command {
constructor(client) {
super(client, {
name: 'coolness',
group: 'seeded',
memberName: 'coolness',
description: 'Determines a user\'s coolness.',
args: [
{
key: 'user',
prompt: 'Which user do you want to determine the coolness of?',
type: 'user',
default: msg => msg.author
}
]
});
}
run(msg, { user }) {
const authorUser = user.id === msg.author.id;
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 random = MersenneTwister19937.seed(user.id);
const coolness = integer(0, texts.length - 1)(random);
return msg.reply(`${authorUser ? 'You are' : `${user.username} is`} ${texts[coolness]}`);
}
};
+30
View File
@@ -0,0 +1,30 @@
const Command = require('../../structures/Command');
const { MersenneTwister19937, integer } = require('random-js');
module.exports = class DickCommand extends Command {
constructor(client) {
super(client, {
name: 'dick',
aliases: ['dick-size', 'penis', 'penis-size', 'pee-pee', 'pee-pee-size'],
group: 'seeded',
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 clientAuthor = user.id === this.client.user.id;
const random = MersenneTwister19937.seed(clientAuthor ? msg.author.id : user.id);
const length = integer(0, 200)(random);
return msg.reply(`8${'='.repeat(clientAuthor ? length + 1 : length)}D`);
}
};
+45
View File
@@ -0,0 +1,45 @@
const Command = require('../../structures/Command');
const { oneLine } = require('common-tags');
const { MersenneTwister19937, integer } = require('random-js');
const genders = ['male', 'female'];
const { eyeColors, hairColors, hairStyles, extras } = require('../../assets/json/guess-looks');
module.exports = class GuessLooksCommand extends Command {
constructor(client) {
super(client, {
name: 'guess-looks',
aliases: ['guess-my-looks'],
group: 'seeded',
memberName: 'guess-looks',
description: 'Guesses what a user looks like.',
args: [
{
key: 'user',
prompt: 'Which user do you want me to guess the looks of?',
type: 'user',
default: msg => msg.author
}
]
});
}
run(msg, { user }) {
if (user.id === this.client.user.id) return msg.reply('Me? Just look at my avatar, dummy.');
const authorUser = user.id === msg.author.id;
const random = MersenneTwister19937.seed(user.id);
const gender = genders[integer(0, genders.length - 1)(random)];
const eyeColor = eyeColors[integer(0, eyeColors.length - 1)(random)];
const hairColor = hairColors[integer(0, hairColors.length - 1)(random)];
const hairStyle = hairStyles[integer(0, hairStyles.length - 1)(random)];
const age = integer(10, 100)(random);
const feet = integer(3, 7)(random);
const inches = integer(0, 11)(random);
const weight = integer(50, 300)(random);
const extra = extras[integer(0, extras.length - 1)(random)];
return msg.reply(oneLine`
I think ${authorUser ? 'you are' : `${user.username} is`} a ${age} year old ${gender} with ${eyeColor} eyes
and ${hairStyle} ${hairColor} hair. ${authorUser ? 'You are' : `${gender === 'male' ? 'He' : 'She'} is`}
${feet}'${inches}" and weigh${authorUser ? '' : 's'} ${weight} pounds. Don't forget the ${extra}!
`);
}
};
+29
View File
@@ -0,0 +1,29 @@
const Command = require('../../structures/Command');
const { MersenneTwister19937, integer } = require('random-js');
module.exports = class IQCommand extends Command {
constructor(client) {
super(client, {
name: 'iq',
aliases: ['intelligence-quotient'],
group: 'seeded',
memberName: 'iq',
description: 'Determines a user\'s IQ.',
args: [
{
key: 'user',
prompt: 'Which user do you want me to guess the IQ of?',
type: 'user',
default: msg => msg.author
}
]
});
}
run(msg, { user }) {
if (user.id === this.client.user.id) return msg.reply('Me? My IQ score is off the charts!');
const random = MersenneTwister19937.seed(user.id);
const score = integer(20, 170)(random);
return msg.reply(`${user.id === msg.author.id ? 'Your' : `${user.username}'s`} IQ score is ${score}.`);
}
};
+42
View File
@@ -0,0 +1,42 @@
const Command = require('../../structures/Command');
const { MersenneTwister19937, integer } = require('random-js');
const { under100, between, over300 } = require('../../assets/json/psycho-pass');
module.exports = class PsychoPassCommand extends Command {
constructor(client) {
super(client, {
name: 'psycho-pass',
aliases: ['crime-coefficient'],
group: 'seeded',
memberName: 'psycho-pass',
description: 'Determines your Crime Coefficient.',
credit: [
{
name: 'PSYCHO-PASS',
url: 'http://psycho-pass.com/'
}
],
args: [
{
key: 'user',
prompt: 'What user do you want to determine the Crime Coefficient of?',
type: 'user',
default: msg => msg.author
}
]
});
}
run(msg, { user }) {
if (user.id === this.client.user.id) return msg.reply('Me? I-I\'m not dangerous, I promise!');
const random = MersenneTwister19937.seed(user.id);
const coefficient = integer(0, 500)(random);
let res;
if (coefficient < 100) res = under100;
else if (coefficient > 300) res = over300;
else res = between;
return msg.reply(
`${msg.author.id === user.id ? 'Your' : `Suspect ${user.username}'s`} Crime Coefficient is ${coefficient}. ${res}`
);
}
};
+46
View File
@@ -0,0 +1,46 @@
const Command = require('../../structures/Command');
const { MersenneTwister19937, integer } = require('random-js');
const { oneLine } = require('common-tags');
module.exports = class ShipCommand extends Command {
constructor(client) {
super(client, {
name: 'ship',
group: 'seeded',
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',
default: msg => msg.author
}
]
});
}
run(msg, { first, second }) {
if (first.id === second.id) return msg.reply('Shipping someone with themselves would be pretty weird.');
const authorInvolved = first.id === msg.author.id || second.id === msg.author.id;
const random = MersenneTwister19937.seed(Math.abs(first.id - second.id));
const level = integer(0, 100)(random);
const botText = first.id === this.client.user.id || second.id === this.client.user.id
? level >= 70
? `But ${authorInvolved ? 'you\'re' : 'they\'re'} still rejected.`
: `Haha even a bot thinks ${authorInvolved ? 'you\'re' : 'they\'re'} lame.`
: '';
return msg.say(oneLine`
${first.id === this.client.user.id ? 'Me' : first.id === msg.author.id ? 'You' : first.username} and
${second.id === this.client.user.id ? 'I' : second.id === msg.author.id ? 'you' : second.username} have a
compatability of... **${level}%**! ${botText}
`);
}
};