From 808156f016a90d8410ea8c103fe92d5d0f636c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Fri, 26 Feb 2021 22:34:03 +0100 Subject: [PATCH] logging & avatar fix --- bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 21daf37..f4f4a20 100644 --- a/bot.py +++ b/bot.py @@ -60,7 +60,7 @@ async def send_message(text): "text": text, "format": "html", "displayName": "PUBLIC INFORMATION STREAMS & SERVICES", - "avatarUrl": "http://i.imgur.com/IDOBtEJ.png" + "avatarUrl": config.AVATAR_URL }) @@ -84,10 +84,12 @@ async def main(): for event in future_events: if event.name not in state.notified and event.begin.shift(days=-2) < arrow.now(): + logging.info(f"Sending description of {event.name}") await send_message(process_event(event, config.EVENT_TEMPLATE)) state.notified.append(event.name) if event.name not in state.notified_soon and event.begin.shift(hours=-2) < arrow.now(): + logging.info(f"Notifying of {event.name}") await send_message(process_event(event, config.SOON_TEMPLATE)) state.notified_soon.append(event.name)