aboutsummaryrefslogtreecommitdiff
path: root/src/commands/fun/dice.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-14 21:22:09 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-14 21:22:09 -0400
commit53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3 (patch)
treef95f23aad382879b35860d4d3be3642068fac8a2 /src/commands/fun/dice.ts
parenteaaae08aeee1fa16a4e1ad0b26fceb42885bfcde (diff)
downloadtanzanite-53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3.tar.gz
tanzanite-53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3.tar.bz2
tanzanite-53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3.zip
started moving over some other commands
Diffstat (limited to 'src/commands/fun/dice.ts')
-rw-r--r--src/commands/fun/dice.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/commands/fun/dice.ts b/src/commands/fun/dice.ts
new file mode 100644
index 0000000..46b159b
--- /dev/null
+++ b/src/commands/fun/dice.ts
@@ -0,0 +1,23 @@
+import { BushCommand, BushMessage, BushSlashMessage } from '@lib';
+
+export default class EightBallCommand extends BushCommand {
+ public constructor() {
+ super('dice', {
+ aliases: ['dice', 'die'],
+ category: 'fun',
+ description: {
+ content: 'Roll virtual dice.',
+ usage: 'dice',
+ examples: ['dice']
+ },
+ clientPermissions: ['SEND_MESSAGES'],
+ slash: true
+ });
+ }
+
+ public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> {
+ const responses = ['1', '2', '3', '4', '5', '6'];
+ const answer = responses[Math.floor(Math.random() * responses.length)];
+ return await message.util.reply(`You rolled a **${answer}**.`);
+ }
+}