Skip to content

e-psi-lon/Epsi-BOT

Repository files navigation

Epsi-BOT

License Python Pycord Version Activity Ruff uv

Database Schema

The bot uses MySQL for data persistence. You need to provide all the informations regarding how to connect to it in the environment variables.

Core Tables

Common Elements — Common fields used across multiple tables

CREATED_AT UPDATED_AT
DATETIME DATETIME

Server — Discord guild settings

SERVER_ID (PK) LOOP_SONG LOOP_QUEUE RANDOM VOLUME POSITION
INTEGER BOOLEAN BOOLEAN BOOLEAN INTEGER INTEGER

Song — Audio track information

SONG_ID (PK) NAME URL (UQ)
INTEGER VARCHAR TEXT

User — Discord user mapping

ASKER_ID (PK) DISCORD_ID (UQ)
INTEGER INTEGER

Playlists

Playlist — Named collections of songs

PLAYLIST_ID (PK) NAME
INTEGER VARCHAR

PlaylistSong — Playlist song assignments

PLAYLIST_ID (FK) SONG_ID (FK) POSITION ASKER (FK)
INTEGER INTEGER INTEGER INTEGER

Relationships

ServerPlaylist — Server playlist assignments

SERVER_ID (FK) PLAYLIST_ID (FK)
INTEGER INTEGER

UserPlaylist — User playlist ownership

USER_ID (FK) PLAYLIST_ID (FK)
INTEGER INTEGER

Queue — Server song queue

SERVER_ID (FK) SONG_ID (FK) ASKER (FK) POSITION
INTEGER INTEGER INTEGER INTEGER

SongListenCount — Play count tracking

SONG_ID (FK) COUNT
INTEGER INTEGER

Legend:

  • PK: Primary Key
  • FK: Foreign Key
  • UQ: Unique Constraint

Development Setup

Prerequisites

  • Python 3.13+
  • Python development tools (usually python3-dev or python3-devel)
  • FFmpeg
  • Libffi-dev (or libffi-devel)
  • MySQL (SQLite if you plan to run unit tests)
  • Memcached
  • (Optional) Use uv for easy dependency management and build

Environment Setup

  1. Clone the repository:

    git clone https://github.com/e-psi-lon/Epsi-BOT.git
    cd Epsi-Bot
  2. Create and fill in the .env file based on the example:

    cp .env.example .env
    # Edit .env with your credentials and settings
  3. Install the bot using one of these methods:

    # Using uv (recommended)
    uv pip install .
    
    # Using standard pip
    python -m pip install .
    # or
    pip install .
  4. For development, install in editable mode:

    uv pip install -e ".[dev]"

Running the Bot

uv run -m epsi_bot
# or
python -m epsi_bot

Contributors

Contributors

License

This project is licensed under the MIT License — see the LICENSE file for details.

Not a requirement but if you somehow use my project, buy me a coffee *(well hot chocolate, I don't like coffee)* or star the repo on GitHub :p

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors