diff --git a/src/client/components/managers/ModerationManager.ts b/src/client/components/managers/ModerationManager.ts index 44bfe8a..533a936 100644 --- a/src/client/components/managers/ModerationManager.ts +++ b/src/client/components/managers/ModerationManager.ts @@ -754,7 +754,9 @@ class ModerationManager implements Initialisable, CallbackClient async findActiveInfraction (type: InfractionType, target: string, guild: string) { const [ callback ] = await this.#client.callbacks.queryCallbacks({ type, target, guild }, this); - return callback ?? null; + if (!callback) + return null; + return callback; } async findActiveInfractions (query: Partial) diff --git a/src/client/components/observers/UtilityHook.ts b/src/client/components/observers/UtilityHook.ts index cff1bec..01022e9 100644 --- a/src/client/components/observers/UtilityHook.ts +++ b/src/client/components/observers/UtilityHook.ts @@ -71,7 +71,7 @@ class UtilityHook extends Observer // }); const callback = await this.client.moderation.findActiveInfraction('MUTE', member.id, guild.id); - const infraction = callback.payload; + const infraction = callback?.payload; if (!infraction || infraction.resolved) return;