diff --git a/structure/moderation/ModerationManager.js b/structure/moderation/ModerationManager.js index 3a0857a..478d3c7 100644 --- a/structure/moderation/ModerationManager.js +++ b/structure/moderation/ModerationManager.js @@ -163,14 +163,16 @@ class ModerationManager { responses.push(await escalation.execute()); continue; - } else { - infraction.totalPoints = await userTarget.totalPoints(message.guild, { points, expiration, timestamp: infraction.timestamp }); } } + + infraction.totalPoints = await userTarget.totalPoints(message.guild, { points, expiration, timestamp: infraction.timestamp }); + } responses.push(await infraction.execute()); + } const success = Boolean(responses.some((r) => !r.error)); diff --git a/structure/moderation/infractions/Slowmode.js b/structure/moderation/infractions/Slowmode.js index baac83a..282b5a8 100644 --- a/structure/moderation/infractions/Slowmode.js +++ b/structure/moderation/infractions/Slowmode.js @@ -37,7 +37,6 @@ class SlowmodeInfraction extends Infraction { rateLimitPerUser: this.data.seconds }, this._reason); } catch(e) { - console.error(e); return this._fail('INFRACTION_ERROR'); } diff --git a/structure/moderation/interfaces/Infraction.js b/structure/moderation/interfaces/Infraction.js index bbe1969..64ee01b 100644 --- a/structure/moderation/interfaces/Infraction.js +++ b/structure/moderation/interfaces/Infraction.js @@ -156,7 +156,7 @@ class Infraction { } if(this.points && this.points > 0) { //TODO: Add expiration to INFRACTION_DESCRIPTIONPOINTS - description += `\n${this.guild.format('INFRACTION_DESCRIPTIONPOINTS', { points: this.points, total: this.pointsTotal, expires: Util.duration(this.pointsExpiration) })}`; + description += `\n${this.guild.format('INFRACTION_DESCRIPTIONPOINTS', { points: this.points, total: this.totalPoints, expires: Util.duration(this.pointsExpiration) })}`; } if(this.description && this.description instanceof Function) { @@ -206,6 +206,8 @@ class Infraction { reason: this.reason, data: this.data, flags: this.flags, + points: this.points, + expiration: this.expiration, modLogMessage: this.modlogMessageId, dmLogMessage: this.dmlogMessageId, modLogChannel: this.modlogId,