mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
30 lines
651 B
JavaScript
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)]}
|
|
`);
|
|
}
|
|
};
|