From f6fd25a41dfaa91b23966ba85212ce2161f9ebd1 Mon Sep 17 00:00:00 2001 From: Passthem Date: Tue, 30 Sep 2025 19:08:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=20Notify=20=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=88=9B=E5=BB=BA=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- konabot/plugins/simple_notify/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/konabot/plugins/simple_notify/__init__.py b/konabot/plugins/simple_notify/__init__.py index 220ebf6..2ede9c8 100644 --- a/konabot/plugins/simple_notify/__init__.py +++ b/konabot/plugins/simple_notify/__init__.py @@ -185,9 +185,18 @@ async def _(msg: UniMsg, mEvt: Event): driver = nonebot.get_driver() +NOTIFIED_FLAG = { + "task_added": False, +} + @driver.on_bot_connect async def _(): + if NOTIFIED_FLAG["task_added"]: + return + + NOTIFIED_FLAG["task_added"] = True + await DATA_FILE_LOCK.acquire() tasks = [] cfg = load_notify_config()