[Feature Request] "Random" command in timers

Hello NightDev.

I’ve switched to NightBot from MooBot and so far I am very impressed and not looking back,
especially the custom api support in commands, etc. is brilliant.

There is however one tiny thing that i find to work worse in NightBot compared to MooBot,
timers…

I have a bunch of commands like !donate, !g2a, !kinguin, !social etc. and had that in MooBot
as well, one very big difference tho was that in MooBot i had the ability to make 1 timer.
Let’s call the timer “advertisement” and then specify a time between each trigger and minimum
chat lines between each trigger. In this timer i could then specific a bunch of my normal commands
which would then rotate every time the timer was executed, so say every 10 minutes it would run
the next command in the chain. 00:10 !donate, 00:20 !g2a, 00:30 !kinguin, etc.

I cannot find a way to reliably replicate this behavior in NightBot and is considering to just make
a single timer with urlfetch and have a php script rotate the message for each time it triggers,
however this requires me to update the php script seperately instead of just having the timer
trigger my already existing commands automatically on rotation. So in case I edit a command,
I would have to edit the php script aswell.

This would be a very welcome feature in NightBot,
maybe as a simple variable to use in the alias field,
something like random(donate, g2a, kinguin, social).

1 Like

If you are familiar with cron syntax, you can set custom times for each timer to run (simulating a loop of an hour, perhaps) through our API (our UI only lets you set simple timers). You can read about that at https://api-docs.nightbot.tv/#timers

If you are stuck on a single timer with random command responses, you can wait for us to support line breaks as random responses or implement something yourself with our API alongside the URL fetch variable (you can grab your commands via our API and select them as you wish)

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