Skip to content

Twitch Bot Integration with Valorant MMR History API. This script integrates a Twitch bot to fetch and present a streamer's recent Matchmaking Rating (MMR) changes in Valorant.

License

Notifications You must be signed in to change notification settings

AhmerGo/ChatBot-API-Webscraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChatBot-API-WebScraper

Sample Output:

image

Twitch Bot Integration with Valorant MMR History This script integrates a Twitch bot to fetch and present a streamer's (in this case, "Draxick") recent Matchmaking Rating (MMR) changes in Valorant.

Overview The bot fetches data from three sources:

Stream Uptime Duration from Twitch ({{uptimeLength}}). Stream Start Date from Twitch ({{uptimeAt}}). MMR History for the player "Draxick" on Valorant from an external API (https://api.henrikdev.xyz/valorant/v1/mmr-history/na/draxick/000). Using this data, the bot evaluates if the streamer is currently live, checks for any errors (like parsing issues or connection problems), and presents the MMR changes in a readable format.

Usage Trigger the bot in Twitch chat with the appropriate command (e.g., !mmr). The bot will then respond with one of the following messages:

A statement that "Draxick is not live" if the stream is not currently running. A summary of Draxick's current Ranked Rating (RR), tier, and the MMR change from the last game. Error messages related to parsing data or connecting to the external server. Code Structure The script starts by checking the stream uptime string to determine if the streamer is live. If live, the start date of the stream is parsed. The MMR history data is fetched and decoded. A series of checks and logic determine the appropriate message to display based on the received data. If any errors occur during these operations (like parsing JSON), the error is captured and displayed in a truncated form for brevity.

About

Twitch Bot Integration with Valorant MMR History API. This script integrates a Twitch bot to fetch and present a streamer's recent Matchmaking Rating (MMR) changes in Valorant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published