Command to automatically reset at a specific time

Currently I have the below commands but am wishing to have it automatically reset the count at a specific time every day if its possible.

!wins USER has won 0 times

!addwin -a=!commands -ul=moderator edit !wins USER has won $(count) times.

!resetwin -a=!commands -ul=moderator edit !addwin -c=0

Im wanting the !resetwin to be automated at hypothetically 4am GMT when i stop gaming but not 100% sure if its possible through code only or through an API. Any help would be greatly appreciated.

Hey @canigetahoooyaaa!

This isn’t possible through Nightbot only, but you can use the API to achieve what you want.

Hi @Emily , thank you for the reply! I’m not overly familiar with the API coding just yet - still learning as I spend more time on the forums. How would this be done, would it be done using the quote API? With it using the quote API would this then invalidate the quote API I have added for actual quotes?

Using the API is very advanced feature set that requires understanding of Web APIs. For your use case Nightbot cannot be scheduled in advance to run commands outside of timers (couple of times an hour depending on chat usage).

Hi @Aaron128l , thanks for the response - I did have a feeling that this would be the case but wanted to check if it was possible somehow.

Yeah, as Aaron said, it’s quite advanced stuff, you wouldn’t use the Quote API for that, or timers, what you’d need is an external server to do the job for you.

damn that sounds like alot of work - im guessing that it would require a pc/server to be live 24/7 for it to be utilizable/worth considering?

Yup, that’s what servers are for, a Raspberry Pi could do the job too.

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