From a76e8b8ef4e986023e0ccc455e8e5b43fdcfcabb Mon Sep 17 00:00:00 2001 From: UnCLAS-Prommer Date: Sun, 22 Jun 2025 11:05:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=B3=BB=E7=BB=9F=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E9=98=B2=E6=AD=A2=E5=9C=A8=E6=97=A0GUI=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=AD=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 3 +-- src/recv_handler.py | 11 ----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/requirements.txt b/requirements.txt index e5964ec..41e8eb1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,4 @@ requests maim_message loguru pillow -tomli -plyer \ No newline at end of file +tomli \ No newline at end of file diff --git a/src/recv_handler.py b/src/recv_handler.py index 7b11fbd..d07cb78 100644 --- a/src/recv_handler.py +++ b/src/recv_handler.py @@ -7,8 +7,6 @@ import json import websockets as Server from typing import List, Tuple, Optional, Dict, Any import uuid -from plyer import notification -import os from . import MetaEventType, RealMessageType, MessageType, NoticeType from maim_message import ( @@ -66,15 +64,6 @@ class RecvHandler: now_time = time.time() if now_time - self.last_heart_beat > self.interval * 2: logger.error(f"Bot {id} 连接已断开,被下线,或者Napcat卡死!") - current_dir = os.path.dirname(__file__) - icon_path = os.path.join(current_dir, "..", "assets", "maimai.ico") - notification.notify( - title="警告", - message=f"Bot {id} 连接已断开,被下线,或者Napcat卡死!", - app_name="MaiBot Napcat Adapter", - timeout=10, - app_icon=icon_path, - ) break else: logger.debug("心跳正常")