summaryrefslogtreecommitdiff
path: root/post_bot.py
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2020-11-02 08:19:16 -0600
committerBrett Weiland <brett_weiland@bpcspace.com>2020-11-02 08:19:16 -0600
commit45c79d3a8f4263487da504264b4cae73e987298f (patch)
tree03f54edbd4cfb9aeb66608599748d122891e2fdf /post_bot.py
parent8a1b282df20e4e0ed1c426c11b35b7cb7432c137 (diff)
modified: post_bot.py
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()