Hello there,
I have been working on some features for a twitch mIRC bot and I have come across a problem with the subscription check.
Firstly, I would like to point out that, whereas I know about the TWITCHCLIENT 2 command, I would not like to use it.
I have managed to get an incomplete list of a subscribers (Twitch limits a maximum of 100 entries per page and I have not been able to find out a solution to run the query more than once in the same socket)
And even with this list, when I try to $json($read(datafile.txt), subscriptions, user, %i) I get an error: * Line too long: $replace (line 8, json.mrc)
I am using this as part of the socket to fetch the subscriber's list
hadd %sockname request /kraken/channels/ $+ $mid(%chan,2-) $+ /subscriptions?limit=100
hadd %sockname method GET
And as a result it writes the information to a file that I named datafile.txt. Having them stored locally is just a temporary solution, as I am planning to have them on a MySQL database
So, my questions are:
- 1) How would it be possible to run hadd %sockname request /kraken/channels/ $+ $mid(%chan,2-) $+ /subscriptions?limit=100&offset=0
and then
hadd %sockname request /kraken/channels/ $+ $mid(%chan,2-) $+ /subscriptions?limit=100&offset=100
in the same socket - 2) How would it be possible to read the content from the data file using $json to check if the user is subscribed?
Thank you very much in advance,