Pull to refresh

Telegram bot provides time-based currency

ProgrammingIT StandardsKotlinCommunity managementSocial networks and communities

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 bot

  • The 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
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)
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
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

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

Tags:kotlintelegramredisjvmbottimecobotdemocracy
Hubs: Programming IT Standards Kotlin Community management Social networks and communities
Total votes 6: ↑5 and ↓1 +4
Views6.3K

Popular right now

Разработка приложений на Kotlin
July 7, 202124,900 ₽Нетология
Jira Service Management
July 22, 202113,800 ₽Luxoft Training
UI-дизайнер
June 25, 202147,940 ₽Нетология
Python для работы с данными
June 25, 202131,500 ₽Нетология
Веб-дизайнер
June 28, 202183,000 ₽GeekBrains

Top of the last 24 hours