diff --git a/src/client/infractions/Ban.ts b/src/client/infractions/Ban.ts index fcb0a3e..979d0fa 100644 --- a/src/client/infractions/Ban.ts +++ b/src/client/infractions/Ban.ts @@ -55,8 +55,6 @@ class BanInfraction extends Infraction if (callbacks.size > 0) callbacks.map((c) => this.client.moderation.removeCallback(c.infraction, true)); - await this.handle(); - try { await this.guild.members.ban(this.target!.id, { @@ -68,6 +66,7 @@ class BanInfraction extends Infraction { return this._fail('INFRACTION_ERROR'); } + await this.handle(); return this._succeed(); } diff --git a/src/client/infractions/Kick.ts b/src/client/infractions/Kick.ts index bc77901..5d90dc3 100644 --- a/src/client/infractions/Kick.ts +++ b/src/client/infractions/Kick.ts @@ -50,8 +50,6 @@ class KickInfraction extends Infraction async execute () { - await this.handle(); - try { await this.member!.kick(this._reason); @@ -60,6 +58,7 @@ class KickInfraction extends Infraction { return this._fail('INFRACTION_ERROR'); } + await this.handle(); return this._succeed(); } diff --git a/src/client/infractions/Softban.ts b/src/client/infractions/Softban.ts index 12c5746..d8c55d3 100644 --- a/src/client/infractions/Softban.ts +++ b/src/client/infractions/Softban.ts @@ -47,7 +47,6 @@ class SoftbanInfraction extends Infraction let days = 1; if (this.arguments.days) days = this.arguments.days.asNumber; - await this.handle(); try { @@ -61,6 +60,7 @@ class SoftbanInfraction extends Infraction { return this._fail('INFRACTION_ERROR'); } + await this.handle(); return this._succeed(); }