From d7e4707d5dda3726ba82d694ca1b53240005b851 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sun, 14 May 2023 19:43:12 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=AE=80=E5=8C=96=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E8=BE=93=E5=87=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/platform/qq.py | 5 ++++- model/platform/qqchan.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/model/platform/qq.py b/model/platform/qq.py index bae2805a9..4eca275d0 100644 --- a/model/platform/qq.py +++ b/model/platform/qq.py @@ -14,7 +14,10 @@ class QQ: """ # print(res) - print("[System-Info] 回复QQ消息中..."+str(res)) + _t = str(res) + if len(_t) > 20: + _t = _t[:20]+"..." + print("[QQ-BOT] 回复QQ消息: "+_t) if isinstance(res, list) and len(res) > 0: await self.client.sendGroupMessage(source.group_id, res) diff --git a/model/platform/qqchan.py b/model/platform/qqchan.py index d863a80c2..72017c1ac 100644 --- a/model/platform/qqchan.py +++ b/model/platform/qqchan.py @@ -16,7 +16,10 @@ class QQChan(): self.client.run(appid=appid, token=token) def send_qq_msg(self, message, res, image_mode=False, msg_ref = None): - print("[System-Info] 回复QQ频道消息中..."+str(res)) + _t = str(res) + if len(_t) > 20: + _t = _t[:20]+"..." + print("[QQCHAN-BOT] 回复QQ频道消息: "+_t) if not image_mode: try: if msg_ref is not None: