Creating timers longer than 60 minutes

Asked Jan 15, 2024·2 replies·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

So I saw a previous topic saying the reason that >60min timers wouldn't be a native option is that it would complicate the UI, but I think you could just have a field to just type a number for the desired number of minutes - that would be cleaner than a slider with 55 individual options anyway (imo) and allow for a greater range.

So that change would be great, but the topic also said I could use the API to make longer timers, so if I could figure that out that would solve my particular issue, but I've never messed with an API before so idk where to start. Like do I need to use an IDE or something? Is there any step-by-step tutorials on this sort of thing for nightbot?

Thanks for your consideration and/or any assistance!

2 replies

u can actually accomplish that within the command, as long as the command isn't too complicated requiring most of the 500 character limit... i used this to make a command go off every 4 hours and 20 minutes... (the math is 13 times 20 minutes = 4 hours and 20 minutes)... i set the timer to 20 minutes and aliased to a command with this code...

js
$(eval c=$(count);c%13==0?{THE_REST_OF_THE_COMMAND_HERE}:` `)

technically the command goes off every 20 minutes, but if it's between the 4 hours and 20 minutes it just sends a single space which twitch will ignore and nothing shows in chat ;)
and u can mathematically set it to however long u want... like set a timer to 60 minutes and divide the count by 2 to make it go off every 2 hours, etc, etc

Ah thank you very much! That should work for me as a stopgap measure