From b5bf445ce4127f242b5b3a1e10e35bf1fcabce53 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sun, 11 Sep 2022 15:31:54 +0300 Subject: [PATCH] apply modpoints multiplier --- src/localization/en_gb/general/en_gb_moderation.lang | 2 +- src/structure/client/ModerationManager.js | 1 + src/structure/interfaces/Infraction.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/localization/en_gb/general/en_gb_moderation.lang b/src/localization/en_gb/general/en_gb_moderation.lang index 3b955f0..52e6c4f 100644 --- a/src/localization/en_gb/general/en_gb_moderation.lang +++ b/src/localization/en_gb/general/en_gb_moderation.lang @@ -34,7 +34,7 @@ Failed to {infraction} {targetType} {target} because {reason}. **Reason:** {reason} [INFRACTION_DESCRIPTIONPOINTS] -**Points:** {points} | **Total Points**: {total} +**Points:** {points} (expires {expires}) | **Total Points**: {total} [INFRACTION_DESCRIPTIONDURATION] **Duration:** {duration} diff --git a/src/structure/client/ModerationManager.js b/src/structure/client/ModerationManager.js index dbdc9ab..09b7bb2 100644 --- a/src/structure/client/ModerationManager.js +++ b/src/structure/client/ModerationManager.js @@ -257,6 +257,7 @@ class ModerationManager { break; } } + if (modpoints.multiplier) expiration *= points; } const verify = async (infraction, escalated = false) => { diff --git a/src/structure/interfaces/Infraction.js b/src/structure/interfaces/Infraction.js index f9777ca..2e74f7d 100644 --- a/src/structure/interfaces/Infraction.js +++ b/src/structure/interfaces/Infraction.js @@ -189,11 +189,11 @@ class Infraction { description += `\n${this.guild.format('INFRACTION_DESCRIPTIONDURATION', { duration: Util.humanise(Math.floor(this.duration / 1000)) })}`; } - if (this.points && this.points > 0) { //TODO: Add expiration to INFRACTION_DESCRIPTIONPOINTS + if (this.points && this.points > 0) { description += `\n${this.guild.format('INFRACTION_DESCRIPTIONPOINTS', { points: this.points, total: this.totalPoints, - expires: Util.duration(this.points) + expires: `` })}`; }