From 7b664f436b76eaab2d9df53d0c790cd96f2203e6 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Mon, 5 May 2025 03:25:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20SendMsg=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E4=B8=AD=E7=9A=84=E6=B6=88=E6=81=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF=E7=94=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=96=AD=E8=A8=80=E6=8F=90=E5=8D=87=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=81=B5=E6=B4=BB=E6=80=A7=E5=92=8C=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action/action.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action/action.go b/action/action.go index 957697e..a342392 100644 --- a/action/action.go +++ b/action/action.go @@ -45,11 +45,11 @@ func (am *actionManager) SendMsg(reply *model.Reply) error { ID: int(reply.FromMsg.OriginMsgId), }, } - switch reply.ReplyMsg.(type) { + switch replyMsgVal := reply.ReplyMsg.(type) { case []any: - reply.ReplyMsg = append([]any{replyMsg}, reply.ReplyMsg) + reply.ReplyMsg = append([]any{replyMsg}, replyMsgVal...) case string: - reply.ReplyMsg = fmt.Sprintf("%s%s", replyMsg.ToCQString(), reply.ReplyMsg) + reply.ReplyMsg = fmt.Sprintf("%s%s", replyMsg.ToCQString(), replyMsgVal) } } userID := strconv.FormatInt(reply.FromMsg.UserId, 10)