Protects your discord server from impersonators of moderators and admins. Detection threshold fully configurable.
- Create an application on the discord developer portal
- Copy the
Client IDfrom the OAuth2 application page - Add a bot to the applications, accepting the warning
- Reset the
Token, and copy it - Enable the
Server Members IntentunderPrivileged Gateway Intents - Go to OAuth2 page and create a URL with the scope
botandapplications.commands, with the following bot permissions:Kick Members,Ban Members,Create Instant InviteandManage Nicknames. Use the generated URL to add the bot to your server - Clone the repo:
git clone https://github.com/Adamiok/banna-bot.git - Place the
Client IDandTokeninto a.envfile with the same format as.env.example - Run:
npm install - Deploy commands to discord using
npm run deploy - Start the bot using
node .
All configuration for the bot is done using discord slash commands in your server. All commands have a description attached you can view in discord, however some are also explained below.
/config enabled - Turn on/off automatic detection and kick/ban of users who exceed the thresholds. Recommended to set to true only after you have run the test command (see below)
/config thresholds {type} - Configure the detection thresholds for username/avatar, nicknames and display names are only detected when an exact match is found as they are not unique
/protect {action} - Configure which members are protected from being impersonated
/test all - Check if any member currently in the server exceeds the detection threshold. Is recommended to be ran before enabling automatic detection, can take a while to execute depending on your server size
/test custom - Check if a member with these properties would be detected