From d0d3898694612899b40e9455ec6a8ba4fa1462ef Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Mon, 5 May 2025 02:23:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20getMyRecentSco?= =?UTF-8?q?re=20=E5=87=BD=E6=95=B0=E4=B8=AD=E7=9A=84=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E9=80=BB=E8=BE=91=EF=BC=8C=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/beatleader/beatleader.go | 7 +------ handler/scoresaber/score.go | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/handler/beatleader/beatleader.go b/handler/beatleader/beatleader.go index efc86de..74a963d 100644 --- a/handler/beatleader/beatleader.go +++ b/handler/beatleader/beatleader.go @@ -287,12 +287,7 @@ func getMyRecentScore(msg model.Message) (reply *model.Reply) { } //如果消息行数太多,使用合并转发 if len(records) > 5 { - nodeMsg := util.NewSelfNodeMessage(&message.TextMessage{ - Type: "text", - Data: message.TextMessageData{ - Text: "玩家 " + userName + " 的" + strconv.Itoa(recordCount) + "条最近记录为:\n" + scoreMsg, - }, - }) + nodeMsg := util.NewSelfNodeMessage("玩家 " + userName + " 的" + strconv.Itoa(recordCount) + "条最近记录为:\n" + scoreMsg) action.ActionManager.SendForward( &model.Reply{ ReplyMsg: []any{&nodeMsg}, diff --git a/handler/scoresaber/score.go b/handler/scoresaber/score.go index 1e7377f..5215c02 100644 --- a/handler/scoresaber/score.go +++ b/handler/scoresaber/score.go @@ -300,12 +300,7 @@ func getMyRecentScore(msg model.Message) (reply *model.Reply) { } //如果消息行数太多,使用合并转发 if len(records) > 5 { - nodeMsg := util.NewSelfNodeMessage(&message.TextMessage{ - Type: "text", - Data: message.TextMessageData{ - Text: "玩家 " + userName + " 的" + strconv.Itoa(recordCount) + "条最近记录为:\n" + scoreMsg, - }, - }) + nodeMsg := util.NewSelfNodeMessage("玩家 " + userName + " 的" + strconv.Itoa(recordCount) + "条最近记录为:\n" + scoreMsg) action.ActionManager.SendForward( &model.Reply{ ReplyMsg: []any{&nodeMsg},