From 5b3df90067b6586e7595fe49157683dfe61b842a Mon Sep 17 00:00:00 2001 From: Keanu Date: Sat, 15 Aug 2020 21:02:58 +0000 Subject: [PATCH] Moved 8ball to Fun category. --- src/commands/fun.ts | 39 +-------------------------------------- src/commands/fun/8ball.ts | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 src/commands/fun/8ball.ts diff --git a/src/commands/fun.ts b/src/commands/fun.ts index 35d7b51..0250179 100644 --- a/src/commands/fun.ts +++ b/src/commands/fun.ts @@ -2,49 +2,12 @@ import { MessageEmbed } from "discord.js"; import Command from "../core/command"; import {CommonLibrary} from "../core/lib"; -const responses = [ - "Most likely,", - "It is certain,", - "It is decidedly so,", - "Without a doubt,", - "Definitely,", - "You may rely on it,", - "As I see it, yes,", - "Outlook good,", - "Yes,", - "Signs point to yes,", - "Reply hazy, try again,", - "Ask again later,", - "Better not tell you now,", - "Cannot predict now,", - "Concentrate and ask again,", - "Don't count on it,", - "My reply is no,", - "My sources say no,", - "Outlook not so good,", - "Very doubtful," -]; - export default new Command({ description: "Fun commands.", endpoint: false, run: "Please provide an argument.\nFor help, run `%prefix%help fun`.", subcommands: { - "8ball": new Command({ - description: "Answers your question in an 8-ball manner.", - endpoint: false, - usage: "", - run: "Please provide a question.", - any: new Command({ - description: "Question to ask the 8 Ball.", - async run($: CommonLibrary): Promise - { - const sender = $.message.author; - $.channel.send($(responses).random() + ` <@${sender.id}>`); - } - }) - }), poll: new Command({ description: "Create a poll.", usage: "", @@ -68,4 +31,4 @@ export default new Command({ }) }) } -}); \ No newline at end of file +}); diff --git a/src/commands/fun/8ball.ts b/src/commands/fun/8ball.ts new file mode 100644 index 0000000..86a6e62 --- /dev/null +++ b/src/commands/fun/8ball.ts @@ -0,0 +1,39 @@ +import Command from "../../core/command"; +import {CommonLibrary} from "../../core/lib"; +const responses = [ + "Most likely,", + "It is certain,", + "It is decidedly so,", + "Without a doubt,", + "Definitely,", + "You may rely on it,", + "As I see it, yes,", + "Outlook good,", + "Yes,", + "Signs point to yes,", + "Reply hazy, try again,", + "Ask again later,", + "Better not tell you now,", + "Cannot predict now,", + "Concentrate and ask again,", + "Don't count on it,", + "My reply is no,", + "My sources say no,", + "Outlook not so good,", + "Very doubtful," +]; + +export default new Command({ + description: "Answers your question in an 8-ball manner.", + endpoint: false, + usage: "", + run: "Please provide a question.", + any: new Command({ + description: "Question to ask the 8-ball.", + async run($: CommonLibrary): Promise + { + const sender = $.message.author; + $.channel.send($(responses).random() + ` <@${sender.id}>`); + } + }) +})