By clicking “ACCEPT ALL COOKIES”, you agree LTD FIVEWALLS site can store cookies on your device and disclose information in accordance with our Cookie Policy.
Riot Games

Slack Bot

Clientclient logo
IndustriesEntertainment
Date2020 - Currently

Riot Games was founded in 2006 to develop, publish, and support the most player-focused games in the world. In 2009, they released their debut title, League of Legends, to worldwide acclaim. League has gone on to be the most-played PC game in the world and a key driver of the explosive growth of esports.

As League enters its second decade, they’re continuing to evolve the game while delivering new experiences to players with Teamfight Tactics, Legends of Runeterra, VALORANT, League of Legends: Wild Rift, and multiple work-in-progress titles. They’re also expanding the world of Runeterra through multimedia projects across music, comic books, board games, and the upcoming animated series Arcane.

The challenge

Riot Games faced a problem that some slack channels get unproductive at times. From hot takes during live shows to leading questions that don't have a satisfying answer, sometimes these places get a little bit toxic.

They tried to solve this problem by using guidelines on Riotnet. Those have helped, but unproductive conversations were still around, and our client decided to come up with something new. Suggested guidance has proven helpful, but perhaps making it easier to follow that guidance would be helpful.

There is also another problem - some people don't like asking questions in the channel because they don't want to get criticized by other people. Many of these folks are wary of attaching their name publicly to their questions.

The solution

A Slackbot that streamlines the whole process

In order to fulfill the initially requested solution, we decided to include two applications created with Node.js. One - for the Slack bot and the other - for gathering information and analytics (let's call it the analysis app). For the Slack bot, we used Bolt Slack SDK because it's built on node-slack-sdk and has good support of both Node.js and Typescript. As the client's request was to put all collected information into a spreadsheet, we used Node.js in association with Google Spreadsheets API for the analysis app. Of course, both applications - the bot and the analysis app were created using Typescript to provide scalability and code clearness. To make the final solution easy to setup-and-deploy we decided to implement a serverless architecture. Suchwise, we used Firebase Functions for deployment and hosting. When everything was almost finished up and ready to use, 2 problems revealed:

  • Google Spreadsheets API only allows 100 requests per 100 seconds on a free basis. Our application was to track reactions so it might overwhelm this limitation at times a new question was posted.
  • Firebase Function warmup time might be up to 3-5 seconds. This means that if the application was not used for a couple of minutes, Function would shut down and have a 3-5 seconds delay each time it is called again. We could set the shutdown time to be long, but there was no way to setup Function so it never stops.

    To resolve the first problem, we created a helper Function and made it scheduled. Now, we were putting all reactions information to Firestore which has no request per time limitation. It helped to keep data persistence. And our scheduled helper Function was syncing Firestore with Spreadsheet with only a single request per 2 minutes. The first issue was resolved. To deal with the second one, we used the same helper scheduled Function - it was sending an empty request to the main Function every two minutes. And set the main Function to postpone shutdown for 2 minutes 30 seconds. This way the main Function never shuts down.

The done

By taking control over the channel Bot brought structure and order to conversations flow. All questions were now detached from each other allowing users to have discussions in threads. In other words, a Slack channel with the Bot app became a simple version of a web forum. Allowing to post a question with its context and stay anonymous if willed. Every hot discussion now has a separate discussion thread, which does not let multiple questions interfere with each other. At the same time, the Bot app helped to automate reports and statistic gathering. Thus, it is collecting:

  • all the questions and their contexts + a number of questions in total (and a number of unique question-askers);
  • time and date of the question;
  • the geographical location of each question;
  • whether question asker wanted to stay anonymous or not;
  • if the question is still relevant (or was removed);
  • a link which opens the question in slack chat - so the reporter could easily find the question in a channel;
  • as an analytics part, the Bot app tracks a number of upvotes ("+1" or "thumbs up" reactions) and a number of unique reactions for each question, which helps evaluate a current interest in a question.

    All the gathered analytics are synced to the Google Sheets, allowing the client to access all information from one place in a user-friendly form.
Next Case

NEXTUP by Appfire

Jira to Slack/MS Teams integration