diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-31 22:46:32 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-31 22:46:32 -0400 |
commit | 710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd (patch) | |
tree | c617d38a53064667e8d501aa1ed539ca1d8db3f7 /src/lib/extensions/discord.js | |
parent | 2f2a85707737753b23c8036de085c322641695e1 (diff) | |
download | tanzanite-710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd.tar.gz tanzanite-710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd.tar.bz2 tanzanite-710c1b9cc95d4f9cc5a437952c4cf89eca3f16cd.zip |
misc fixes
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'; |