Hi guys im new to streaming and im trying to add a command that every user can user. the command in searching for is a command that you can set up time in minutes and after the tome the bot is telling yo it stopped.
for example:
!pomo 25 - @member set up timer for 25 minutes
afterr 25 minutes the bot sending:
@member your timer just ended
Nightbot individual chatter timers
7 replies
Hey @Peppy Mouse!
There's no way to set up a timer that'll remember the $(user), however, here's a workaround with IDs:
!addcom !pomo -a=_pomo $(eval isNaN(`$(1)`)?i=5000:i=$(1)*60000;i)!addcom _pomo $(urlfetch https://vxrl.xyz/smm/$(eval `${$(query)/60000} minutes timer starting... - Timer ID: $(count)`)/$(eval `Timer ${$(count)-1} ended.`)?i=$(query)&d=1)
Call the command with the number of minutes you want the timer to be, example for 5 minutes:
!pomo 5
It should work for 45 and 25 minutes, but yeah, it's not guaranteed it'll work every time, if the server goes down for example, it will stop working.
I noticed a similar issue when I launched two timers really close one to the other, maybe that's what you did as well? In which case, I would recommend to give it at least 15 to 30 seconds between two timer launches. I'm not really sure if and why it'd help, but it worked properly when I did so.
You can add a cooldown of 30 seconds—mods+ bypass it—in the dashboard or like this:
!editcom !pomo -cd=30
A $(urlfetch) sends a response URL header that lets an API post to chat without prior authorization. The URL dies after 5 minutes, so this multiple messages API along with the other one (likely mine) is built around this.
Didn't find your answer? The community is on Discord.
Ask on Discord