From e4d663d241c5de9498d8483a1b7583121bfdeef2 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 15 Sep 2023 20:06:24 +0300 Subject: [PATCH] pin the 1st post for 11 hours --- files/helpers/cron.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/files/helpers/cron.py b/files/helpers/cron.py index 9b45b1af1..6846173b4 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -121,13 +121,15 @@ def get_file(): def get_name(): return get_file().split('.')[0] -def _create_post(title, body): +def _create_post(title, body, pin_hours): title += f': {get_name()}' body += f'''It will be shown [here](/orgy).\nRerun will be Sunday 4 PM EST.\nThere will be a 5-minute bathroom break at the 50:00 mark.''' title_html = filter_emojis_only(title) body_html = sanitize(body) + stickied_utc = int(time.time()) + (3600 * pin_hours) + p = Post( private=False, notify=True, @@ -148,7 +150,7 @@ def _create_post(title, body): rainbowed=False, queened=False, sharpened=False, - stickied_utc=int(time.time())+3600, + stickied_utc=stickied_utc, stickied="AutoJanny", distinguish_level=6, ) @@ -160,12 +162,12 @@ def _create_post(title, body): def _create_1st_post(): title = f'Movie Night' body = f'''Our Movie Night this week will show `{get_name()}`.\nThe movie will start at 8 PM EST. [Here is a timezone converter for whoever needs it.](https://dateful.com/time-zone-converter?t=8pm&tz1=EST-EDT-Eastern-Time). You can also check this [countdown timer](https://www.tickcounter.com/countdown/4435809/movie-night) instead.\n''' - _create_post(title, body) + _create_post(title, body, 11) def _create_2nd_post(): title = f'Movie Night in 60 minutes' body = '' - _create_post(title, body) + _create_post(title, body, 1) def _create_orgy(): orgy = Orgy(