From 646a43e755c1c2f596fd0034ba440d39be3386e4 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Thu, 14 Jul 2022 10:48:37 +0300 Subject: [PATCH] bugfix --- src/structure/client/ModerationManager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;