This Discord bot is designed to detect and mitigate various forms of spam and scam messages in your Discord server. It uses machine learning techniques and a variety of algorithms to identify potential spam or scam messages.
- Scam Detection: The bot uses a trained machine learning model to identify potential scam messages.
- Rate Limiting: The bot uses a token bucket algorithm to limit the rate at which users can send messages.
- Message Similarity Check: The bot checks for repeated messages using cosine similarity.
- Suspicious Message Detection: The bot checks for messages with many mentions or links, and messages with all caps.
- Excessive Whitespace Detection: The bot checks for messages with excessive whitespace.
- Emoji Spam Detection: The bot checks for messages with excessive emojis.
- Image Spam Detection: The bot checks for users sending too many images in a short period of time.
- Mention Spam Detection: The bot checks for users mentioning too many users in a short period of time.
- Global Message Spam Detection: The bot checks for users sending too many messages in the server in a short period of time.
- Join Raid Detection: The bot checks for a large number of users joining the server in a short period of time.
- Account Age Check: The bot checks the account age of new members and flags new accounts.
- Clone this repository.
- Install the required Python packages using pip.
- Replace the bot token in the last line of
main.py
with your own bot token. - Run
main.py
to start the bot.
Invite the bot to your server and it will automatically start monitoring for spam and scam messages. When a user's score (based on their behavior) exceeds a certain threshold, the bot will flag them as a spammer, delete their recent messages, and assign them a 'Spammer' role that prevents them from sending messages.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.