Closed skrewz07 closed 3 years ago
Which programming language is the bot written in?
I'm afraid I'm not entirely sure. Cloudbot is provided by Streamlabs (some info is provided here: https://streamlabs.com/cloudbot), and I don't have access to any of the bot's own code. I can add commands through the Streamlabs dashboard, but this essentially only allows me to specified what text should be returned when a command is triggered.
There is a "{readapi.
I must admit, I do not know much about API servers, so apologies if this is unreasonable!
Ah, ok, yeah, I think it's a bit unreasonable for API consumers not to be able to parse JSON, that's why I was asking about the programming language.
The solution would proabably be to host your own web application at some cheap or free provider, which does a request to Lichess, parses it, and produces custom output. That will also be much more flexible, both in output formats, and any custom logic you might add.
I'm a mod for a lichess streamer who uses Streamlabs' Cloudbot on Twitch, and would like to add a command that could automatically fetch the score of the current match. Unfortunately, the bot cannot parse JSON, and so cannot access any of the data within the crosstable API endpoint. Would it be possible to add some endpoints that return specific values in plaintext? Something like "https://lichess.org/api/crosstable/{user1}/{user2}/matchup/{user1}" to return the score of the first user in the current match as a plain string, and similarly with the other values. That would be greatly appreciated!