From 25febf1ac0355678dc0e3dffdceeab338dcb3e73 Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 18 Mar 2025 09:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E4=BD=BF=E7=94=A8=E7=BE=A4?= =?UTF-8?q?=E6=98=B5=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- message_sign/main.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/message_sign/main.py b/message_sign/main.py index cbd7d74..47c792d 100644 --- a/message_sign/main.py +++ b/message_sign/main.py @@ -254,18 +254,15 @@ class SignInSystem: # if streak > 1 and not streak_broken: # output += "[爱心]" - output = (f"@{wx_nick_name}签到,加[{points_to_add}]分,第[{today_signin_rank}]个!") + output = f"签到成功,加[{points_to_add}]分,第[{today_signin_rank}]个!" if streak_broken and old_streak > 0: # 只有在真的断签且之前有签到记录时才显示 output += f"断开了 {old_streak} 天连签!" elif streak > 1: output += f"连签 {streak} 天!" - - self.wcf.send_text( - output, - (message.roomid if message.from_group() else message.sender), - message.sender - ) + ats = "" + ats += f" @{self.wcf.get_alias_in_chatroom(message.sender, message.roomid)}" + self.wcf.send_text(f"{ats}\n{output}", message.roomid, message.sender) def __del__(self): """连接池由外部管理,不需要手动关闭"""