A discord bot to mass unban users in a server in the event of spam/rogue/malicious bot banning all users or simply to mass unban.
This is version 2.0 which uses slash commands, lesser Intents & permissions.
For version 1.x check here
First install Node.js v16.6.0 or higher. Or follow this guide
Then clone/download this repository and open the folder containing bot files. One of the files should files should be called index.js
.
Open terminal in that folder (Command prompt, Powershell, Bash, etc) and run this command:
npm install
Follow this guide to create the bot.
Navigate to the OAuth2 tab in the Discord Developers Dashboard and select URL Generator.
After input the following settings as shown below(applications.commands IS REQUIRED):
You may select Public bot
, but it is not required. If selected anyone can invite your bot. If not, no body except you can invite bot.
Follow this guide to get bot invite link.
While setting up the invite link, make sure you select these bot permissions:
You may select Administrator permission instead of the above given permissions so that the bot works flawlessly
Note: You must have Manage Server
permission or Administrator
permission on the server where you will be adding the bot.
Copy clientId
from OAuth2 page.
Create a new file called config.json
and put the following:
{
"token": "insert-bot-token-here",
"clientId": "insert-clientId"
}
If you have followed the steps correctly till now, then the basic setup is done!
The only thing remains is to turn on the bot.
Open terminal in the bot folder and run the following command:
npm start
In the terminal window you will see:
> massdiscordunban@1.1.0 prestart
> node deploy-commands.js
Successfully registered application commands.
> massdiscordunban@1.1.0 start
> node .
Bot is online! Use /unban-all to unban all users.
Your Bot invite link: https://discord.com/api/oauth2/authorize?client_id=<youtclientid>&scope=bot+applications.commands&permissions=2054
Open discord, and use the slash command: /unban-all
.
Wait for the bot to finish unbanning.
To check if the bot has unbanned all users, go to Server Settings > Bans.
There you should see 0 Bans or NO BANS
.
Incase of any issues, contact:
Ryheff24 on Twitter or on Discord: Ryheff24#6774