From 541476aa0943241542cdfe4b321efeb309ac2d9e Mon Sep 17 00:00:00 2001 From: Trevor Blanarik Date: Mon, 23 Sep 2024 05:44:24 +0000 Subject: [PATCH] must cast lookback as int --- spotbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotbot.py b/spotbot.py index 5da3520..721da05 100644 --- a/spotbot.py +++ b/spotbot.py @@ -50,7 +50,7 @@ def is_entity_recent(entity): return False ent_time = entity.metadata['timestamp'] cur_time = datetime.datetime.now(datetime.timezone.utc) - lookback_seconds = os.getenv('LOOKBACK_SECONDS', 7200) + lookback_seconds = int(os.getenv('LOOKBACK_SECONDS', 7200)) return (cur_time - ent_time).total_seconds() < lookback_seconds def call_target(content, messageId=None):