Omg! Thanks so much this is absolutely incredible because users in my channel have been dying to figure out for months on how to know how long they have been following for due to the rules in my chat to become moderator they must be following for x amount of months before they can become a moderator. So this has been extremely helpful. Thank you!!
No worries, glad it helped!
Hi,
The URL for getting a random subscriber username seems to always answer with an empty string (https://apis.rtainc.co/twitchbot/randomsub?token=TOKEN). I have tried the other feature related to subscribers (/subbed, to know for how long someone has been a subscriber) and the token I used is working. So is this API feature still working?
You need the token of a partnered streamer on twitch. Subscribing isnāt the same as following on twitch.
I know, as I said I have tried /subbed with a token and that worked, I was implying that it returned what was expected and thus that I am testing it with a token from a partnered stream. The same token does not work for /randomsub (it always returns an empty string).
Iāve actually just written my own version of a randomsub script and I could get it to work so there is definitely something wrong with hereā¦
It works! Thanks for the quick fix. Thereās just a PHP notice when the token isnāt valid, specified or if the channel isnāt partnered (most likely itās just about handling the Twitch API response that has an error property set), but it shouldnāt be an issue for this use senario. For reference hereās the notice:
Notice: Undefined index: message in /home/rtainc/www/api.rtainc.co/twitch/random-sub.php on line 4
Could I ask you which RNG function you are using for the random drawing? When Iāve coded a similar feature Iāve noticed that it wasnāt giving me that of a random drawing with array_rand (in the case of a quick succession of drawingsā¦ as Iāve added the ability to have more than 1 drawing to be done at the same time), so Iāve used mt_rand and coded my own simple mt_rand_array in the end.
Again, thanks for your reactivity
For https://apis.rtainc.co/twitchbot/following?channel=CHANNEL&user=USER how can I make it to output Years, Months, Weeks, Days, & Seconds? Not just
As far as I know there is only one output format for the following command. Unless another gets added, then your out of luck. Youāre more than welcome to create your own customapi.
Edit: Scroll down for updated command.
Iām looking for like "Animatedpanda has been following Channel for 1 year, 4 Months, 6 days.
You can append how many units of time you want to the new URL -
GET https://api.rtainc.co/twitch/followed-since?channel=kdwolf77&user=rtainc&units=6
5 months, 3 weeks, 2 days, 4 hours, 8 minutes, 53 seconds
Fixed!
By default it uses array_rand
but you may now specify &method=mt_rand
if you prefer its results.
Very nice addition! Thank you.
@rtainc hey man can you make an API command to read āSOLO MMRā or āHero winrateā for DOTA (Defense of the ancients) from this website? dotabuff.com/players/114827878 ā¦ if you already have something like this, please share
Thanks for the suggestion! Unfortunately Dotabuff doesnāt provide any type of API, and I do not have any knowledge on how DotA stats are stored, so I am (at current) unable to do so. If you do end up finding any type of DotA Stats site with links to an API, Iāll be happy to implement it for a Nightbot command.
Just read your message. Thank you so much. Exactly what I was looking for.
Hi can anyone please make a customapi to make nightbot answer like clever bot like !addcom nightbot $(customapi $(query)) so you could say Nightbot hello and nightbot would respond based on what you said if someone could do this I will be in debt to them forever
I mean you could use:
and make the responses yourself.
I have no idea what Cleverbot does or says. So this is the best I can offer.
Thanks Iāll try clever bot is like an ai that replies to you based on what you said
Itās not what Iām looking for but thanks!