Longevity commands?

I currently use both the UltimateTwitchBot (for the currency system and Trivia) and Nightbot (for everything else really).

As much as I absolutely love UTB’s Trivia game (I haven’t seen it in any other bot, and I already have about 70 questions on my Trivia) and having my own personal bot with a name chosen by me (which I’ll miss, 'cause she’s part of my brand now) I am considering maybe stop using the UTB and moving to another currency system bot, that would give the viewers extra benefits. Because, regardless of my own personal preferences, I always try to put my viewers first and find ways to improve their experience.

However, the UTB has 2 neat commands that come in handy sometimes: a command that tells you how old your channel is (“Minakie has been sharing Stars for 3 years, 11 months and 29 days.”) and a command that let’s you know how long someone has been following you for (“BananaClause followed Minakie on 01-09-2016 11:11:36”). So, I was wondering if there’s any way I can replicate these 2 commands behavior using just Nightbot (which, by the way, has one of the most diverse commands system and variables I have ever found, kuddos to the creator for the amazingly impressive job).

I’m guessing I could somehow use the CountUp variable to set up a command that tells me how old my own channel is, but is there a way to have Nightbot tell me how long someone has been following me for?
edit: Never mind the CountUp, I just used the “$(twitch $(touser) “{{createdLength}}”)” and now I can check anyone’s age. Remember I said how awesome Nightbot’s variables are? Yep, I’m calling it. They’re AWESOME <3

Yes, you can replicate those commands with Nightbot by making use of the $(twitch) variable and custom api’s

This can be achieved using the built-in $(twitch) variable:
!commands add !channelage Minakie has been sharing Stars for $(twitch Minakie "{{createdLength}}")

This will return the date a viewer a viewer followed you:
!commands add !followsince $(urlfetch https://2g.be/twitch/following.php?user=$(touser)&channel=Minakie)

Alternatively, you could use this which will return how long a viewer has been following you:
!commands add !followage $(urlfetch https://api.rtainc.co/twitch/channels/Minakie/followers/$(touser)?format=[1]+has+been+following+[0]+for+[2])

You can find out more about using custom api’s here and here :+1:
Hope this helped!

2 Likes

Thanks a lot, I completely missed those. There’s so many things you can do with Nightbot’s variables that it’s hard for me to keep track of it all sometimes. :yum:

1 Like

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