summaryrefslogtreecommitdiff
path: root/post_bot.py
diff options
context:
space:
mode:
authorBrett Weiland <brett_weiland@bpcspace.com>2020-11-01 19:09:00 -0600
committerBrett Weiland <brett_weiland@bpcspace.com>2020-11-01 19:09:00 -0600
commita801659c806c4ffba43fd4f23a5e157b726cc6dd (patch)
tree57baf25a243d48261acb71605285c26068baee05 /post_bot.py
parente53dff2db364d4e72c453d235168e2b0e8263d52 (diff)
modified: post_bot.py
Diffstat (limited to 'post_bot.py')
-rwxr-xr-xpost_bot.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/post_bot.py b/post_bot.py
index d75912f..a26d544 100755
--- a/post_bot.py
+++ b/post_bot.py
@@ -51,7 +51,7 @@ def acheive_limit():
'page':'topic',
'action':'reply',
'topic_id':'1557621',
- 'reply_message':"Done for today!\nSleeping until 06:00 UTC.".format("04:00"),
+ 'reply_message':"Done for today!\nSleeping until 06:01 UTC.",
'box_color':'#0000ff',
'post_color':'#0',
'post_style':'0'
@@ -68,11 +68,23 @@ def acheive_limit():
'post_style':'0'
})
+
+rs.post('https://recolor.me/topic/1557621', data={
+ 'key':key,
+ 'page':'topic',
+ 'action':'reply',
+ 'topic_id':'1557621',
+ 'reply_message':"Server is booting, or service has restarted.\nThe time is {}".format(datetime.now(timezone.utc))
+ 'box_color':'#0000ff',
+ 'post_color':'#0',
+ 'post_style':'0'
+ })
+
acheive_limit()
while True:
current_time = datetime.now(timezone.utc)
- desired_time = current_time.replace(day=current_time.day+1, hour=6, minute=0, second=0, microsecond=0)
+ desired_time = current_time.replace(day=current_time.day+1, hour=6, minute=1, second=0, microsecond=0)
print("starting next run at {}".format(str(desired_time)))
cap_thread = Timer((desired_time - current_time).seconds+1, acheive_limit)
cap_thread.start()