mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
28 lines
576 B
JavaScript
28 lines
576 B
JavaScript
const Command = require('../../framework/Command');
|
|
const { stripIndents } = require('common-tags');
|
|
const opinions = ['👍', '👎'];
|
|
|
|
module.exports = class OpinionCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'opinion',
|
|
group: 'random-res',
|
|
description: 'Determines the opinion on something.',
|
|
args: [
|
|
{
|
|
key: 'question',
|
|
type: 'string',
|
|
max: 1950
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
run(msg, { question }) {
|
|
return msg.say(stripIndents`
|
|
_${question}_
|
|
${opinions[Math.floor(Math.random() * opinions.length)]}
|
|
`);
|
|
}
|
|
};
|