Skip to content

chessmaster987/Chess_Shop_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Shop Bot 🏰♟️

A telegram bot for a chess shop. You can find it in Telegram via this link: https://t.me/chess_shop_bot

Python Telegram Bot Status

A Telegram bot for browsing chess products (boards, pieces, clocks) with a simple interactive menu and simulated order system.


📖 Table of Contents


🚀 Features

  • Interactive Telegram menu
  • Product categories and subcategories
  • Display of photos + descriptions
  • Generation of unique order numbers
  • Automatic deletion of old messages
  • Easy extensibility (just add a photo + .txt)

🧭 Bot Flow

Below is a visual representation of how the user interacts with the bot:

Bot Flow

🔹 Flow Description

  1. Welcome Stage

    • User starts the bot with /start
    • Bot sends logo image
    • Displays main menu:
      • Products
      • Share Bot
  2. Share

  3. Browse Products

    • Categories:
      • Boards
      • Pieces
      • Chess Clocks
  4. Boards → Subcategories

    • Classic
    • 3-Player Boards
    • 4-Player Boards
    • Custom (e.g. Space-Themed Boards)
  5. Product Page

    • Product image
    • Description (from .txt)
    • "Add to Cart" button

📊 Menu Structure

  • /start
    • Shop items
      • Chess boards
        • Classic
        • 3 players
        • 4 players
        • Custom boards
      • Chess pieces
        • Classic pieces
        • Royal period
        • Harry Potter
      • Chess clocks
        • Mechanical
        • Electronic
        • Custom
    • Share this bot

📂 Project Structure

  • Chess_Shop_Bot/
    • chess_shop_bot.py
    • requirements.txt
    • .env
    • README.md
    • imgs/
      • logo.jpg
      • boards/
      • pieces/
      • clocks/

⚠️ Each image must have a matching .txt file:   board1.jpg and board1.txt


⚙️ Installation

1. Clone repository

git clone https://github.com/chessmaster987/Chess_Shop_Bot.git
cd Chess_Shop_Bot 

2. Create virtual environment

python -m venv venv

Activate:

Windows venv\Scripts\activate

Linux / Mac source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Create .env file

BOT_TOKEN=your_telegram_bot_token_here

Get token via Telegram @BotFather


▶️ Usage

Run the bot

python chess_shop_bot.py

Make sure your code includes: bot.remove_webhook() bot.infinity_polling()


⚠️ Common Issues

Error 409: webhook active

bot.remove_webhook()

Images not showing

  • check imgs/ folder
  • check filenames

SSL / HTTPS errors

Use polling instead of webhook


💡 Tips

  1. Add new products → just add:
    • image
    • .txt description
  2. Easy to modify categories via callback_data
  3. Bot auto-cleans old messages

👨‍💻 Author

Vladyslav Lavrov GitHub LinkedIn

About

A telegram bot for a chess shop. You can find it in Telegram via this link: https://t.me/chess_shop_bot

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors