From e05f25f4b98cac3c2409cee9a664ab5ea6251467 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 27 Dec 2021 13:12:49 -0500 Subject: better typings and some other stuff --- src/commands/fun/minesweeper.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/commands/fun/minesweeper.ts') diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts index 16352ce..0b6c89c 100644 --- a/src/commands/fun/minesweeper.ts +++ b/src/commands/fun/minesweeper.ts @@ -1,4 +1,4 @@ -import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { Minesweeper } from '@notenoughupdates/discord.js-minesweeper'; export default class MinesweeperCommand extends BushCommand { @@ -67,7 +67,13 @@ export default class MinesweeperCommand extends BushCommand { public override async exec( message: BushMessage | BushSlashMessage, - args: { rows: number; columns: number; mines: number; spaces: boolean; reveal_first_cell: boolean } + args: { + rows: ArgType<'integer'>; + columns: ArgType<'integer'>; + mines: ArgType<'integer'>; + spaces: boolean; + reveal_first_cell: boolean; + } ) { const minesweeper = new Minesweeper({ rows: args.rows ?? 9, -- cgit