aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts1
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts14
2 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index cf8364e..af64624 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -732,6 +732,7 @@ export class BushClientUtil extends ClientUtil {
success = false;
});
if (entries) {
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
entries.forEach(async (entry) => {
await entry.destroy().catch((e) => {
void client.console.error('removePunishmentEntry', e?.stack || e);
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';