Discord JS 禁止所有事件禁止成员但不返回错误 [英] Discord JS ban all event banning members but returns no error

查看:8
本文介绍了Discord JS 禁止所有事件禁止成员但不返回错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器已被添加多个用户的 selfbot 攻击所淹没.我试图让我的机器人禁止服务器上的所有用户(很少有实际用户),但准备好的事件上的这段代码似乎不起作用.任何帮助是极大的赞赏.目前这段代码说它在控制台中被禁止,但实际上并没有禁止任何用户.(是的,我知道这可能看起来很糟糕).

My server has been overwhelmed by a selfbot attack adding multiple users. I am trying to get my bot to ban all the users (few actual users) on the server but this code on a ready event doesn't seem to work. Any help is greatly appreciated. Currently this code says its banning in console but its not actually banning any of the users. (yes i know this may look bad out of context).

client.guilds.forEach(guild => {
        guild.members.forEach(m => {
            m.ban();
            //log when member is banned in the console
            console.info(`x1b[37mx1b[44mINFOx1b[0m: Banned ${m.user.username}; ID: ${m.id}. (╯°□°)╯︵ ┻━┻`);
        });
    });

推荐答案

考虑通过 Bot 大规模禁止用户 滥用使用,我们无法为您提供帮助.如果您想清除您的公会成员,Discord 会在设置 -> 成员 -> 修剪中为您提供修剪选项,它可以帮助您删除一个块.请记住,滥用它来突袭"服务器被视为滥用.

Mass banning users via a Bot is considered abusive usage, and we cannot assist you with it. If you want to clear your guild of members, Discord gives you the Prune option within Settings -> Members -> Prune which can help you remove a chunk. Please remember that abusing this to "raid" a server is considered abuse.

这篇关于Discord JS 禁止所有事件禁止成员但不返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