Skip to content

coslynx/Discord-Mini-Games-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation


Discord-Mini-Games-Bot

◦ A Discord bot for playing engaging mini-games within your server.

◦ Developed with the software and tools below.

GitHub license git-last-commit GitHub commit activity GitHub top language

📑 Table of Contents

📍 Overview

This project aims to develop a Discord bot that enables users to play fun and engaging mini PvP games directly within their Discord server. The bot will provide a seamless and interactive experience, enhancing server community engagement and adding an exciting element of competition.

📦 Features

  • Discord Integration: The bot will seamlessly integrate with Discord using the Discord API.
  • Game Selection: Users can choose from a variety of mini-games like Tic-Tac-Toe, Rock Paper Scissors, and Trivia.
  • Matchmaking: The bot facilitates matchmaking based on game type and user preferences.
  • In-Game Mechanics: Players interact with the bot using Discord commands to make moves, answer questions, or take actions within the game.
  • Leaderboards: Leaderboards track player progress and rankings for each game.
  • Customization: Server administrators can customize settings such as enabling/disabling games, setting designated game channels, and defining command prefixes.
  • User Interface: A user-friendly interface will guide users through game selection, matchmaking, gameplay, and accessing information.

📂 Repository Structure

├── bot
│   ├── cogs
│   │   ├── games
│   │   │   ├── rock_paper_scissors.py
│   │   │   ├── tic_tac_toe.py
│   │   │   └── trivia.py
│   │   ├── admin.py
│   │   └── general.py
│   ├── database
│   │   ├── models.py
│   │   └── db_utils.py
│   ├── utils
│   │   ├── embeds.py
│   │   ├── matchmaking.py
│   │   └── game_logic.py
│   └── main.py
├── requirements.txt
└── .env

💻 Installation

🔧 Prerequisites

  • Python 3.8 or higher
  • pip (package installer for Python)
  • PostgreSQL (for database)

🚀 Setup Instructions

  1. Clone the repository:
    git clone https://github.com/spectra-ai-codegen/Discord-Mini-Games-Bot.git
  2. Navigate to the project directory:
    cd Discord-Mini-Games-Bot
  3. Install dependencies:
    pip install -r requirements.txt
  4. Set up environment variables:
    • Create a .env file (if it doesn't exist) and add the following:
      DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN
      DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASE
      PREFIX=! 
      
    • Replace placeholders with your actual values:
      • DISCORD_TOKEN: Your Discord bot token.
      • DATABASE_URL: Your PostgreSQL database connection string.
      • PREFIX: The default command prefix for the bot (optional, default is !).

🏗️ Usage

🏃‍♂️ Running the Bot

  1. Start the bot:
    python bot/main.py
  2. Invite the bot to your Discord server:

🌐 Hosting

🚀 Deployment Instructions

  1. Dockerize the project:
    • Create a Dockerfile in the project root:
      FROM python:3.8-slim
      WORKDIR /app
      COPY requirements.txt .
      RUN pip install -r requirements.txt
      COPY . .
      CMD ["python", "bot/main.py"]
  2. Build the Docker image:
    docker build -t discord-mini-games-bot .
  3. Run the Docker container:
    docker run -d -p 80:80 discord-mini-games-bot
  4. Host the container on a cloud platform:
    • You can use services like Heroku, AWS, Google Cloud, etc. to host the Docker container.

📄 License

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

👥 Authors and Acknowledgments

🌐 Spectra.Codes

Why only generate Code? When you can generate the whole Repository!