📜 ⬆️ ⬇️

How we arranged the quest in the Telegram, and what came of it. UPD: we have summed up the competition

Hi, Giktayms! In the past year, we launched one piece, which we liked, and we are going to continue. We are talking about our channel and bot in Telegram, and the competition that we are launching today for you. But about everything in order: the whole story began half a year ago, at the beginning of the summer, and let's begin with this.


So, somewhere in June, we sat down to discuss what we want to do at Igromir. We had 90 meters of space, 4 focal models of gaming headsets, a go-go girls team, a new keyboard, the legendary captain of CS Daniel “Zeus” Teslenko , 12 boxes of prizes and an infinite number of bracelets of all sorts and colors, as well as an overclocker and stand with xbox. Not that it was the necessary reserve for Igromir, but since I began to prepare for the largest gaming exhibition in the country, it is difficult to stop ... What we didn’t have is a quiet, quiet place where we could talk with "advanced" or "Adult" users who are interested in our products, who want to learn more about the technological features, but are lost in the general noise and din.

UPD: We summed up the competition! Who has won? Read at the end of the post.

And then we understood: "We need a Telegram programmer." We proceeded from the fact that Telegram is currently more popular in geeky environments that are interested in games and hardware, and these people are slightly older than the average age of Igromir visitors. The idea was to organize for our most active fans a special gaming experience that could be obtained on the court, having completed a number of tasks, both off-line (finding something on the stand) and in the messenger, having received tasks within Telegram. We also really wanted to add cosplayers to the story (because “I didn’t take a picture with cosplayer, consider that I wasn’t at Igromir”) and social network (to increase the number of audience covered).
')

With this introduction, the overall picture has become more or less clear. We found four magnificent cosplay-girls, each of which symbolized one of the HyperX headsets released in 2016. At the first stage of the quest, we had to collect all the new items, namely, find them at the exhibition, take a picture, and then go on to interact with the bot, who will issue a series of tasks.

Said - does not mean done. Surely, according to many who are not familiar with the development, creating a bot in Telegram looks like this.


In fact, everything is a little more complicated. Yes, Telegram itself with its API is a frontend, but the backend must be written. First, we planned to do on their own. We read several guides, studied the possibilities of shareware services in which you can make bots. But in the end it was decided that it would be better to entrust this work to professionals, since they themselves would have spent a lot of time and effort on this, besides, we are guided by the principle that everyone should do his own business.

We sent requests to several companies and independent freelance developers. Half of the experts could not predict the timing and cost. However, everyone knows what it is to work with freelancers. As a result, during our searches, the company IQBot was found, which was able to adequately assess the time, cost of work and put possible costs for hosting and support there. For all the work, we have compiled a technical assignment, discussed the deadlines once again and launched everything into the development.

Development


We needed not just to do a “talk” on Bot API 2.0, for the competition we also needed a database for registering participants and results, a queue for high loads and cloud hosting for all of this. IQBot had already worked out solutions, so they used them: they took the free MariaDB (advanced fork of MySQL) as a base, they organized a queue for the bot through RabbitMQ, which is popular for such purposes, and casual heroku.com acted as a hosting service . With the first two solutions, everything is clear: these are free products, besides, they have long been run in Spark with messengers and even Telegram bots. But the Heroku cloud is a good hosting if you need high power for a short time. They have plans with daily billing and flexible paid regulation of system performance - so the work of the same bot with the backend for a week can cost a lot of ridiculous money. IQBot prudently chose a flexible tariff on the hosting, which allowed us to dynamically change the performance - this saved us at the moment of the high popularity of the quest and, as a result, the high load on the backend, since we were able to quickly increase the capacity of the server.

Since the creation of a bot was more associated with the development of the backend, the PHP language was chosen, a popular Python bot would complicate communication with the database and the queue.

The final algorithm of the bot was:

  1. The user connects and sends the link.
  2. The system registers its Telegram-name in the database, saves the link and sends a message with thanks for participation (the HyperX Cloud Stinger headset was then played out among all the participants).
  3. After that, the user is offered to play a blitz quiz and with the correct answers to all the questions it was possible to immediately receive prizes at Igromir.
  4. After 3 days of competition, the bot closes the reception of works, and sends the thanks and the name of the winner to all registered participants.
  5. After the winner is announced, the bot becomes a stub with a promotional message.


Start


A couple of days before the start of "Igromir" bot was launched. The final check that everything is working and ... waiting for hour X. On the day of the launch, we had promoters at the stand who offered to take part in the quest. In addition, the information was actively promoted in Kingston groups on social networks, on the @RedHeadPub Telegram channel (and several other friendly channels). As usual, mobile Internet worked very badly on Igromir, high network load often did not allow working in LTE and 3G, at least some traffic with a stable signal could only be driven by EDGE. But Telegram is almost the only instant messenger that functions normally on 2G networks, so our geeks had everything in order (and some even managed to download the instant messenger from the AppStore or Google Play right at the event).


