/discord-gamepicker

Primary LanguagePythonOtherNOASSERTION

Wheel of Games Bot 🎉🎮

Description

Welcome to the "Wheel of Games" Bot! This bot helps you randomly choose games to play with your friends. The bot spins a virtual wheel and selects a game based on the number of players and a variety of other factors, ensuring a fun and fair game selection experience.

Features

  • Choose a game randomly based on player count.
  • Skip or reject games with ease.
  • Schedule events for the selected game.
  • Mark game sessions as ignored for future selection.

Commands & Parameters 📋

/choosegame

Choose a game to play!

Parameters:

  • player_count: Required – The number of players needed for the game. (e.g., 2, 4, 8)
  • ignore_least_played: Optional – A boolean flag to choose games other than the least played games. (default: False)

Functionality

  1. The bot will spin a wheel with eligible games based on the player count.
  2. You will be asked to confirm the selected game.
  3. If the game isn't suitable, you can choose another by rejecting the current selection.
  4. Once confirmed, an event can be scheduled for the game.

/wipegamememory

Mark a game log as ignored. This means that this play record won't count toward "times played" for a game.

Games are (by default) selected by their least played count.

Parameters:

  • game_name: Required – The name of the game to mark as ignored.
  • memory_date: Optional – The specific date to mark as ignored (formatted as YYYY-MM-DD). If None provided, all records are marked as ignored for the specified game.

/listgames

List all available games and their details.

Parameters:

  • player_count Optional - The number of players to list games that support that count.

Output:

  • Displays a list of games, their last played date, the number of times played.

Installation to Run it

Docker Run

docker run -d \
  --name wheel-of-games-bot \
  -e DISCORD_TOKEN="your-bot-token" \
  -v /path/to/your/config/folder:/app/config \
  denizenn:wheel-of-games-bot:latest

Replace "your-bot-token" with your actual Discord bot token. This will run the bot as a detached container named wheel-of-games-bot with the specified bot token passed as an environment variable.

Replace "path/to/your/config/folder" with the location you'd like the bot to store its database.

Local Setup & Installation ⚙️

Prerequisites

  • Python 3.9+
  • Docker (if deploying in a container)
  • A Discord bot token

Local Setup

  1. Clone the repository:
    git clone https://github.com/your-repo/wheel-of-games-bot.git
    cd wheel-of-games-bot
  2. Install dependencies:
    pip install -r requirements.txt
  3. Create a .env file:
    DISCORD_TOKEN=your_discord_bot_token
  4. Run the bot:
    python bot.py

Docker Deployment

  1. Build the Docker image:
    docker build -t wheel-of-games-bot .
  2. Run the container:
    docker run -e DISCORD_TOKEN=your_discord_bot_token wheel-of-games-bot

Contributing 🤝

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -am 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License 📄

This project is licensed under the AGPL-3.0 License – see the LICENSE file for details.


Credits 🏆

  • Creator: ChatGPT with tweaks by @joeShuff
  • Contributors: Open for contributions!