Useful Custom APIs

Copy and Paste this without changing anything
!count The follower count for this channel is $(customapi https://api.rtainc.co/twitch/channels/$(channel)/followers/count?format=[1]).

Did it, and it still didnā€™t work

@mye36m3 You forgot to close the parenthesis for customapi.

Try this: The follower count for this channel is $(customapi https://api.rtainc.co/twitch/channels/$(channel)/followers/count?format=[1]).

@mye36m3 Instead of saying that you have done it and itā€™s not working could you possibly provide a screenshot of what is going wrong or say what nightbot is returning when the command is run? Aaronā€™s command and HarleyAliveā€™s commands both work normally.

Okay, thanks!

@mye36m3 Uhā€¦ What? Thatā€™s not it at all. Copy this directly:

!addcom !count The follower count for this channel is $(customapi https://api.rtainc.co/twitch/channels/$(channel)/followers/count?format=[1]).

1 Like

Yeah, sorry I got the wrong one.

1 Like

Can someone help me with this? I put in the new command but still doing something wrong.

1 Like

It looks like you missed out the /count before ?format. Also, you are using ?format=[2], which wonā€™t return anything.

You can either use ?format=[1] which will just return the number of followers the channel has, or remove the ?format=[2] altogether which will return thegrizzlymuffin has x followers.

So either
https://api.rtainc.co/twitch/channels/thegrizzlymuffin/followers/count?format=[1]
or just
https://api.rtainc.co/twitch/channels/thegrizzlymuffin/followers/count
:thumbsup:

2 Likes

Can someone help me by explaining what Iā€™m doing wrong or just giving me a direct nightbot !addcom for the !howlong command as I keep getting invariable. Iā€™ve tried multiple APIs from multiple sites with various implementation styles & donā€™t know if Iā€™m prefacing it wrong or if the APIā€™s bad but Iā€™ve been at this Googling for hours & am tired of failing what I clearly donā€™t understand so Iā€™m hear asking for you help.

!addcom !howlong $(touser) Has Been Following USERNAME On Twitch Since $(customapi http://api.newtimenow.com/follow-length/?channel=USERNAME&user=$(touser))

!addcom !howlong $(touser) Has Been Following CHANNEL On Twitch Since $(https://api.rtainc.co/twitch/followed-since?channel=CHANNEL&user=USERNAME&units=6)

!addcom !howlong $(touser) Has Been Following CHANNEL On Twitch Since $$(customapi https://apis.rtainc.co/twitchbot/following?channel=CHANNEL&user=$(USER))

1 Like

!commands add !howlong $(urlfetch https://api.rtainc.co/twitch/channels/$(channel)/followers/$(touser)?format=[1]+has+been+following+[0]+for+[2])

Copy paste this into your chat, no need to change anything. :thumbsup:

3 Likes

Thanks. I donā€™t know if it worked as Iā€™m still getting an invariable. My problem might just be that I canā€™t check it on m own profile since I canā€™t follow my own profile or check other profiles with it from my profile. Iā€™ll just have to wait until one of my friends gets on. Which is good for now cause my brain is fried from all of this stuff being way above my level of understanding. I appreciate your help though Stoupedog. Thanks again :slight_smile:

2 Likes

No problem, you can actually check other peopleā€™s followage by typing your command followed by the username of someone whoā€™s following you, e.g. !howlong username

1 Like

https://api.rtainc.co/twitch/channels/CHANNEL/viewers/random?format=I+chooseā€¦+%5B0%5D doesnt pick a viewer :S comes back with i chooseā€¦

1 Like

Make sure to replace the capitalized CHANNEL in the url with the name of the channel you want it to select the viewer from.

1 Like

Is there a API to check if website is down?

1 Like

How would it work if the website is down?

1 Like

In the 8ball command, is it possible to make it where a question mark is required for it to give a choice? Or perhaps a question word such as Is, Will, Can, etc. Just curious as it would make the command more restricted so thereā€™s not much spam with the command

1 Like

I meant like this.

With an API I could test if Steam is down or up for example via https://steamstat.us/ and bot would answer me like ā€œSteam is down at the momentā€ for example.

1 Like

If you donā€™t get a response or Nightbot cannot reach it then itā€™s safe to say the site is down or broken.