3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Mutes: possible fix for clear_banned_mutes

This commit is contained in:
Dragory 2019-01-12 15:03:15 +02:00
parent e221584f92
commit f8e0768ee2

View file

@ -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...`