remember-remember-bot/src/remember_remember_bot/loop.py

25 lines
438 B
Python
Raw Normal View History

import time
import datetime
2023-09-01 13:00:55 +00:00
import deltachat
2023-09-01 13:00:55 +00:00
def loop(ac: deltachat.Account):
current_day = 0
while True:
if check_new_day(current_day):
pass
print(current_day)
current_day = update_day()
time.sleep(1)
def check_new_day(current_day):
2023-09-01 13:00:55 +00:00
if current_day != datetime.datetime.now().day:
return True
2023-09-01 13:00:55 +00:00
return False
def update_day():
return datetime.datetime.now().day