Skip to content

prepas-mp2i/mp2i-discord-bot

Repository files navigation

MP2I

A Discord bot for MP2I server

OverviewSoftwareInstallation

GitHub top language: Python   Python3.9   discord.py   GitHub repo size   License   GitHub last commit (branch)  

Overview

MP2I is a Discord bot adapted from PyBoss bot created by Adridri.

It provides some features like:

  • Roles selection
  • Music player
  • Suggestion automation
  • Custom commands (clear, profile ...)
  • Moderation

Software

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

Installation

First 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
# For YouTube API (optional).
API_DEVELOPER_KEY = <youtube_api_developer_key>
#Optional
COMPOSE_PROJECT_NAME = mp2i
# Timezone
TZ = Europe/Paris
#For email, optional
SMTP_SERVER = <smtp_server>

EMAIL_USER = <email_user>

EMAIL_PASSWORD = <password>
  • Using Pipenv

Install pipenv dependencies:

python3 -m pip install pipenv

Now, you can create an empty .venv directory and running pipenv It will install packages in the virtual environment (recommended).

pipenv install

Run the command python3 -m mp2i on Linux or py -m mp2i on Windows.

  • Using Docker

docker-compose up --build