From 18ffe9c6bd87da6bf9b5db6ebd26b6fb90db226a Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 24 Nov 2024 18:50:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=5F=5Finit=5F=5F.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins.v2/sitestatistic/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins.v2/sitestatistic/__init__.py b/plugins.v2/sitestatistic/__init__.py index 8196bfd..894c065 100644 --- a/plugins.v2/sitestatistic/__init__.py +++ b/plugins.v2/sitestatistic/__init__.py @@ -198,12 +198,14 @@ class SiteStatistic(_PluginBase): } @eventmanager.register(EventType.SiteRefreshed) - def send_msg(self, _: Event): + def send_msg(self, event: Event): """ 站点数据刷新事件时发送消息 """ if not self._notify_type: return + if event.event_data.get('site_id') != "*": + return # 获取站点数据 today, today_data, yesterday_data = self.__get_data() # 转换为字典