diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-28 09:27:41 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-28 09:27:41 -0500 |
commit | 453683b57b8ff013ff25e2aaa4aa1d2e047edcb7 (patch) | |
tree | 8b98d2f30dbb6a8448602446cfacf9091667cc33 /src/listeners/commands | |
parent | de4c3dcaf172804d34ae708be1ed3e75af42f4d5 (diff) | |
download | tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.gz tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.tar.bz2 tanzanite-453683b57b8ff013ff25e2aaa4aa1d2e047edcb7.zip |
a few small changes
Diffstat (limited to 'src/listeners/commands')
-rw-r--r-- | src/listeners/commands/commandBlocked.ts | 12 | ||||
-rw-r--r-- | src/listeners/commands/messageBlocked.ts | 5 |
2 files changed, 8 insertions, 9 deletions
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}`); } |