From 23bf2485fe17472f17bd0ee0af6b22973e317550 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 15 Nov 2021 21:21:14 -0500 Subject: made javascript command probably a really bad idea --- src/listeners/commands/commandBlocked.ts | 12 ++++++------ src/listeners/commands/commandError.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/listeners') diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 1435ae3..20c0f6e 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 \`${command}\` command.`, + content: `${util.emojis.error} Only my developers can run the ${util.format.bold(command!.toString())} command.`, ephemeral: true }); } case reasons.SUPER_USER: { return await respond({ - content: `${util.emojis.error} You must be a superuser to run the \`${command}\` command.`, + content: `${util.emojis.error} You must be a superuser to run the ${util.format.bold(command!.toString())} command.`, ephemeral: true }); } case reasons.DISABLED_GLOBAL: { return await respond({ - content: `${util.emojis.error} My developers disabled the \`${command}\` command.`, + content: `${util.emojis.error} My developers disabled the ${util.format.bold(command!.toString())} command.`, ephemeral: true }); } case reasons.DISABLED_GUILD: { return await respond({ - content: `${util.emojis.error} The \`${command}\` command is currently disabled in \`${message.guild?.name}\`.`, + content: `${util.emojis.error} The ${util.format.bold(command!.toString())} command is currently disabled in \`${message.guild?.name}\`.`, ephemeral: true }); } @@ -87,7 +87,7 @@ export default class CommandBlockedListener extends BushListener { }); const pretty = util.oxford(names, 'and'); return await respond({ - content: `${util.emojis.error} \`${command}\` can only be run in ${pretty}.`, + content: `${util.emojis.error} ${util.format.bold(command!.toString())} can only be run in ${pretty}.`, ephemeral: true }); } @@ -100,7 +100,7 @@ export default class CommandBlockedListener extends BushListener { }); const pretty = util.oxford(names, 'and'); return await respond({ - content: `${util.emojis.error} \`${command}\` can only be run in ${pretty}.`, + content: `${util.emojis.error} ${util.format.bold(command!.toString())} can only be run in ${pretty}.`, ephemeral: true }); } diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index 6eceb68..c005574 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -22,7 +22,7 @@ export default class CommandErrorListener extends BushListener { const isSlash = message.util!.isSlash; const errorNum = Math.floor(Math.random() * 6969696969) + 69; // hehe funny number const channel = - message.channel!.type === 'DM' + message.channel?.type === 'DM' ? (message.channel as DMChannel)!.recipient.tag : (message.channel as GuildTextBasedChannels)!.name; const command = _command ?? message.util?.parsed?.command; -- cgit