New !followage command

I have already posted this in a comment on another thread about the followage command not working but figured it should have its own post that is easier to find.

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 follower information (who is following you, how long they are following, etc).

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/followage/$(channel)/$(touser))

This will respond with the following format:
@viewer has been following @streamer for x years, x months, x days, x hours, x minutes, x seconds.

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/followage/$(channel)/$(touser)?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 wish to change the format of the message you can add a query parameter for the format with the following (in order):

y = years
m = months
w = weeks
d = days
h = hours
i = minutes
s = seconds

Some example formats:

format=ymwdhis (x years, x months, x weeks, x days, x hours, x minutes, x seconds.)
format=md (x months, x days.)

A full example with a custom format and streamer login:

$(urlfetch https://commands.garretcharp.com/twitch/followage/$(channel)/$(touser)?format=md)

And with a moderator login:

$(urlfetch https://commands.garretcharp.com/twitch/followage/$(channel)/$(touser)?moderatorId=<id>&format=md)

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

If you speak a language other than English I would really appreciate some help on adding an option to set the language that the command responds in.

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.

2 Likes

Hello, I am a streamer manager in Korea. When you call a nightbot and try to use the command, only the Error Connecting To Remote Server command appears and is not used. If you look at your writing, it says that you can do it eventually, but you canā€™t try no matter how hard you try. Canā€™t I use it in Korea? Iā€™ve searched Korean communities, but thereā€™s no information

Hey, yes this can be used anywhere there are no restrictions. Can you tell me the channels you are trying to add this in and the command you added?

Is this safe? Can anyone verify? I donā€™t want to just log into some random website with my twitch ID

1 Like

The code is open source if you want to look for yourself or even host it yourself (though it wont be free). The app also only has very basic permissions the only thing it can do is read basic information about your Twitch account basically just your username profile picture anything thatā€™s already public anyways, or it can read data on who follows you or anyone you mod for.

Thank you so much <3

Yo hablo espaƱol aunque deje la programacion hace rato ya T-T

Hey there, thanks for setting this up so quickly. Iā€™ve swapped commands to this since the old command directed me to this page. Is it possible to request an option though? Currently when the command is properly set up and used by chat members, nightbot ALSO pings the streamer. Would be it possible to omit or remove the @mention of streamer as a toggleable option?

So instead of:

@Zillvr has been following @Streamer for x years, x months, x days, x hours, x minutes, x seconds.

we would get:

@Zillvr has been following Streamer for x years, x months, x days, x hours, x minutes, x seconds.

I would greatly appreciate this option. Some streamers like to minimize pings in chat if possible. Thank you for your efforts and your time. Cheers!

I am logged in but i am still constantly getting this message In order to use this API the streamer must login to the application. please help

I can look into adding an option to remove the ping shouldnt be too much of a problem to add

What is your Twitch username? And can you send the full command that you added? @official_snipe

@Zillvr should be able to do this now.

Example command with no pings:
$(urlfetch https://commands.garretcharp.com/twitch/followage/$(channel)/$(touser)?ping=false)

1 Like

I finally had time to implement it and it works wonderfully, thank you so much! You work quick and Iā€™m genuinely grateful that you added it as an option. I appreciate you, cheers!

Hi! I am currently having problems. Wondering if anyone can help me here. :slight_smile: When I do it on my channel it answers ā€˜ā€™ keelllzzz is not following keelllzz.ā€˜ā€™ for all users. And I tried to use it as a moderator for the channel I mod for. I put the one for moderator and logged in on the app, but nighbot answers by ā€˜ā€™ The moderator is not login to this application.ā€˜ā€™. Thank you in advance!

What are the commands you are adding?

For the own channel, it seems likely the issue is using an incorrect variable for the following user lookup.

For the moderator one that is not an error message I send and there are 3 different cases that can happen:

  1. revoked access - this means that you would have revoked the app in your Twitch settings
  2. not logged into the application - this means that there was never a login
  3. not a moderator for the streamer - you are not a moderator for the channel provided in the request

Iā€™d assume the most likely case would be 2, which it is most likely because the moderatorId token provided is not correct.

1 Like

Thank you very much! It was number 2 :slight_smile:

Hi there, we added the new command but Nightbot is returning a Nightbot: Error Connecting To Remote Server when doing the !followage command. Any ideas?

This is an issue on nightbots end and out of my control. If you just retry whenever it happens it should work eventually.

iā€™m confused, twitch reacts to a personā€™s username in chat the same way wether thereā€™s an @ in front of it or notā€¦ how does this help?

ā€œIn order to use this API the streamer must login to the applicationā€

I keep seeing this message even though I authenticated with twitch upon signing into nightbot.

Not sure what to do here. Any help would be appreciated.