Advanced command help (countup based)

I have a countup command that I have to change multiple times per stream.There’s also a counter command that I use in conjunction with it. Is there a way that I can combine the two to where when I trigger the counter command it automatically updates the countup time with the exact time that I triggered the counter? They can stay separate if theres a way to still use one to update the other.

The purpose of the countup command is to keep track of the time in between using the counter. Right now I am manually updating the time every time I use the counter.

You can do this using ehsankia’s quote list CustomAPI - read more about it here.

What you do is click this link. It will generate three links and two tokens, a public token (8 characters long) and a private token (16 characters long). The public token is located within the first generated link. The private token is located within both the second and third generated links. The tokens are found after token= and before &data=$(querystring) Copy them and keep them somewhere safe!

What you want uses two commands: a command which uses $(count) and a command that tells how long ago the former command was used. I’m going to call the former command !test and the latter command !testtime

I’ve set up two such commands down below. Either copy and paste these commands as they are into your chat OR use the Nightbot dashboard to create the commands. Feel free to rename the commands as you wish. Replace PRIVATE_TOKEN with your private token and PUBLIC_TOKEN with your public token before adding the commands. Replace [!test command response here] with whatever command response you want (in your case it’s a response that uses $(count)).

IMPORTANT: It is safer to add the commands through the Nightbot dashboard. Add these commands through chat ONLY if you are sure no one else is in the chat, otherwise they might see your private token!

!addcom -cd=5 !test $(eval a=`$(urlfetch http://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=$(time EST "MMM D Y HH:mm:ss z"))`;` `) [!test command response here]

!addcom -cd=5 !testtime The !test command was used $(countup $(urlfetch http://twitch.center/customapi/quote?token=PUBLIC_TOKEN&data=0&no_id=1)) ago.

Feel free to modify the command names or responses however you see fit. Just be sure to leave the $(eval) and $(countup) parts unchanged!

Wow, thank you very much!! I already use ehsankia’s quote list. Are you able to reuse tokens? Like use my tokens from quote on this as well?

You can reuse tokens of course, but I advise you to generate new tokens instead of using existing ones because your quote list will become littered with timestamps.

Ah then I guess you can’t really reuse them…lol

By any chance is there a way to automatically delete the previous timestamps? No need to keep them…

I see no reason to remove the timestamps. The !testtime command only uses the latest timestamp in the list, and no one can see the entries except you.

If it really bugs you, make sure there’s only one entry on the list, then rewrite the $(eval) part of !test like so:

$(eval a=`$(urlfetch http://twitch.center/customapi/editquote?token=privateTokenHere&data=1 $(time EST "MMM D Y HH:mm:ss z"))`;` `)

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