3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

Mutes: add better logging for clear_banned_mutes cmd

This commit is contained in:
Dragory 2019-01-12 14:56:47 +02:00
parent 6365ea4278
commit e221584f92

View file

@ -170,11 +170,15 @@ export class MutesPlugin extends ZeppelinPlugin {
@d.command("clear_banned_mutes")
@d.permission("cleanup")
async clearBannedMutesCmd(msg: Message) {
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);
await msg.channel.createMessage("Clearing mutes from banned users...");
await msg.channel.createMessage(
`Found ${activeMutes.length} mutes and ${bannedIds.length} bans, cross-referencing...`
);
let cleared = 0;
for (const mute of activeMutes) {