Skip to content

Chat Bot

neolgu edited this page Dec 20, 2017 · 7 revisions

Description

Describe the structure of the Chatbot and how it works.

1. What is Chat-Bot

Chatbot manages Strimer's chat with games and voting. It can be divided into two main structures. Link chat to game.

2. Chatting (Twitch)

tmijs

Chat is basically using a twitch chat server. Connect to the chat server using tmijs.API. The information you need is a Chatbot account and an account token. Use this information to connect to the chat server. Bot's chatting is basically done by checking the viewer's chatting and responding. Parse the viewer's chat and make the appropriate response (from basic command to voting). At present, it contains only basic instructions.

3. Networking with Game

Chatbot creates a server that connects to the chat server and also enables the connection of games (clients). For connections, use socket.io in nodejs. Check when client (game) is connected and prepare to receive voting information. When the voting information is complete, the chat server is informed of which voting has begun. After voting for a limited time, send the results back to the game. There are two main types of voting : basic voting and key word voting. Basic voting is a popular vote, with options. The game is forwarded to the player with the most votes of the options. Vote keywords are given the word to the client to inform the viewer that the keyword is typed each time.

4. Vote Protocol

Vote Protocol

Clone this wiki locally