From c3ae6c707381a9a7fa4add185328a12eb914c2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Sun, 17 Aug 2025 05:03:12 +0200 Subject: [PATCH] Fix trigger time check to ensure user presence in last_trigger_time dictionary --- misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc.py b/misc.py index 9ab2395..f24aec4 100644 --- a/misc.py +++ b/misc.py @@ -102,7 +102,7 @@ def should_respond_without_trigger(channel_id: str, user: str, threshold_seconds Returns: True if the bot should respond without trigger keywords, False otherwise. """ - if channel_id not in last_trigger_time: + if channel_id not in last_trigger_time or user not in last_trigger_time[channel_id]: return False last_trigger: datetime.datetime = last_trigger_time[channel_id][user]