diff --git a/src/structure/client/ModerationManager.js b/src/structure/client/ModerationManager.js index e5bfa7a..4c23b64 100644 --- a/src/structure/client/ModerationManager.js +++ b/src/structure/client/ModerationManager.js @@ -346,7 +346,9 @@ class ModerationManager { response.infraction.totalPoints += points; } const result = await response.infraction.execute(); - await targetWrapper.totalPoints(guild, { + + // Infraction doesn't have an ID until it is executed, hence this after execute + if (response.infraction.targetType === 'USER') await targetWrapper.totalPoints(guild, { points, expiration, timestamp: response.infraction.timestamp, id: response.infraction.id }); return result;