Have you ever received messages like these?
If you have been on Discord for a while, I am sure you have been warned to stay away from these links.
But the newcomers out there don't have any idea about these links and fall into such scams and lose access to their discord accounts.
Detective Discord is a bot that detects phishing links in discord messages, deletes them, warns the user who sent them, and increases their warning count by 1. Once the warning count hits 3, the user is kicked from the server and is also informed by the bot of the same.
If the bot is unable to delete the message due to missing permissions (not every server admin allows the bot to delete server messages), it replies to the message -
This way, it alerts the members of the server and keeps them safe, until the Moderators eventually delete the message.
/weather
- Returns the weather of a city/wiki
- Returns a Wikipedia summary/news
- Returns the top 5 news from BBC/joke
- Returns a random joke/dadjoke
- Returns a dad joke/avatar
- Returns mentioned user's Avatar/help
- Returns all the commands that the bot supports/reset_warn
- Reset warnings for a member/safe_domain
- Add a domain to the safe domains list/unsafe_domain
- Remove a domain from the safe domains listThe rules to detect phishing links are quite simple:
For fetching the News, the bot uses the BBC API.
For fetching the weather, the bot uses the OpenWeatherMap API.
For fetching the jokes, the bot uses the pyjokes python library.
For fetching the Wikipedia summary, the bot uses the Wikipedia python library.
cd Detective-Discord
python/python3 -m venv env
)pip install -r requirements.txt
.env
file and add your discord bot TOKEN. Adding NEWS_API, WEATHER_API KEYS is optional. Remember to remove their commands if you wish to not include them.python3 bot.py
Kanak Mittal |