An anti-spam/anti-raid bot for discord. It detects the number of messages being sent in a chat. Every time a message us sent, the bot stores the message in a .txt file and it's an async event so it'll be called personally for every time someone sends a message to the chat which is then counted. If it exceeds a certain threshold, the bot removes the user from the server.
-
Install the required modules!
-
Create a bot application at the discord developer portal and add to your discord server.
-
Install the required modules!
-
Allow the "Server Member Intent" under the "Privileged Gateway Intents" in the discord developer panel. (THIS IS VERY IMPORTANT! The bot will not work propertly without and will not be able to find or kick server members.)
-
Place your bot token and adjust the "antispam.py" to your liking.
-
Then Run the Bot :)
Get the discord package using;
$ pkg install discord
Clone the repository;
$ git clone https://github.com/MSVFORYOU/Anti-Spam-Bot
Change directories using;
$ cd antispamdisc
- Open the
antispam.py
file, scroll down to client.run("TOKEN_HERE") and paste your bot token in TOKEN_HERE. (more on how to get a discord token below)
-
Open
antispam.py
file using; -
$ nano antispam.py
-
Scroll down to client.run("TOKEN_HERE") and paste your bot token in TOKEN_HERE.(You'll need Hackers Keyboard for scrolling down - https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard&hl=en_IN&gl=US)
Owner |