At the idea stage, we underestimated the number of participants in the quest, which is why the hosting capacity at our tariff was no longer sufficient for quickly processing the queue of participants - people began to actively send not only links, but also the photos and screenshots themselves, which created a short-term congestion. Came up to 16 similar messages with images per second. During the exhibition, the developers were on duty at the Heroku system monitor, so the problem was quickly resolved by increasing the hosting performance for RabbitMQ.

The second problem was the interface of Telegram itself. At the very beginning we asked the user “Ready? Steady? ”, And he needed to press the“ Go! ”Button, since our bot was push-button. It seemed to us that this is an obvious and only use case, until users began to type the word “Go” manually in the input field, and in different variations. Of course, the algorithm did not understand what they write to it here. Unfortunately, it is impossible to block the input field in Telegram, since it is still the first messenger. To rewrite and restart the bot was problematic, because people used it and restart would break many quest.


Therefore, our crutch was the most tangible: the promo-girls came back to the rescue, which the users turned to for help. But for the future we will remember that we need to think through what the user can write in the text field and, therefore, it is necessary to do the processing of the data. And also the fact that so far robots cannot exist without humans, only in close symbiosis.


During the work on the competition, we found out several obvious things:

1. The user will always find a way to hang a fault-tolerant system. In our case, the graphic files clogged the queue that was created for short text messages. Therefore, you should always leave a substantial margin of performance on the hosting with the possibility of quick configuration. Never do it all right.

2. It is necessary to do a test bot, not only by people who invented and developed the mechanics, but also strangers with the quest, to check for scenarios of behavior that are not obvious to us.

Now the @HyperX_bot bot continues its work with a stub message, however, we have already disabled the base and the queue until the next time. During the exhibition, we received 5658 messages from 846 users. What is interesting, although “Igromir” is considered an event for a young audience, the average age of our participants was 24-26 years, which confirms our hypothesis about the audience.

In parallel, we launched a channel in Telegram - @RedHeadPub , in which we had a live broadcast of everything that was happening on the stand at the exhibition. And our subscribers could always find out if they are currently pouring memory dies on liquid nitrogen or Zeus is signing autographs. Initially, all activities in Telegram had a design basis, and were planned only for the period of the exhibition (and a couple of weeks around). But during the work on “Igromir” more than 1,500 people subscribed to our channel, so we decided not to drop it, but to convert it into a certain GeekTimes branch of the Kingston Technology blog. To begin with, we expanded the channel's theme from games in particular to technologies in general and renamed it Red Head Pub (do you know the story , why is there a red head Rex on the logo?). Now there are announcements of new products and promotions, promo codes for discounts, as well as various technological news, prize drawings and much more. Come and see for yourself: @HyperX_Russia (pst-pst, we even released our sticker!).

Competition


And now the most important thing! We liked working with the bot in Telegram, so we plan to continue using it, but now we decided to seek advice from the community. So, we need your ideas that can be implemented in a bot. For example, to organize in it a support service or use it for drawing in the channel. But it could be some kind of quest or another game, answers to frequently asked questions or something completely different, but interesting.



Think and write in the comments to this material all your ideas, and be sure to subscribe to our blog on Geektimes. January 16 (yes, you can think all New Year holidays) among those who subscribe to our blog, we will select the most interesting ideas and put them to vote in our channel in Telegram. And on January 20, we will summarize the results, and the one whose work will gain the most votes will be awarded with a HyperX Savage SSD drive of 240 GB. This is the fastest solid-state SATA-drive with 4-core and 8-channel Phison S10 controller, which provides reading speeds up to 560 MB / s. It can be installed in most laptops, PCs and even home theaters.

And don't forget to subscribe to our @RedHeadPub in Telegram .



After a long discussion, a short list of finalists was compiled:

1) The bot directory that owns all the information on Kingston / HyperX products, and will share it with you upon request. Will acquaint with the product of interest, its characteristics, and share links to reviews. (author of the streetflush idea)

2) The bot quiz asks questions, and users answer them. Depending on the speed and correctness of the answers, players get points. Who has more points - he won, and received a prize. (author of AVX idea)

3) Bot-engineer. If you doubt the choice of components to your PC, the bot will offer you the best options for assemblies. (author of idea argentum36 )

4) Bot-gamer gives tips to help you succeed in popular games. (author of the stigGGG idea)



On the RedHeadPub channel in Telegram a vote was organized and ...

The bot engineer who was offered by comrade argentum36 won a confident victory. He gets SSD HyperX Savage 240 GB, congratulations! And we already went to plan the implementation of our engineer.

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


All Articles