From f8e0768ee2f05c9ca655a7a2422922e89f4f3c43 Mon Sep 17 00:00:00 2001 From: Dragory Date: Sat, 12 Jan 2019 15:03:15 +0200 Subject: [PATCH] Mutes: possible fix for clear_banned_mutes --- src/plugins/Mutes.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/Mutes.ts b/src/plugins/Mutes.ts index e263fa6a..c587b92a 100644 --- a/src/plugins/Mutes.ts +++ b/src/plugins/Mutes.ts @@ -173,8 +173,10 @@ export class MutesPlugin extends ZeppelinPlugin { await msg.channel.createMessage("Clearing mutes from banned users..."); const activeMutes = await this.mutes.getActiveMutes(); - const bans = await this.guild.getBans(); - const bannedIds = bans.map(b => b.id); + + // Mismatch in Eris docs and actual result here, based on Eris's code comments anyway + const bans: Array<{ reason: string; user: User }> = (await this.guild.getBans()) as any; + const bannedIds = bans.map(b => b.user.id); await msg.channel.createMessage( `Found ${activeMutes.length} mutes and ${bannedIds.length} bans, cross-referencing...`