From 453683b57b8ff013ff25e2aaa4aa1d2e047edcb7 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 28 Nov 2021 09:27:41 -0500 Subject: a few small changes --- src/listeners/commands/commandBlocked.ts | 12 ++++++------ src/listeners/commands/messageBlocked.ts | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/listeners/commands') diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 7c5bc67..2243abd 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -32,25 +32,25 @@ export default class CommandBlockedListener extends BushListener { switch (reason) { case reasons.OWNER: { return await respond({ - content: `${util.emojis.error} Only my developers can run the ${util.format.bold(command!.toString())} command.`, + content: `${util.emojis.error} Only my developers can run the ${util.format.input(command!.toString())} command.`, ephemeral: true }); } case reasons.SUPER_USER: { return await respond({ - content: `${util.emojis.error} You must be a superuser to run the ${util.format.bold(command!.toString())} command.`, + content: `${util.emojis.error} You must be a superuser to run the ${util.format.input(command!.toString())} command.`, ephemeral: true }); } case reasons.DISABLED_GLOBAL: { return await respond({ - content: `${util.emojis.error} My developers disabled the ${util.format.bold(command!.toString())} command.`, + content: `${util.emojis.error} My developers disabled the ${util.format.input(command!.toString())} command.`, ephemeral: true }); } case reasons.DISABLED_GUILD: { return await respond({ - content: `${util.emojis.error} The ${util.format.bold(command!.toString())} command is currently disabled in \`${ + content: `${util.emojis.error} The ${util.format.input(command!.toString())} command is currently disabled in \`${ message.guild?.name }\`.`, ephemeral: true @@ -89,7 +89,7 @@ export default class CommandBlockedListener extends BushListener { }); const pretty = util.oxford(names, 'and'); return await respond({ - content: `${util.emojis.error} ${util.format.bold(command!.toString())} can only be run in ${pretty}.`, + content: `${util.emojis.error} ${util.format.input(command!.toString())} can only be run in ${pretty}.`, ephemeral: true }); } @@ -102,7 +102,7 @@ export default class CommandBlockedListener extends BushListener { }); const pretty = util.oxford(names, 'and'); return await respond({ - content: `${util.emojis.error} ${util.format.bold(command!.toString())} can only be run in ${pretty}.`, + content: `${util.emojis.error} ${util.format.input(command!.toString())} can only be run in ${pretty}.`, ephemeral: true }); } diff --git a/src/listeners/commands/messageBlocked.ts b/src/listeners/commands/messageBlocked.ts index 6a0eaab..1b969ed 100644 --- a/src/listeners/commands/messageBlocked.ts +++ b/src/listeners/commands/messageBlocked.ts @@ -1,4 +1,4 @@ -import { BushListener, type BushBlockedReasonsEnum, type BushCommandHandlerEvents } from '#lib'; +import { BushListener, type BushCommandHandlerEvents } from '#lib'; export default class MessageBlockedListener extends BushListener { public constructor() { @@ -9,8 +9,7 @@ export default class MessageBlockedListener extends BushListener { } public override async exec(...[message, reason]: BushCommandHandlerEvents['messageBlocked']) { - const reasons = client.consts.BlockedReasons; - if ([reasons.CLIENT, reasons.BOT].includes(reason as BushBlockedReasonsEnum)) return; + if (['client', 'bot'].includes(reason)) return; // return await CommandBlockedListener.handleBlocked(message as Message, null, reason); return void client.console.verbose(`messageBlocked`, `<<${message.author.tag}>>'s message was blocked because ${reason}`); } -- cgit