diff options
Diffstat (limited to 'src/commands/fun')
-rw-r--r-- | src/commands/fun/coinFlip.ts | 4 | ||||
-rw-r--r-- | src/commands/fun/dice.ts | 4 | ||||
-rw-r--r-- | src/commands/fun/eightBall.ts | 4 | ||||
-rw-r--r-- | src/commands/fun/minesweeper.ts | 18 |
4 files changed, 19 insertions, 11 deletions
diff --git a/src/commands/fun/coinFlip.ts b/src/commands/fun/coinFlip.ts index fea5cb5..3adf7f2 100644 --- a/src/commands/fun/coinFlip.ts +++ b/src/commands/fun/coinFlip.ts @@ -1,4 +1,4 @@ -import { BushCommand, type CommandMessage, type SlashMessage } from '#lib'; +import { BushCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; export default class CoinFlipCommand extends BushCommand { public constructor() { @@ -8,7 +8,7 @@ export default class CoinFlipCommand extends BushCommand { description: 'Flip a virtual coin.', usage: ['coinflip'], examples: ['coinflip'], - clientPermissions: (m) => util.clientSendAndPermCheck(m), + clientPermissions: (m) => clientSendAndPermCheck(m), userPermissions: [], slash: true }); diff --git a/src/commands/fun/dice.ts b/src/commands/fun/dice.ts index b2bc7e4..e7e5927 100644 --- a/src/commands/fun/dice.ts +++ b/src/commands/fun/dice.ts @@ -1,4 +1,4 @@ -import { BushCommand, type CommandMessage, type SlashMessage } from '#lib'; +import { BushCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; export default class DiceCommand extends BushCommand { public constructor() { @@ -8,7 +8,7 @@ export default class DiceCommand extends BushCommand { description: 'Roll virtual dice.', usage: ['dice'], examples: ['dice'], - clientPermissions: (m) => util.clientSendAndPermCheck(m), + clientPermissions: (m) => clientSendAndPermCheck(m), userPermissions: [], slash: true }); diff --git a/src/commands/fun/eightBall.ts b/src/commands/fun/eightBall.ts index 66fcc45..eb5aee8 100644 --- a/src/commands/fun/eightBall.ts +++ b/src/commands/fun/eightBall.ts @@ -1,4 +1,4 @@ -import { BushCommand, type CommandMessage, type SlashMessage } from '#lib'; +import { BushCommand, clientSendAndPermCheck, type CommandMessage, type SlashMessage } from '#lib'; import { ApplicationCommandOptionType } from 'discord.js'; export default class EightBallCommand extends BushCommand { @@ -21,7 +21,7 @@ export default class EightBallCommand extends BushCommand { } ], slash: true, - clientPermissions: (m) => util.clientSendAndPermCheck(m), + clientPermissions: (m) => clientSendAndPermCheck(m), userPermissions: [] }); } diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts index d25cb5d..c2fdccf 100644 --- a/src/commands/fun/minesweeper.ts +++ b/src/commands/fun/minesweeper.ts @@ -1,4 +1,12 @@ -import { BushCommand, OptArgType, type ArgType, type CommandMessage, type SlashMessage } from '#lib'; +import { + BushCommand, + clientSendAndPermCheck, + emojis, + OptArgType, + type ArgType, + type CommandMessage, + type SlashMessage +} from '#lib'; import { Minesweeper } from '@notenoughupdates/discord.js-minesweeper'; import assert from 'assert'; import { ApplicationCommandOptionType } from 'discord.js'; @@ -63,7 +71,7 @@ export default class MinesweeperCommand extends BushCommand { } ], slash: true, - clientPermissions: (m) => util.clientSendAndPermCheck(m), + clientPermissions: (m) => clientSendAndPermCheck(m), userPermissions: [] }); } @@ -95,14 +103,14 @@ export default class MinesweeperCommand extends BushCommand { if (args.rows * args.columns <= args.mines * 2) return message.util.reply( - `${util.emojis.error} The number of roles multiplied by the number of columns must be greater than or equal to the number of mines multiplied by two.` + `${emojis.error} The number of roles multiplied by the number of columns must be greater than or equal to the number of mines multiplied by two.` ); - if (!matrix) return await message.util.reply(`${util.emojis.error} Something went wrong.`); + if (!matrix) return await message.util.reply(`${emojis.error} Something went wrong.`); const res = matrix.toString().replaceAll(':zero:', ':blue_square:'); - if (res.length > 2000) return message.util.reply(`${util.emojis.error} The minesweeper generated is over 2,000 characters.`); + if (res.length > 2000) return message.util.reply(`${emojis.error} The minesweeper generated is over 2,000 characters.`); return await message.util.reply(res); } |