📜 ⬆️ ⬇️

History of one bot

Hello! For the last 4 months I have been busy developing a non-commercial bot for Telegram. Now, from one to four hundred people play it every day, and for me it is a great success. If you are interested in the history of development, then I ask for cat.



Start


A little about the circumstances that pushed me to it. Playing in @godnotbot (by the way, I recommend) I wanted to create my text walker with dungeons and dragons.


Having decided that this would be a textual RPG in a Telegram, I thought about what would be inside this RPG. And inside was a solution that was similar to a suit - random rooms or situations. Click on the button, get a new room. In addition, there were gods who gave various bonuses for prayers and were angry when they left them for another faith. And also, a shop selling all kinds of junk facilitating your path to inevitable death.


With the concept figured out, now it was necessary to do. For development, I chose Python. Why? And why not - there are already a lot of bots written on it, and the language is pleasant.


Outset


As a result, a simple bot with a little more than a dozen rooms was born. The bot itself can now always be found here . The brainchild was shown to all his friends and his story almost ended. The game was saved from oblivion by a sudden thought: it would be nice to show someone else.


From a friend I took a ride VPS, configured the settings, and launched the bot in an infinite loop. After that, he quickly formed a group in VK and wrote a post on Picaba. Without knowing it, as I was explained later, I chose time for the post so well that I caught my entire audience and on the first day 3,000 people came to get acquainted with the bot. It was cool. But then there were problems.


Situation one


Telegram will not allow you to send a lot of messages. But “many” are different for everyone. There are restrictions on messages per minute in private chat, group, on the total number of messages per day, per second in all chats. How it works is accurate and the exact numbers are unknown. Yes, the site has three paragraphs about it, but in fact it all comes down to what there are limits, you can break them, but no one knows what will happen then. Therefore, I set a limit on sending 30 messages per second and all the errors are gone. But during rush hours, users sometimes had to wait for their messages for more than ten seconds.


Posted in support that can not tolerate it. A few days later they said that you need to write to the support of the bots. Support by bots, a few days later, a verdict: live with it, do nothing. We also recommended using inline buttons, but this option did not suit me - then the message history will be lost. As a result, I had to stay at thirty messages per second and stop there.


Situation two


The project was completely open (and remains so still! Here is the source code ) and it played an important role in the development of the project - people began to help: send their ideas, edit the code, draw for the bot. And most importantly, several volunteers have appeared, who have been constantly helping with the bot so far. These are Andrei , Vladislav and Alexey (I would also like to point out Eric , he also always helped me with the bot, though not at the same place as everyone else did (:). And a little later for the whole game my own sticker was drawn ( Thanks to Alexey for this work).


This paragraph, I want to note that if you are not greedy and are not afraid of theft of the code, you can ask for help from your own community and, most likely, they will help you. And if you think that your code is needed by someone, don’t worry, you will gain a larger audience than the people who stole the code from you (although it may be unlucky and everything will go awry, but this means that you’ve turned something off there, or a thief invests a lot of money in clones. But the idea will always be stolen from you).


Plot


Lots of ideas, there are users, the process goes, what's next? Then we think about the transfer of their product to self-sufficiency. Without hesitation, I organized voluntary donations on Yandex.Money and, actually, the bot still lives on this money, and it warms the soul.


In November, the support came in contact, recalling the restrictions on the number of messages and offered to partially remove them, as an exception to the popular bot. Now we can instantly respond bypassing the restrictions (if the Telegram team wishes, it can always return them to us). We removed the queue mode in the code, but later found that the restrictions have not gone away. Support responded that instantly you can only reply with short messages, that is, less than 500 characters. Sadly, the rules are not dictated by us.


And right now, together with the community, we are translating the bot into English. There are over 1,800 phrases, some of which are long and some cannot be simply translated. For example: "FOR VDV!". Now the game is fully translated and is at the editor to correct.


Decoupling


What did I want? Tectic RPG in the telegraph. What did I get? The bot, which every week plays a thousand people, in which time is killed in traffic jams, and 4 months of development with cheerful people, as well as interesting acquaintances. In the meantime, we are preparing for the translation, release of the bot to the web and the introduction of a large-scale multiplayer system (:


What will come of it? Who knows…


If you are interested in this topic, then the next post will describe the problems in the development itself and on the mechanisms of the game (you can ask questions for the next post, if there are any). The bot itself can be found here .


')

Source: https://habr.com/ru/post/317834/


All Articles