summaryrefslogtreecommitdiff
path: root/server/src/commands/fun/Opinion.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands/fun/Opinion.ts')
-rw-r--r--server/src/commands/fun/Opinion.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/server/src/commands/fun/Opinion.ts b/server/src/commands/fun/Opinion.ts
new file mode 100644
index 0000000..012af7e
--- /dev/null
+++ b/server/src/commands/fun/Opinion.ts
@@ -0,0 +1,34 @@
+import { Command } from 'discord-akairo';
+import { Message } from 'discord.js';
+
+export default class OpinionFun extends Command {
+ public constructor() {
+ super('opinion', {
+ aliases: ['opinion'],
+ category: 'fun',
+ description: {
+ content: 'Determines the bot\'s opinion on something. WARNING: do not take these seriously.',
+ usage: '[question]',
+ examples: [
+ 'avocadoes'
+ ]
+ },
+ ratelimit: 3,
+ args: [
+ {
+ id: 'question',
+ type: 'string',
+ prompt: {
+ start: 'What would you like to get an opinion on?'
+ },
+ match: 'rest'
+ }
+ ]
+ });
+ }
+
+ public exec(msg: Message, { question }): Promise<Message> {
+ const opinions = ['👍', '👎'];
+ return msg.reply(`*${question}* ${opinions[Math.floor(Math.random() * opinions.length)]}`);
+ }
+} \ No newline at end of file