mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Mutes: add better logging for clear_banned_mutes cmd
This commit is contained in:
parent
6365ea4278
commit
e221584f92
1 changed files with 5 additions and 1 deletions
|
@ -170,11 +170,15 @@ export class MutesPlugin extends ZeppelinPlugin {
|
||||||
@d.command("clear_banned_mutes")
|
@d.command("clear_banned_mutes")
|
||||||
@d.permission("cleanup")
|
@d.permission("cleanup")
|
||||||
async clearBannedMutesCmd(msg: Message) {
|
async clearBannedMutesCmd(msg: Message) {
|
||||||
|
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 bans = await this.guild.getBans();
|
||||||
const bannedIds = bans.map(b => b.id);
|
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;
|
let cleared = 0;
|
||||||
for (const mute of activeMutes) {
|
for (const mute of activeMutes) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue