Files
xiao/commands/random/opinion.js
T
Daniel Odendahl Jr 829c087d87 Sex isn't an opinion
2018-03-02 23:01:57 +00:00

30 lines
651 B
JavaScript

const { Command } = require('discord.js-commando');
const { stripIndents } = require('common-tags');
const opinions = ['👍', '👎'];
module.exports = class OpinionCommand extends Command {
constructor(client) {
super(client, {
name: 'opinion',
group: 'random',
memberName: 'opinion',
description: 'Determines the opinion on something.',
args: [
{
key: 'question',
prompt: 'What do you want to get an opinion on?',
type: 'string',
max: 1950
}
]
});
}
run(msg, { question }) {
return msg.say(stripIndents`
${question}
${opinions[Math.floor(Math.random() * opinions.length)]}
`);
}
};