Files
xiao/commands/analyze/iq.js
T
Daniel Odendahl Jr 9c0f89b53e IQ Command
2018-09-05 23:51:02 +00:00

29 lines
736 B
JavaScript

const Command = require('../../structures/Command');
const Random = require('random-js');
module.exports = class IQCommand extends Command {
constructor(client) {
super(client, {
name: 'iq',
aliases: ['intelligence-quotient'],
group: 'analyze',
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 }) {
const random = new Random(Random.engines.mt19937().seed(user.id));
const score = random.integer(20, 170);
return msg.reply(`${user.id === msg.author.id ? 'Your' : `${user.username}'s`} IQ score is ${score}.`);
}
};