Infraction logging bugfix #23

Merged
Navy.gif merged 3 commits from development into alpha 2024-10-27 21:23:21 +01:00

View File

@ -579,13 +579,13 @@ class ModerationManager implements Initialisable, CallbackClient
const dmBefore = [ 'BAN', 'KICK', 'SOFTBAN' ].includes(infraction.type); const dmBefore = [ 'BAN', 'KICK', 'SOFTBAN' ].includes(infraction.type);
if (dmBefore) if (dmBefore)
await infraction.handle(); await response.infraction.handle();
const result = await response.infraction.execute(); const result = await response.infraction.execute();
if (!result.error) if (!result.error)
{ {
if (!dmBefore) if (!dmBefore)
await infraction.handle(); await response.infraction.handle();
await infraction.save(); await response.infraction.save();
} }
// Infraction doesn't have an ID until it is executed, hence this after execute // Infraction doesn't have an ID until it is executed, hence this after execute