Telegram bot for selling stars — major update
What was before the update:
The bot allowed selection only from a fixed set of ready-made star packages — 15 options divided into two pages with pagination (13, 21, 26, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 1000, 10000 stars). Each package had a manually set price without any pricing logic. There was no user profile at all. There was no referral system. Reviews were published only if the user left them themselves. Payment was accepted by card and TON. The database stored only user_id and reviews without any statistics.
What has changed:
The pricing system has been completely redesigned — a tiered model has been introduced: the price per star automatically decreases as the quantity increases. Instead of 15 fixed packages, there are now 4 quick options and free input from 50 to 100,000 stars with automatic cost calculation and a confirmation screen before payment. Pagination has been removed as unnecessary.
A full user profile has been added with purchase history: total number of stars purchased, total top-ups in hryvnias, referral balance.
A referral system has been implemented: each user receives a unique link, and for each purchase made by a referral, 1% of the purchased stars is credited to the referral balance. The balance can be withdrawn through a request to the administrator.
The review system has been automated: if the user does not leave a review within an hour after purchase, an anonymous entry is automatically published in the channel. This allows maintaining the activity of the review channel without user participation. A separate type of review has been added for displaying referral stars.
TON payment has been removed, the process simplified — now only card payment with the submission of a screenshot of the receipt.
The database has been expanded: fields username, full_name, total_stars, total_uah, referral_balance, referred_by have been added. Automatic migration of existing users has been set up upon launch.
Stack: Python, aiogram 3, SQLite, FSM for multi-step dialogues.
The bot allowed selection only from a fixed set of ready-made star packages — 15 options divided into two pages with pagination (13, 21, 26, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 1000, 10000 stars). Each package had a manually set price without any pricing logic. There was no user profile at all. There was no referral system. Reviews were published only if the user left them themselves. Payment was accepted by card and TON. The database stored only user_id and reviews without any statistics.
What has changed:
The pricing system has been completely redesigned — a tiered model has been introduced: the price per star automatically decreases as the quantity increases. Instead of 15 fixed packages, there are now 4 quick options and free input from 50 to 100,000 stars with automatic cost calculation and a confirmation screen before payment. Pagination has been removed as unnecessary.
A full user profile has been added with purchase history: total number of stars purchased, total top-ups in hryvnias, referral balance.
A referral system has been implemented: each user receives a unique link, and for each purchase made by a referral, 1% of the purchased stars is credited to the referral balance. The balance can be withdrawn through a request to the administrator.
The review system has been automated: if the user does not leave a review within an hour after purchase, an anonymous entry is automatically published in the channel. This allows maintaining the activity of the review channel without user participation. A separate type of review has been added for displaying referral stars.
TON payment has been removed, the process simplified — now only card payment with the submission of a screenshot of the receipt.
The database has been expanded: fields username, full_name, total_stars, total_uah, referral_balance, referred_by have been added. Automatic migration of existing users has been set up upon launch.
Stack: Python, aiogram 3, SQLite, FSM for multi-step dialogues.