This is a Discord bot that allows server administrators to issue strikes to users. When a user accumulates 3 strikes, they are automatically banned from the server.
- Strike System: Administrators can issue strikes to users.
- Automatic Ban: Users are banned from the server when they accumulate 3 strikes.
- Database Integration: Strikes are stored in a MariaDB database.
- Configuration File: Bot token and database settings are read from a configuration file.
- Python 3.x
- discord.py
- aiomysql
-
Clone the repository:
git clone https://github.com/parttimelegend/discord-bot-strikes.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
config.ini
file based on the providedconfig.ini.example
template and fill in your bot token and database credentials. -
Run the bot:
python main.py
Edit the config.ini
file to specify your bot token and database settings.
[Database]
host = localhost
port = 3306
user = your_database_user
password = your_database_password
db = your_database_name
[Bot]
token = your_bot_token
- Invite the bot to your Discord server.
- Use
!strike @user
command to issue a strike to a user. - Use
!shutdown
command to shut down the bot.
Contributions are welcome! If you have any ideas, suggestions, or bug fixes, feel free to open an issue or create a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.