diff options
Diffstat (limited to 'src/lib/extensions/discord.js')
-rw-r--r-- | src/lib/extensions/discord.js/BushGuild.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index acfe5da..9468941 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -48,12 +48,14 @@ export class BushGuild extends Guild { let notBanned = false; if (!bans.has(user)) notBanned = true; - const unbanSuccess = this.bans.remove(user, `${moderator.tag} | ${options.reason || 'No reason provided.'}`).catch((e) => { - if (e?.code === 'UNKNOWN_BAN') { - notBanned = true; - return true; - } else return false; - }); + const unbanSuccess = await this.bans + .remove(user, `${moderator.tag} | ${options.reason || 'No reason provided.'}`) + .catch((e) => { + if (e?.code === 'UNKNOWN_BAN') { + notBanned = true; + return true; + } else return false; + }); if (!unbanSuccess) return 'error unbanning'; |