Skip to content

πŸ€– Telegram bot template for team-based quest games. Supports custom scenarios, team chats, step-by-step progression, and admin commands. Built with Python & pyTelegramBotAPI.

Notifications You must be signed in to change notification settings

Zebaro24/Quest-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Quest-Game Bot πŸ€–

Project Status Python pyTelegramBotAPI

Interactive team-based quest platform for Telegram with customizable storylines and administrative controls.


✨ Core Features

  • Quest Management:
    • 🎭 Multiple parallel quests with unique themes
    • 🧩 Team formation with participation confirmation
    • πŸ“œ Step-by-step quest progression
  • Communication:
    • πŸ’¬ Real-time team chat
    • πŸ“’ Broadcast messages to entire teams
  • Administration:
    • 🧹 Clear participant lists (/delete)
    • πŸ“‹ View all participants and teams (/list)

🧰 Tech Stack

  • Backend: Python
  • Telegram Integration: pyTelegramBotAPI
  • Environment Management: virtualenv

βš™οΈ Installation & Setup

  1. Clone repository

    git clone https://github.com/Zebaro24/Quest-Game.git
    cd telegram-quest-bot
  2. Create virtual environment

    python -m venv .venv
    # Windows
    .venv\Scripts\activate
    # Linux/Mac
    source .venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure environment
    Create .env file with your bot token:

    TOKEN=your_telegram_bot_token_here

πŸš€ Launching the Bot

python main.py

Player Flow

  1. Start bot with /start command
  2. Choose a quest from available options
  3. Join a team and confirm participation
  4. Follow bot instructions to complete quest stages

Admin Commands

  • /delete - Clear all participant lists
  • /list - Show all participants and teams

πŸ—‚οΈ Project Structure

main.py             # Bot entry point
quests/             # Quest implementations
β”œβ”€β”€ sample.py       # Base quest class
β”œβ”€β”€ QuestHacker.py  # Hacker-themed quest
β”œβ”€β”€ QuestVirne.py   # Reliability-themed quest
└── QuestVtrach.py  # Lost-hour-themed quest
requirements.txt    # Dependencies
.env                # Environment configuration

πŸ› οΈ Creating Custom Quests

  1. Create new Python file in quests/ directory
  2. Inherit from SampleQuest base class
  3. Define quest attributes:
    name = "Quest Name"
    max_count = 4  # Max players
    description = "Quest description"
  4. Implement func_start() for initial message
  5. Define stage functions in stage_func_get
  6. Add quest to all_quests in main.py

Example:

from sample import SampleQuest

class MyQuest(SampleQuest):
    name = "New Adventure"
    max_count = 3
    description = "An exciting new quest"

    stage_func_get = {0: lambda: 0, 1: lambda self: self.stage_1()}

    def func_start(self):
        self.send_text_all("Welcome to the quest! First task: ...")

    def stage_1(self):
        # Stage 1 logic
        pass

🎭 Sample Quests

Quest Name Theme Players Description
QuestHacker Cyberpunk 1-4 Hack through digital barriers
QuestVirne Mystery 2-5 Solve puzzles to uncover truth
QuestVtrach Adventure 3-6 Recover a lost artifact

πŸ“¬ Contact


Note: This project is a template with implemented interaction mechanics, ready for content creation. Development is currently on hold but may resume in the future.

About

πŸ€– Telegram bot template for team-based quest games. Supports custom scenarios, team chats, step-by-step progression, and admin commands. Built with Python & pyTelegramBotAPI.

Topics

Resources

Stars

Watchers

Forks

Languages