This Twitch Chat Bot provides an information about TBC Arena Leaderboard, Realm Status, etc. Bot uses Blizzard WOW API.
Bot is in development so some functionality will be added later.
- Discord (not added yet)
- Twitch API
- World of Warcraft API
- OpenSSL 1.1.1L
- Rapidjson 1.1.0
- Boost.Asio 1.72.0
- Clone https://github.com/Roout/chatterfinity.git
- Create
secret/services.json
file - Build Project with CMake 3.12 or higher
- The example of the services-example.json is provided.
- You can get
client_id
andsecret
in Twitch Developer Console and Blizzard Developer Console. - Secret is required only for Blizzard Client Credential Flow and MUST NOT be disclosed to any 3rd party.
- You can get Twitch
token
running local server and opening it in browser at http://localhost:3000. More information is provided at the page of the twitch-token generator.
Commands can be invoked within either Console either Twitch chat. Chat messages can be russian.
Commands which have already been implemented are quite crude without any customization and flexibility because they are used to test core of the bot now.
Bot sends messages in the chat using PRIVMSG IRC command.
Bot supports UTF8 charset:
- Windows (can not print characters which required more than 2 code units (bytes) for encoding)
- Linux (should work even with encoding which uses 4 code units (bytes))
For now you can invoke the following custom commands within channel chat:
Name | Params | Description |
---|---|---|
!realm-status |
Show flamegor server status and queue information | |
!arena |
Show current top 1 of the EU region | |
!arena |
-player "nick" | Show team name, rank, rating of the given player |
You also can call alias within chat. But you can add alias only within console
# call already added beforehand alias
!exodus
# the output for alias above will be equal to output of the following arena command
!arena -player "Шаркии"
For now you can invoke the following custom commands within console:
Name | Params | Description |
---|---|---|
!realm-status |
Show flamegor server status and queue information to console only |
|
!realm-id |
Show flamegor server id to console only | |
!arena |
Show current top 1 EU to console only | |
!login |
Login to the irc.chat.twitch.tv:6697 |
|
!join |
-channel "chatroom" | Join the chatroom |
!chat |
-channel "chatroom" -message "message" | Send message to provided chat (message in "") |
!leave |
-channel "chatroom" | Leave a chatroom |
!pong |
Send pong to the irc.chat.twitch.tv:6697 |
|
!validate |
Validate the current twitch token | |
!alias |
-alias "alias_name" -command "command" -k1 v1 -k2 v2 ... (other params) |
Add alias |
Alias can be added only within console.
# add alias for displaying arena team data
!alias -alias exodus -command arena -player "Шаркии"
# call alias within console or within twitch chat
!exodus
# the output for alias above will be equal to output of the following arena command
!arena -player "Шаркии"
Aliases are being saved in alias.txt with executable. So they can be saved/soaded between sessions. You also can add alias manually there. But this may lead to errors e.g., coincidence of alias name and existing command name. If you do the same within console it won't add such alias.
Not implemented:
- remove alias
- print existing aliases
- choose creature for user (customized !dice roll)
- arena leaderboard:
- top 1 team of the provided realm
- top 1 team of the provided region
- rating for the team by player name from EU regin
- win-lose statistics for the team by player name
- auction (don't know whether it will be usefull)
Arena leaderboard is one of the most interesting thing for WOW community so it will be the most important part of the bot.
There are several very imporatant restriction on the communication in twitch chat. They depend on MODE and Bot authority. Bot doesn't consider some twitch restrictions yet.
NOT implemented yet:
- Minimum 1 second delay between messages via IRC connection. For slow mode it can be greater.
- Authority e.g., subscriber mode, etc
ALREADY implemented:
- Rate Limit is used for PRIVMSG, JOIN, PASS.
Only 2 buckets with the strictest restrictions supported now: general bucket(JOIN, PASS), channel bucket(PRIVMSG). Buckets doesn't take into account users authority and assuming this is simple account. Now you're neither moderator neither subscriber. Authority support is not implemented. Buckets doesn't take into account bans, slowmodes, etc. These features will be implemented later.
If IRC or HTTPS connection fails to connect/read/write it will try to reconnect 3 times with 2s, 4s, 8s timeouts.
The following certificates are downloaded for application to be able to work with several APIs. They are used by application when connection is trying to complete a handshake. Connection needs a CA information to verify if the certificate is "valid" or not. Connection uses (loads for SSL Context) root CA to verify a service.
Source: DigiCert list
Root certificate is DigiCert High Assurance EV Root CA;
Used by eu.battle.net (Blizzard Auth)
Source: DigiCert list
Root certificate is DigiCert Global Root CA
Used by eu.api.blizzard.com (Blizzard API)
Source: Amazon CA Distinguished Name:
CN=Starfield Services Root Certificate Authority - G2,
O=Starfield Technologies, Inc.,
L=Scottsdale,
ST=Arizona,
C=US