bugfixes
This commit is contained in:
parent
31a1fbe865
commit
72bccab282
@ -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>)
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user