diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-27 21:42:06 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-27 21:42:06 -0500 |
commit | b5ada8dca12013bfc730a50f4e8808d61bce23ba (patch) | |
tree | 721f5c0f3068a7f98b30e257b3d58b2713f2f9bf /src/lib/common/AutoMod.ts | |
parent | 973bbebfd0a47b0b36d19fccf6a882e971beaaa5 (diff) | |
download | tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.tar.gz tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.tar.bz2 tanzanite-b5ada8dca12013bfc730a50f4e8808d61bce23ba.zip |
fix(FeaturesCommand): properly hide disabled features
Diffstat (limited to 'src/lib/common/AutoMod.ts')
-rw-r--r-- | src/lib/common/AutoMod.ts | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index d043ef0..93d2f8f 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -162,17 +162,15 @@ export class AutoMod { .setColor(color) .setTimestamp() ], - components: - Severity.TEMP_MUTE >= 2 - ? [ - new ActionRow().addComponents( - new ButtonComponent() - .setStyle(ButtonStyle.Danger) - .setLabel('Ban User') - .setCustomId(`automod;ban;${this.message.author.id};everyone mention and scam phrase`) - ) - ] - : undefined + components: [ + new ActionRow().addComponents( + new ButtonComponent({ + style: ButtonStyle.Danger, + label: 'Ban User', + customId: `automod;ban;${this.message.author.id};everyone mention and scam phrase` + }) + ) + ] }); } } @@ -334,10 +332,11 @@ export class AutoMod { highestOffence.severity >= 2 ? [ new ActionRow().addComponents( - new ButtonComponent() - .setStyle(ButtonStyle.Danger) - .setLabel('Ban User') - .setCustomId(`automod;ban;${this.message.author.id};${highestOffence.reason}`) + new ButtonComponent({ + style: ButtonStyle.Danger, + label: 'Ban User', + customId: `automod;ban;${this.message.author.id};${highestOffence.reason}` + }) ) ] : undefined |