apply modpoints multiplier

This commit is contained in:
Erik 2022-09-11 15:31:54 +03:00
parent 2daf1cfbd7
commit b5bf445ce4
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
3 changed files with 4 additions and 3 deletions

View File

@ -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}

View File

@ -257,6 +257,7 @@ class ModerationManager {
break;
}
}
if (modpoints.multiplier) expiration *= points;
}
const verify = async (infraction, escalated = false) => {

View File

@ -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: `<t:${Math.round(this.expiration / 1000)}:R>`
})}`;
}