The script of the game telegram bot simulation of life
31-07-2024, 02:07
Telegram shop bot
This is an example of a board game rental store with an admin panel, database and payment card in the Telegram messenger, which is written using Aiogram Python.
What can he do?
/start to start. The bot will send a welcome message.
/home. The bot will display the layout of the main menu.
/select. The bot will display some products from the database.
Functions
Choose a game
After clicking on the “Select game” button, the bot will send a limited number of products from the database. Limitation 5. Each product message contains an image of the product, the name, the price per day, the price per week and the deposit amount. Also under the message there are two built-in buttons “Rent the name of the game” for a day and “Rent the name of the game” for a week. Both buttons allow you to add the game to the cart.
Suggest a game
Allows the user to suggest a game. The offer is saved in the database.
Ask a question
Allows the user to ask a question. The question is automatically sent to the admin chat.
Trash
After clicking on the “Basket” button, the bot will send a message with information about the user’s basket and display the basket menu. In this menu, the user can
Delete from the cart, in which, in fact, a certain product is removed from the cart. The user can also place an order.
After that, the user will be able to choose between payment and delivery methods.
The Admin Panel
The administrator should create a new chat in which he should add a bot. The bot will check if the administrator is really the chat administrator, and if so, it will send a message using the admin panel menu.
Available set
After clicking on the “Install available” button, the administrator will be asked to enter the name of the game that will be installed available. After sending a message with the name of the game, the bot will update information about the availability of the product in the database.
“Add a game”
After clicking on the “Add Game” button, the administrator will be asked to enter some information about the new game to add. After following the instructions, the bot will add the game to the database.
“Delete the game”
After clicking the Delete Game button, the administrator will be prompted to enter the name of the game he wants to delete. After that, the game will be deleted from the database.
Payment card
The user can make a payment with a payment card. I used Qiwi p2p for this. It just creates an account and sends the URL to the user. After that, the user must click on the “Verify payment” button. If he has successfully paid the invoice, the order information will be saved in the database and also sent to the administrator.
31-07-2024, 02:07
29-07-2024, 09:11
30-07-2024, 02:01
There are no comments
Information
Users of Visitor are not allowed to comment this publication.