List of current chatters

Hey I’m wondering if anyone with any knowledge of twitch knows the answer to this. Is there anyway to get a list of all the current chatters in your twitch chat from a link? I know there is a random viewers link but is there any for all? Just wondering if it’s possible so I implement some sort of currency system through nightbot using that list (if it exists). Any help is appreciated. Thanks for your time.

Hey @potatoeaterlove!

Yes there is!

https://tmi.twitch.tv/group/user/CHANNEL/chatters 

It’ll give you a JSON output, if you need further help let me know.

1 Like

Further Question would you know is there any way to get around the 400 character limit of an eval? This would be really useful for what I’m trying to do. Actually it might be immpossible to implement the system I’m trying to make into bigger channels if there’s no way.
It would make sense if this isn’t added to add it so it stays consistent with the urlfetch in my opinion.

You can write JS code in a Pastebin and have it executed.

$(eval 
/*
define the variables you need coming from Nightbot: user, touser, etc.
don't forget $(urlfetch json https://tmi.twitch.tv/group/user/$(channel)/chatters)
then call the extra code:
*/
$(urlfetch https://pastebin.com/raw/XXXXXXXX)
)
1 Like

I’m referring to when $(eval) outputs a response. I know you can use urlfetch but what I specifically need is a way for the eval itself to return a response more than 400 characters. Thanks for the help though.
I need this so I can write to the qoute api all the viewers so I can add the points.

Hmm, you could try to use the SMM API by cropping the output every 400 characters with .slice(0,400)... .slice(400,800) and then sending it all to a last $(urlfetch), not sure if it’d work though, and the output might not be looking clean either.

Draft/example of the whole thing:

$(eval 
/*
define the variables you need coming from Nightbot: user, touser, etc.
don't forget $(urlfetch json https://tmi.twitch.tv/group/user/$(channel)/chatters)
then call the extra code:
*/
$(urlfetch https://pastebin.com/raw/XXXXXXXX)
)

Quick draft of the last line of the Pastebin

let output=text.slice(0,400)+`|`+text.slice(400,800)...+`&i=5&d=1`;

Alias:

$(eval $(urlfetch https://rokbot.xyz/smm.php?msg=$(query).replace("|","`")))

Or you could also try with the Multiple Message API, but remember to replace every space, comma, etc. (any characters that aren’t alphanumeric) by their corresponding URL Encoding value.

1 Like

You can’t alias multiple message with the multiple messages thing. It only aliased the first one also turns out you can only add qoutes up to 400 characters long using the qoute api. So I don’t think it’s really practical to do what I want since it would only work for small chats.

1 Like

Ah, that’s what I was afraid of, I seemed to remember such restriction, but I wasn’t sure anymore because it was a while ago when I encountered the issue.
And that’s too bad, maybe you could still find a solution by redesigning the way data is managed.

1 Like

Thank you so much for your time anyways I’m gonna keep look into this but for now I don’t think it’s really possible.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.