Overview • Software • Installation
MP2I is a Discord bot adapted from PyBoss bot created by Adridri.
It provides some features like:
- Roles selection
- Suggestion automation
- Custom commands (clear, profile ...)
- Moderation
Python
It's required to have python 3.9 or more installed on your system.
Download Python
Docker
You can also use Docker to deploy the environment in one command.
Get started with Docker
Git LFS
This project uses Git LFS to store large files like images and sounds.
Download Git LFS
git clone https://github.com/prepas-mp2i/mp2i-discord-bot.git
cd mp2i-discord-bot
git lfs install && git lfs pull # Download large filesFirst set variables in .env file:
DISCORD_TOKEN = <discord_bot_token>
# Can be development (More logs)
ENVIRONMENT = production
# Optional, a SQLite database will be created otherwise.
DATABASE_URL = mysql+mysqlconnector://user:password@host:port/database
#Optional
COMPOSE_PROJECT_NAME = mp2i
# Timezone
TZ = Europe/Paris
#For email, optional
SMTP_SERVER = <smtp_server>
EMAIL_USER = <email_user>
EMAIL_PASSWORD = <password>Create a bot-config.toml file based on the bot-config.yaml.example file.
Install pipenv dependencies:
python3 -m pip install pipenvNow, you can create an empty .venv directory and running pipenv
It will install packages in the virtual environment (recommended).
pipenv installRun the command python3 -m mp2i on Linux or py -m mp2i on Windows to start the bot.
docker compose up --buildNow, the bot should be running. After modifying the code,
you can update the bot using the command docker compose up.
This project is licensed under the Mozilla Public License 2.0 - see the LICENSE file for details.