From b074656b2520ff6fd2116ee1fbd00317ff68045b Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Wed, 16 Apr 2025 20:04:51 +0200 Subject: [PATCH] bugfixing bot --- app/cron_discord_bot.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/cron_discord_bot.py b/app/cron_discord_bot.py index 1459a0c..f446849 100644 --- a/app/cron_discord_bot.py +++ b/app/cron_discord_bot.py @@ -431,7 +431,7 @@ def recent_earnings(): except Exception as e: print(e) -def executive_order_message(): +def executive_order(): try: with open(f"json/discord/executive_order.json", "r") as file: @@ -449,8 +449,8 @@ def executive_order_message(): with open(filepath, "r") as file: # Load the JSON data from the file using orjson data = orjson.loads(file.read()) - - if datetime.fromisoformat(item['date']).date() == today: + + if datetime.fromisoformat(data['date']).date() == today: data['id'] = file_id.replace(".json","") res_list.append(data) @@ -510,8 +510,8 @@ def executive_order_message(): else: print("Executive Order already sent!") - except Exception as e: - print(e) + except: + pass def analyst_report(): @@ -791,7 +791,7 @@ if __name__ == "__main__": options_flow() dark_pool_flow() recent_earnings() - executive_order_message() analyst_report() wiim() - congress_trading() \ No newline at end of file + congress_trading() + executive_order() \ No newline at end of file