An automated Telegram bot for monetizing digital products, providing a full order processing cycle - from balance replenishment to product delivery.
The project is designed to automate sales within Telegram without the need for a separate web interface.
The bot supports payments via Telegram Stars and CryptoBot, as well as product management, promo codes, and user management.
The project's key visual goal is to use only the built - in keyboard for navigation and interaction, minimizing chat clutter and eliminating unnecessary messages. The interface is structured to keep communication clear, manageable, and as compact as possible, ensuring a smooth user experience without overwhelming the conversation history.
- Digital product sales;
- Automatic delivery after payment;
- Database data storage;
- Multi-language support (RU / EN);
- Product Management;
- User Management;
- Payment Control;
- View Statistics;
- Promo Code Creation;
- Activation Limit;
- Telegram Stars;
- CryptoBot;
- Bulk messaging to users;
- Text/media/text formatting support;
- Node.js;
- Grammy — Telegram Bot API framework;
- Prisma — ORM;
- MySql;
- Docker;
- Docker Compose;
- Telegram Stars;
- CryptoBot API;
- Pino;
git clone https://github.com/Frolov3/TelegramShop.git
cd TelegramShop
- Create a file named
.envin the root of your project. - Copy the contents of
.example.envinto it. - Fill in the variable values.
BOT_TOKEN="your_bot_token"
ADMIN_LIST=781277112,7261241736
CRYPTO_BOT_API="your_crypto_bot_token"
ADMIN_LINK="https://t.me/username"
LOG_CHANNEL_ID=-1098667344118
BUTTON_SYMBOL=ᅠ ᅠ
DB_HOST=db
DB_USER=root
DB_PASSWORD=password
DB_DATABASE=tgshop
DATABASE_URL="mysql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:3306/${DB_DATABASE}"docker compose up --build
To enable chat logging and mandatory subscription verification, you need to add the bot to the relevant chat or channel and grant it administrator rights.
- Open the desired chat or channel in Telegram.
- Go to Chat/Channel Management.
- Open the Administrators section.
- Click Add Administrator.
- Select your bot and grant it the necessary rights.
In order for the bot to verify whether a user is subscribed to the channel, it must be granted the following rights:
| Required permission | What it does |
|---|---|
| Change channel info | Verify mandatory subscription |
| Manage messages | Log messages |
The bot must be an administrator in the chat or channel.
Without the necessary permissions, the functions may not work correctly or may be completely unavailable.
Additionally, for premium emojis to display correctly, the bot owner must have a Telegram Premium subscription.
