development #7

Merged
Navy.gif merged 4 commits from development into main 2024-03-26 16:42:28 +01:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 72bccab282 - Show all commits

View File

@ -754,7 +754,9 @@ class ModerationManager implements Initialisable, CallbackClient
async findActiveInfraction (type: InfractionType, target: string, guild: string) async findActiveInfraction (type: InfractionType, target: string, guild: string)
{ {
const [ callback ] = await this.#client.callbacks.queryCallbacks<InfractionJSON>({ type, target, guild }, this); const [ callback ] = await this.#client.callbacks.queryCallbacks<InfractionJSON>({ type, target, guild }, this);
return callback ?? null; if (!callback)
return null;
return callback;
} }
async findActiveInfractions (query: Partial<InfractionJSON>) async findActiveInfractions (query: Partial<InfractionJSON>)

View File

@ -71,7 +71,7 @@ class UtilityHook extends Observer
// }); // });
const callback = await this.client.moderation.findActiveInfraction('MUTE', member.id, guild.id); const callback = await this.client.moderation.findActiveInfraction('MUTE', member.id, guild.id);
const infraction = callback.payload; const infraction = callback?.payload;
if (!infraction || infraction.resolved) if (!infraction || infraction.resolved)
return; return;