The mode turns on by schedule
You set “Start” and “End”, 02:00 to 08:00 by default, and “Time zone”: Moscow by default. “Days of the week” marks the days the mode turns on: a night belongs to the day the window starts. The bot reads a window across midnight, such as 23:00 to 06:00, correctly. It checks the schedule once a minute and, after downtime, catches up with the state from saved data. There is one window per server.