![](https://webcf.waybackmachine.org/web/20240316181927/https://habrastorage.org/getpro/habr/upload_files/370/c9b/cf0/370c9bcf089683741899ffeed7a27f13.jpg)
Many of us spend time in specialized telegram groups. The power over communication here belongs to random people with their own shortcomings. Conflict and abuse occurs regularly. Is there another way to keep order so that scam spam doesn't flourish and no one has total control over group members?
In my case, these thoughts led to the development and testing of a system that can be connected to your Telegram today.
First of all, you need to determine what is the key aspect, the currency of the system. Not karma and not points, not likes and not a rating. Time itself became it. What follows from this?
Each user accumulates time from the moment of writing the first message. This is analogous to the unconditional basic income. Minute by minute, hour by hour. It is important that the issuance of the systemic currency takes place without abuse, independent of any control centers.
Absolutely everyone can use part of the accumulated time to ban another user in the chat for this time. This is an electronic analogue of the second amendment, which is needed so that power is not concentrated in a group in the same hands.
Everyone can also use the accumulated time to unlock another user. This protects against abuse by banhammers. At the same time, this function is a reverse emission process. The time spent on the ransom from the ban is irretrievably wasted.
The accumulated time can be transferred to other people in whole or in parts. Ultimately, this feature provides related groups with a free marketplace to exchange whatever they want.
So, how it works in theory is understandable, but what is needed for the practical functioning of such a system?
An easy way to connect the chat to the system.
Implemented as a botThe most user-friendly UX for Telegram teams
There is speech recognition based on normalized semantic representations
What about examples?
The bot understands free-form English in requests. Abbreviations are used: d - days, h - hours, m - minutes, s - seconds. All notifications are public and disappear after 15 seconds.
![Here's how to find out how much time has accumulated Here's how to find out how much time has accumulated](https://webcf.waybackmachine.org/web/20240316181927/https://habrastorage.org/getpro/habr/upload_files/ccc/17c/130/ccc17c1305eea96a8946c90777d5927b.jpg)
![You can ban another person or spammer by telling him how long he will be banned (and possibly a reason) You can ban another person or spammer by telling him how long he will be banned (and possibly a reason)](https://webcf.waybackmachine.org/web/20240316181927/https://habrastorage.org/getpro/habr/upload_files/a01/48e/31a/a0148e31a3917f75c0ba6e8668c3bd9b.jpg)
![If this is a misunderstanding, you can simply write in the answer that the person needs to be unblocked If this is a misunderstanding, you can simply write in the answer that the person needs to be unblocked](https://webcf.waybackmachine.org/web/20240316181927/https://habrastorage.org/getpro/habr/upload_files/25e/312/206/25e312206ec759371c7a9ad6e1a4cc80.jpg)
![To transfer time to another user, indicate in the answer how much time you need to transfer To transfer time to another user, indicate in the answer how much time you need to transfer](https://webcf.waybackmachine.org/web/20240316181927/https://habrastorage.org/getpro/habr/upload_files/e0b/6c3/f39/e0b6c3f39eea3831840d134471510e57.jpg)
Talk is cheap. Show me the code!
The Kotlin language is used on the server side, and the Redis cluster is used for the database. All code is documented and available on GitHub: demidko/timecobot
To start using the bot in your telegram group, just add it as administrator: @timecobot
Write your opinion in the comments, is it necessary for the it-community and is it worth developing the system further? What can be improved or changed? Are you interested in a detailed article with code on how this is implemented internally?
Have a nice day, everyone!
View comments on Hacker News