Skip to content

🐺 Discord Garulf Bot

Python 3.10 linting: pylint Code style: black

Quality Gate Status Coverage Security Rating Vulnerabilities

Reliability Rating Maintainability Rating Code Smells Technical Debt

A Discord bot for hosting and managing the classic Werewolf (Loup-Garou) game within Discord servers. This project aims to automate the game experience, including player management, role distribution, and game logic.


👥 Project Information

Maintained by: Loïc T

Main Contributors - Leo S.

Special Thanks

  • Oussama H.
  • Ludovic J.
  • Anaïs R.

Beloved (Monkey) Testers

  • TO BE FILLED

⚙️ Prerequites

Bot Permissions

  • View channels
  • Manage roles
  • Manage channels
  • Manage threads
  • Create public threads
  • Create private threads
  • Send messages
  • Send messages in threads
  • Manage messages
  • Embed links
  • Attach files
  • Read message history

Minimal Permission integer : 395405552656

Privileged gateway intent: Server Members Intent must be enabled in the Discord developer portal.

Start Your Instance

To start your instance, first clone the repository onto your machine. Then, set up a virtual environment that matches the Python version specified in the pyproject.toml file, install dependencies, and run the application.

1. Clone the Repository

git clone <repo-url>
cd <repo-folder>

2. Check Python Version Requirements

Open the pyproject.toml file and look for the required Python version (e.g., requires-python). Make sure your system has a compatible version installed:

python3 --version

If needed, install the correct version using tools like pyenv.

3. Create a Virtual Environment

Create a virtual environment in the project directory:

python3 -m venv .venv

4. Activate the Virtual Environment

source .venv/bin/activate
pip install --upgrade pip

6. Install Dependencies

Install the project dependencies defined in pyproject.toml:

pip install -e .

7. Configure the Bot

The bot reads its settings from environment variables, or from a .env file in the project directory:

Variable Required Description
DISCORD_TOKEN yes Token of the Discord bot
LOG_LEVEL no DEBUG, INFO (default), WARNING...
BOT_LOCALE no Language of the public texts, fr (default) or en
SYNC_COMMANDS no 0 to skip the slash commands sync at startup (it is rate limited)
COMMANDS_GUILD_ID no Sync the slash commands on this server only, where they are available at once

8. Run the Application

Start the application with:

python -m sources.bot

Development Mode

python -m dev --profile NAME runs the bot with a development profile (short phases, test accounts, forced roles...). See docs/CONTRIBUTING.md to set up dev/profiles/local.json and write your own profiles, and python -m dev --list for the available ones.