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 禁止所有事件禁止成员但不返回错误
基础教程推荐
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- 直接将值设置为滑块 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01