New Random Viewer API

Due to some recent changes from Twitch, it is now required that either a streamer or a moderator is logged into an application in order to get chatter information (who is in your chatters list).

You will need to go to https://commands.garretcharp.com/ to login, this page will also have some details about the command which I will also explain here in the post:

The most basic command you can create is the following (Streamer must be the logged in):

$(urlfetch https://commands.garretcharp.com/twitch/chatter/$(channel))

If you are a moderator and want to add the command you would need to use the following command:

$(urlfetch https://commands.garretcharp.com/twitch/chatter/$(channel)?moderatorId=<id>)

Note that <id> will need to be replaced by your Twitch userId which can be found on the page when you login.

If you would like to list multiple chatters you can add a count parameter, the following would list up to 5 random chatters:

$(urlfetch https://commands.garretcharp.com/twitch/chatter/$(channel)?count=5)

Note that all of the commands only respond with the user’s names so a more full example might be:

@$(user) slaps @$(urlfetch https://commands.garretcharp.com/twitch/chatter/$(channel))

The code is also open-sourced if you wish to see how it works you can find it here: garretcharp/commands.garretcharp.com (github.com).

If you get an error from nightbot saying “Error Connecting To Remote Server” this is an issue with nightbot normally retrying the command will eventually work.

3 Likes

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