Given the activity in TON and the increasing popularity of Jetton tokens, as well as the necessity for access control in projects, I suggest developing a universal Telegram bot for controlling access to private chats based on the presence of NFT and/or Jetton tokens.
Context
Many projects require an efficient mechanism for managing access to private chats. Existing solutions are either outdated or fail to provide the necessary functionality and user convenience. For instance, in this bot, the main version of the Aiogram library for interacting with the Telegram Bot API is set to version 2, which will no longer be supported. It is proposed to create a bot that will support NFTs and Jetton tokens, as well as provide the ability to configure the minimum number of tokens required for access.
Difference between the current and the new version of the bot
1. Updated Libraries
Old Version: Utilizes an outdated version of the aiogram library (version 2), which is no longer supported.
New Version: Uses version 3+ of the aiogram library, which is up-to-date and supported.
2. Optimized TONAPI Requests
Old Version: Performs requests to extract data about holders upon each user request to join chats, which consumes a lot of time and burdens TONAPI, especially with a large number of simultaneous requests.
New Version: Data extract of holders has been separated into a distinct task and is saved in the database. This accelerates the user approval process, reduces the load on TONAPI, and ensures sufficient functionality of the free plan.
3. NFT and/or Jetton Token Support
New Version: Allows adding multiple collections of NFTs and/or Jetton tokens for access to chats, with specifying a minimum quantity for approval.
4. Enhanced TON Connect
New Version: Includes the aiogram-tonconnect library for more convenient and aesthetically pleasing interaction with users.
5. Added Broadcasting
New Version: Incorporates broadcasting functionality and delayed news broadcasting to all users.
6. Multilingual Support
New Version: Supports multiple languages, improving the user experience. By default, Russian and English languages are available. Easily expandable through editing the texts file.
7. Numerous Other Enhancements
New Version: Features notifications for user exclusions, token purchase proposals with purchase links in buttons, automatic generation of invitation links to chats by the bot, and other functional improvements.
8. Admin Panel
Old Version: Has an inconvenient admin panel.
New Version: Each control element is separated into individual sections with navigational capabilities between them, and lists of elements have pagination.
9. Beautiful Interface
New Version: Adds banners images, and text formatting, making the interface more visually appealing.
10. Docker Wrapper
New Version: Wraps the entire bot in Docker containers, facilitating project deployment using the virtual environment configuration file .env and a few commands.
I'm almost finished with this bot. I need to conduct more tests and verify the completeness of the setup and launch instructions:
Summary
Given the activity in TON and the increasing popularity of Jetton tokens, as well as the necessity for access control in projects, I suggest developing a universal Telegram bot for controlling access to private chats based on the presence of NFT and/or Jetton tokens.
Context
Many projects require an efficient mechanism for managing access to private chats. Existing solutions are either outdated or fail to provide the necessary functionality and user convenience. For instance, in this bot, the main version of the Aiogram library for interacting with the Telegram Bot API is set to version 2, which will no longer be supported. It is proposed to create a bot that will support NFTs and Jetton tokens, as well as provide the ability to configure the minimum number of tokens required for access.
Difference between the current and the new version of the bot
1. Updated Libraries
aiogram
library (version 2), which is no longer supported.aiogram
library, which is up-to-date and supported.2. Optimized TONAPI Requests
3. NFT and/or Jetton Token Support
4. Enhanced TON Connect
aiogram-tonconnect
library for more convenient and aesthetically pleasing interaction with users.5. Added Broadcasting
6. Multilingual Support
texts
file.7. Numerous Other Enhancements
8. Admin Panel
9. Beautiful Interface
10. Docker Wrapper
.env
and a few commands.I'm almost finished with this bot. I need to conduct more tests and verify the completeness of the setup and launch instructions:
References
https://github.com/AndreyBurnosov/Access_control_bot
Estimate suggested reward