aboutsummaryrefslogtreecommitdiff
path: root/src/commands/config
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-10-16 18:56:47 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-10-16 18:56:47 -0400
commit46d087e17a549a3b1bb9797714d5c3df440b67f5 (patch)
treea536a9dacf59e53d4288b839d80e20a392ac1190 /src/commands/config
parent2b12b94e08f4ffdbb35d6f623604657944450a82 (diff)
downloadtanzanite-46d087e17a549a3b1bb9797714d5c3df440b67f5.tar.gz
tanzanite-46d087e17a549a3b1bb9797714d5c3df440b67f5.tar.bz2
tanzanite-46d087e17a549a3b1bb9797714d5c3df440b67f5.zip
moderation changes + appeals progress
Diffstat (limited to 'src/commands/config')
-rw-r--r--src/commands/config/disable.ts18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts
index 776ecf0..ef994dd 100644
--- a/src/commands/config/disable.ts
+++ b/src/commands/config/disable.ts
@@ -8,6 +8,7 @@ import {
type CommandMessage,
type SlashMessage
} from '#lib';
+import { input } from '#lib/utils/Format.js';
import assert from 'assert/strict';
import { ApplicationCommandOptionType, AutocompleteInteraction } from 'discord.js';
@@ -87,21 +88,24 @@ export default class DisableCommand extends BotCommand {
const success = global
? await this.client.utils.setGlobal('disabledCommands', newValue).catch(() => false)
: await message.guild.setSetting('disabledCommands', newValue, message.member!).catch(() => false);
- if (!success)
+
+ const actionStem = action.substring(0, action.length - 2);
+
+ if (!success) {
return await message.util.reply({
- content: `${emojis.error} There was an error${global ? ' globally' : ''} **${action.substring(
- 0,
- action.length - 2
- )}ing** the **${commandID}** command.`,
+ content: `${emojis.error} There was an error${global ? ' globally' : ''} **${actionStem}ing** the ${input(
+ commandID
+ )} command.`,
allowedMentions: AllowedMentions.none()
});
- else
+ } else {
return await message.util.reply({
- content: `${emojis.success} Successfully **${action.substring(0, action.length - 2)}ed** the **${commandID}** command${
+ content: `${emojis.success} Successfully **${actionStem}ed** the ${input(commandID)} command${
global ? ' globally' : ''
}.`,
allowedMentions: AllowedMentions.none()
});
+ }
}
public override async autocomplete(interaction: AutocompleteInteraction) {