TelegramGiftsBot — Automated Gift Purchase Bot for Telegram
No fees. Fully open source.
A powerful Telegram bot designed to automate the purchase of gifts from a marketplace. It supports both bot-mode and userbot-mode (via your own Telegram session). Offers full automation with customizable profiles and built-in purchase logic.
Key Features
Quick Start
git clone https://github.com/leozizu/TelegramGiftsBot.git
pip install -r requirements.txt
Example:
TELEGRAM_BOT_TOKEN="123456:abcdefghijklmnopqrstuvwxyz"
TELEGRAM_USER_ID="123456789"
python main.py
Project Structure
For Developers
No fees. Fully open source.
A powerful Telegram bot designed to automate the purchase of gifts from a marketplace. It supports both bot-mode and userbot-mode (via your own Telegram session). Offers full automation with customizable profiles and built-in purchase logic.
[] Purchase gifts based on filters: minimum/maximum price, stock, and number of purchases.
[] Works both as a bot and as a userbot — connect your own Telegram session to buy gifts directly.
[] SOCKS5 proxy support for userbot and aiohttp session.
[] Parallel checking from two sources (bot + userbot) to find the best available gift.
[] Up to 3 independent profiles with separate recipients and limits.
[] Notifications for successful purchases and completed tasks.
[] Fully interactive control panel inside Telegram.
[] Purchase counter with automatic stop when limit is reached.
[] Balance top-up and refund via Telegram Stars.
[] Balance top-up from any account.
[] Test the bot with a 15-star gift purchase.
[] Access the full catalog and buy specific gifts in custom quantities.- One-command refund of all stars from the bot.
- Clone the repository:
git clone https://github.com/leozizu/TelegramGiftsBot.git
- Install the dependencies:
pip install -r requirements.txt
- Create the .env file in the project root:
This file stores environment variables.
Example:
TELEGRAM_BOT_TOKEN="123456:abcdefghijklmnopqrstuvwxyz"
TELEGRAM_USER_ID="123456789"
- TELEGRAM_BOT_TOKEN: Your bot token from BotFather
- TELEGRAM_USER_ID: Your Telegram user ID (get it via @userinfobot)
- Run the bot:
python main.py
[] main.py — main entry point
[] requirements.txt — project dependencies
[] .env — environment variables (not committed)
[] config.json — user config (not committed)
[] handlers/ — update handlers (e.g., handlers_main.py, handlers_wizard.py)
[] middlewares/ — access control and update filtering
[] services/ — business logic (balance.py, buy.py, config.py, menu.py, etc.)
[] utils/ — helpers (logging.py, misc.py, mockdata.py, proxy.py)
[] All handlers are in handlers/. Add your own flows by creating new files.
[] Core logic is in services/ for easy testing and reuse.
[] Utilities live in utils/ — safe to extend without breaking core logic.
[] Middlewares are in middlewares/ for custom access control and logging.
View hidden content is available for registered users!