問題描述
我的服務(wù)器已被添加多個用戶的 selfbot 攻擊所淹沒.我試圖讓我的機(jī)器人禁止服務(wù)器上的所有用戶(很少有實際用戶),但準(zhǔn)備好的事件上的這段代碼似乎不起作用.任何幫助是極大的贊賞.目前這段代碼說它在控制臺中被禁止,但實際上并沒有禁止任何用戶.(是的,我知道這可能看起來很糟糕).
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 大規(guī)模禁止用戶 濫用使用,我們無法為您提供幫助.如果您想清除您的公會成員,Discord 會在設(shè)置 -> 成員 -> 修剪中為您提供修剪選項,它可以幫助您刪除一個塊.請記住,濫用它來突襲"服務(wù)器被視為濫用.
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.
這篇關(guān)于Discord JS 禁止所有事件禁止成員但不返回錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!