Discord JS 禁止所有事件禁止成员但不返回错误

Discord JS ban all event banning members but returns no error(Discord JS 禁止所有事件禁止成员但不返回错误)
本文介绍了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 禁止所有事件禁止成员但不返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Should I use window.navigate or document.location in JavaScript?(我应该在 JavaScript 中使用 window.navigate 还是 document.location?)
Power BI - Get data from post request(Power BI - 从发布请求中获取数据)
Embed a Power BI report in React JS to get report instance(在 React JS 中嵌入 Power BI 报表以获取报表实例)
Create Report in Embed View via PowerBI API(通过 PowerBI API 在嵌入视图中创建报表)
Interactive Dialog Box in PowerBI(PowerBI 中的交互式对话框)
Print/Generate PDF of embedded power bi report(打印/生成嵌入式 power bi 报告的 PDF)