I am trying to write a command that will count up in days/time from the current time of the command being used.
This is what I have, but it gives me a “not a valid timezone” error.
It has been $(countup $(time US/Mountain "MMMM Do YYYY, h:mm:ss)) since I hurt myself on stream. FeelsGoodMan.
I also want to make a command to reset that counter.
Generate you tokens here https://twitch.center/customapi/quote/generate
You’ll get 2 tokens 8 digit one is your public 16 digit one is your private
They come after “token=” and before “&data”
Commands to display counter
It has been $(countup $(eval a="$(urlfetch json https://twitch.center/customapi/quote/list?token=PUBLIC_TOKEN&no_id=1)".split(",");a[a.length-1])) since I hurt myself on stream. :(
Command to start a new timer
$(urlfetch $(eval Time="$(time EST "MMMM D YYYY hh:mm:ss a z")".replace(" ","%20");"https://twitch.center/customapi/addquote?token=PRIVATE_TOKEN&data=,"+Time))
Optional can alias this to another command so it shows a custom message or nothing
Make userlevel Moderator or Owner
Optional Command (I suggest “_” plus the “LAST_COMMAND_NAME” like “_hurt”)
$(eval a="YOUR_MESSAGE";a)
If you want no response make the message a space
make user level the same as the last command
Also if it’s not clear basically replace anything in caps with the correct data.
I haven’t tested this out so if there are any issues feel free to tell me but it should work fine.
It has been Invalid timezone specified. For a list of timezones, check https://docs.nightbot.tv/commands/variables/time#timezones
This is my input
It has been $(countup $(eval a="$(urlfetch json https://twitch.center/customapi/quote/list?token=793cf9c7)".split(",");a[a.length-1])) since I hurt myself on stream. FeelsBadMan
Sorry I forgot to include a “,” in the second command it’s comes right after data= you can change it yourself or just reboot and paste the command.Also I edited the first command so the quote list doesn’t have any ids and I edited the format of the time variable as it was wrong.
Did you use the command to add the time to the list before using the one that displays it? Because it there are no times in your list that could be the issue.