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:
parent
e221584f92
commit
f8e0768ee2
1 changed files with 4 additions and 2 deletions
|
@ -173,8 +173,10 @@ export class MutesPlugin extends ZeppelinPlugin {
|
||||||
await msg.channel.createMessage("Clearing mutes from banned users...");
|
await msg.channel.createMessage("Clearing mutes from banned users...");
|
||||||
|
|
||||||
const activeMutes = await this.mutes.getActiveMutes();
|
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(
|
await msg.channel.createMessage(
|
||||||
`Found ${activeMutes.length} mutes and ${bannedIds.length} bans, cross-referencing...`
|
`Found ${activeMutes.length} mutes and ${bannedIds.length} bans, cross-referencing...`
|
||||||
|
|
Loading…
Add table
Reference in a new issue