Hello everyone, first time posting so be patient with me!
Since nightbot’s timers aren’t all that reliable (especially at the top of the hour when a random command gets pulled if you have multiple timers set in place) I used the following idea Staggered timers and made one single command, issue is, I need more space now, and I don’t know how to do it.
I tried making a pastebin myself, but it keeps putting out [invalid variable] in chat (I checked for every common mistake I might’ve made but I couldn’t find any…). On top of that, even if the pastebin were to work, I wouldn’t have a clue on how to implement it in the timed command.
I feel like I need to specify that it is important to me that every top of the hour a specific command of that list goes off, so the responses can’t be random, they need to follow a specific order.
Well if it’s outputting invalid variable that most likely means urlfetch or eval is misspelled there a 99% chance that you left out a letter or something as there’s no other way to get that error message I believe
Got the consent to post via dms as well, so here it goes:
The fix was adding a blank timer (no message) but with an alias named _timer (in this case). And since I needed 4 commands, I put the interval for 15 minutes.
!addcom _timer $(eval p=`$(urlfetch json RawPastebinLink)`.split(`|`);c=$(count);t=Number.parseInt(`$(time UTC "mm")`);t==59||t<=1?p[3]:p[c%3])
Where you replace RawPastebinLink with your pastebin with your commands.
Be aware that this makes it so the first 3 commands in your list will be pulled at random every 15 minutes, while the 4th will always be pulled at exactly :00.
I’m not entirely sure how you’d edit it if you need more than 4 commands, my guess would be to update t<=1?p[3]:p[c%3]) with whatever number you might need (example: 6 commands it becomes p[5]:p[c%5]).
*Edit: Forgot to mention that split(`|`) refers to the marker in your pastebin, update it accordingly with what marker you used (; : , | etc)