summaryrefslogtreecommitdiff
path: root/post_bot.py
diff options
context:
space:
mode:
Diffstat (limited to 'post_bot.py')
-rwxr-xr-xpost_bot.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/post_bot.py b/post_bot.py
index 61db359..62670ae 100755
--- a/post_bot.py
+++ b/post_bot.py
@@ -85,7 +85,7 @@ def beat_games():
'reply_message':"Levels completed!",
'box_color':'#0000ff',
'post_color':'#0',
- 'post_style':'0'
+ 'post_style':'0'})
def acheive_limit():
uncaped = True
@@ -141,13 +141,19 @@ rs.post('https://recolor.me/topic/1557621', data={
'post_style':'0'
})
-acheive_limit()
+def bot_routine():
+ print("starting games routine...")
+ beat_games()
+ print("games are completed, staring post routine...")
+ acheive_limit()
+
+bot_routine()
while True:
current_time = datetime.now(timezone.utc)
desired_time = current_time.replace(day=current_time.day, hour=6, minute=1, second=0, microsecond=0) + timedelta(days=1)
print("starting next run at {}".format(str(desired_time)))
- cap_thread = Timer((desired_time - current_time).total_seconds()+1, acheive_limit)
+ cap_thread = Timer((desired_time - current_time).total_seconds()+1, bot_routine)
cap_thread.start()
cap_thread.join()