One timer command with long multiple messages

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.

Thank you in advance if you could help me!

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

Hi! We’ve talked via dms yesterday and you already helped me fix it! This post has been pending for approval so it hadn’t yet got through lol

If you don’t mind I could post the fix you made here so if anyone else has the same issue they can see how it got resolved!

Thank you again!

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.

This is the command @potatoeaterlove made:

!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)

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