From 6a022a9942335fdbf87d0d1b3226b311c3512238 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sat, 19 Jul 2025 14:15:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=20getMyBLPic=20?= =?UTF-8?q?=E5=92=8C=20getMySSPic=20=E5=87=BD=E6=95=B0=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7ID=E8=A7=A3=E6=9E=90=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=9C=A8=E5=A4=84=E7=90=86=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=97=B6=E6=AD=A3=E7=A1=AE=E8=AE=BE=E7=BD=AE=20noUpda?= =?UTF-8?q?te=20=E6=A0=87=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/beatleader/beatleader.go | 2 +- handler/scoresaber/score.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/handler/beatleader/beatleader.go b/handler/beatleader/beatleader.go index 78d135c..f4a4f26 100644 --- a/handler/beatleader/beatleader.go +++ b/handler/beatleader/beatleader.go @@ -185,9 +185,9 @@ func getMyBLPic(msg model.Message) (reply *model.Reply) { var noUpdate bool = false if len(tokens) == 2 { userIdStr = tokens[1] + noUpdate = true } else { userIdStr = strconv.Itoa(int(msg.UserId)) - noUpdate = true } var data *beatleader.PlayerDataLite var lastData *beatleader.PlayerDataLite diff --git a/handler/scoresaber/score.go b/handler/scoresaber/score.go index ca441f1..b9d4e3c 100644 --- a/handler/scoresaber/score.go +++ b/handler/scoresaber/score.go @@ -210,8 +210,9 @@ func getMySSPic(msg model.Message) (reply *model.Reply) { noUpdate = false ) var userIdStr string - if len(msg.RawMsg) > len("查ss ") { - userIdStr = strings.Split(msg.RawMsg, " ")[1] + tokens := util.SplitN(msg.RawMsg, 2) + if len(tokens) == 2 { + userIdStr = tokens[1] noUpdate = true } else { userIdStr = strconv.Itoa(int(msg.UserId))