Discord JS ban all event banning members but returns no error(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 禁止所有事件禁止成员但不返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Discord JS 禁止所有事件禁止成员但不返回错误
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- Fetch API 如何获取响应体? 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01