Fix order of operations
This commit is contained in:
parent
d963cf3db5
commit
79f7c00670
@ -264,13 +264,13 @@ class Infraction
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.#duration)
|
// Remove the role structures as they will cause problems when serialising for database
|
||||||
await this.#client.moderation.handleTimedInfraction(this.json);
|
|
||||||
|
|
||||||
/* LMAOOOO PLEASE DONT JUDGE ME */
|
|
||||||
if (this.#data.roles)
|
if (this.#data.roles)
|
||||||
delete this.#data.roles;
|
delete this.#data.roles;
|
||||||
|
|
||||||
|
if (this.#duration)
|
||||||
|
await this.#client.moderation.handleTimedInfraction(this.json);
|
||||||
|
|
||||||
return this.save();
|
return this.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user