Useful Custom APIs

it wasn’t me that wanted it. i was just suggesting that in case that was what he wanted xD

1 Like

Whoops, I’m tired at the moment. Sorry. :stuck_out_tongue:

1 Like

Haha all good, its close to midnight here and i’m still editing my stream, so i get it all too well xD

I would like to if there is a command to show my most Active Followers in like a top 10 list and show how much time they put in on my stream. ive seen it on some streams and still can figure out how they did it

1 Like

That’s not a feature of Nightbot, and will require some other type of bot with support for it. A custom API alone cannot do that, sorry.

1 Like

Can you create me a code for random viewer pick so it could be a raffle system

1 Like

This is already created.

1 Like

Everytime I try to use it . The code never goes through am I suppose to replace something in the link

1 Like
https://apis.rtainc.co/twitchbot/randomviewer?user=USER&capitalization=CAPS

Where USER is the channel name and CAPS can be True or untouched.

And put that into a nightbot customapi:

$(customapi https://apis.rtainc.co/twitchbot/randomviewer?user=USER&capitalization=CAPS)

1 Like

My twitch name is Ecs2sy would you mind doing the link for you it will be much appreciated

1 Like
$(customapi https://apis.rtainc.co/twitchbot/randomviewer?user=ecs2sy&capitalization=CAPS)
2 Likes

Thank you very very much

1 Like

Do you know of any other bot that can do that

1 Like

Out of respect for NightDev I won’t post any here. I’ve sent you a PM with some bots that do, though.

2 Likes

Hello, it seems that the sub length command is not working properly. Could you please give me more insight on how to use it?. I tried but it always gives me an incorrect sub length.
Thanks in advance

1 Like
https://api.rtainc.co/twitch/subbed-since?token=TOKEN&user=USER

To get the sub length of the person doing the command (e.g. !sublength):

https://api.rtainc.co/twitch/subbed-since?token=TOKEN&user=$(user)

To get the sub length of a specified user (e.g. !sublength rtainc):

https://api.rtainc.co/twitch/subbed-since?token=TOKEN&user=$(touser)
2 Likes

Thank you for the answer. But the problem is that the channel that i am using this, i am subbed for almost 11 months and it shows the same answer all the time - 8 months and 2 days. I did exactly the way you instructed me.
Thank you in advance

1 Like

That’s odd. If you PM me the token and your Twitch name, I’ll look into it.

1 Like

How do you use these API’s? Such as https://apis.rtainc.co/twitchbot/following?channel=CHANNEL&user=USER This one meant to return how long a USER has been following the CHANNEL

1 Like

For example (remember to replace CHANNEL with the channel’s name),

!addcom !howlong $(user) has been following for: $(customapi https://apis.rtainc.co/twitchbot/following?channel=CHANNEL&user=$(user))

Then you can use the command…

rtainc: !howlong
Nightbot: rtainc has been following for: 1 month, 3 days
1 Like