Impurgesonator takes a Discord User's ID for the -u
flag. Then Impurgesonator will check for impersonators in every server where you have invited the Bot.
Impurgesonator will consider a user as an impersonator when:
- a user's Nickname or Username (case-insensitive) matches the Username of the User specified by the
-u
Discord ID, - the user with the case-insensitive match does not have the same Discord ID as the ID provided by
-u
Impurgesonator will ban all existing impersonators when initialized.
It will then listen for live events to detect new impersonators.
Live events are triggered when:
- a new member joins the Discord server
- an existing user changes their Username or Nickname
When a live event is triggered, Impurgesonator will check whether the user who triggered the event is an impersonator.
git clone [email protected]:BoilingSoup/impurgesonator.git
https://discord.com/developers
Make a name for the application and click Create.
Click Bot in the sidebar and then Add Bot. Confirm the message and proceed.
Store the Bot Token somewhere safe as it will be used later.
While in the bot tab, I suggest disabling the "PUBLIC BOT" slider.
And also enable the "PRESENCE INTENT" and "SERVER MEMBERS INTENT" so the bot can get info about members in your server and live updates.
Make sure to save your changes.
In the sidebar, click on OAuth2, and then URL Generator.
Enable the Ban Members bot permission
Visit the Generated URL you copied in the previous step, and add the bot to a server you own.
When added, your bot should be visible in the sidebar of your server.
You can do this by right-clicking on the user in the list of server members.
Store this Discord ID somewhere as it will be used in the next step.
Now you have the 2 necessary credentials.
- Bot Token from step 3
- Discord ID of who should not be impersonated
Go to the directory where you cloned this repo in step 1.
Run the bot with the following command
go run . -t <bot_token> -u <discord_id>
The bot will do an initial scan of existing members for impersonators and ban those that meet the criteria.
Then it will keep listening for updates to detect new impersonators.
You should also now see that the bot is Online in your server.
Done! The bot will ban users that change their Username or Nickname to fit the impersonator criteria.
And it will also ban new members that join the server and fit the impersonator criteria.