From de86c77eff4c2dfd5421c9a14a8f88cbac7abd18 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 14 Feb 2022 20:54:55 -0500 Subject: fix: disable appeals for now --- src/commands/config/features.ts | 11 ++++++++--- src/lib/models/instance/Guild.ts | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 2e7d623..7389ceb 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -90,9 +90,14 @@ export default class FeaturesCommand extends BushCommand { .setMaxValues(1) .setMinValues(1) .setOptions( - guildFeatures.map((f) => - new SelectMenuOption().setLabel(guildFeaturesObj[f].name).setValue(f).setDescription(guildFeaturesObj[f].description) - ) + guildFeatures + .filter((f) => guildFeaturesObj[f].notConfigurable !== false) + .map((f) => + new SelectMenuOption() + .setLabel(guildFeaturesObj[f].name) + .setValue(f) + .setDescription(guildFeaturesObj[f].description) + ) ) ); } diff --git a/src/lib/models/instance/Guild.ts b/src/lib/models/instance/Guild.ts index b81562c..4d7f208 100644 --- a/src/lib/models/instance/Guild.ts +++ b/src/lib/models/instance/Guild.ts @@ -311,6 +311,7 @@ interface GuildFeature { name: string; description: string; default: boolean; + notConfigurable?: boolean; } const asGuildFeature = (gf: { [K in keyof T]: GuildFeature }) => gf; @@ -389,7 +390,8 @@ export const guildFeaturesObj = asGuildFeature({ punishmentAppeals: { name: 'Punishment Appeals', description: 'Allow users to appeal their punishments and send the appeal to the configured channel.', - default: false + default: false, + notConfigurable: true } }); @@ -412,7 +414,7 @@ export const guildLogsObj = { }, appeals: { description: 'Where punishment appeals are sent.', - configurable: true + configurable: false } }; -- cgit