A discord bot which filters messages for specified keywords or regular expressions.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This library was written to act as a simple boilerplate for developing a message filter for Discord. Messages are compared against the strings in expressions.json
and are deleted where there are matches.
Each string can be formatted as either plain-text, or as a regular expression - the value of the 'type' property of each expression must equal 'string' or 'regex', respectively, as can be seen in the example.
The following instructions will explain how to download, install and run the application locally. Instructions for deploying this application in a production environment are beyond the scope of this application.
It is necessary to install the following software in order for the application to run properly.
- python
apt install python3 pip
- dependencies
pip install python-dotenv discord-py-interactions
Create an application with a bot from within the Discord Developer Portal.
The only privileged intent required is the 'Message Content Intent'.
The only permissions required when inviting the bot to a server are the 'manage messages' and 'read messages/view channels' permissions.
- Clone the repo
git clone https://github.com/muckee/discord-py-message-filter.git
- Update environment variables
cd discord-py-message-filter
cp .env.sample .env
vi .env
You can start the bot by running python3 main.py
from inside the project's root directory.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the EPL-2.0 License. See LICENSE.txt
for more information.
Muckee - @muckee_eth - [email protected]
Project Link: https://github.com/muckee/discord-py-message-filter
If this library has helped you to make a bag, please consider making a donation to one of the following addresses:
- Solana: 7tKA18pUNF3hHBTMWd1BFfj1iVcggKbcB1TxxJnrhiKW
- Monero: 857PeoGenpWLGDQNPGYHohRa6EmxocCYWDyDnQvNChbtXBhZQgrr3BW6Vjvpy4EiZrBMqgfdH2bCcRzxKu6yy54TMXRTMQ3
- Ravencoin: RGN5nDGsU51EriSYA4RAddregrS2LzB5FJ
- Bitcoin: bc1qkajr4e9lqq9elk6pdafk7x3x8kk9zqlndrxuh8
- Stellar: GD6KWYMF6T3ZQ7DFC4AEKSMAEZL7FCSDFPTN6VKHBVM4YYOGXF4VM2XY
- Near: 349d3b53b98040c6ecafa3759beb9f39a025d32bb4db51baab7652af6a0d67bb
- ETH/BNB/MATIC: 0xE078B9524549585d6eF21542a7927751b2a85E89