From 074e7e9ed90ba17e48ce0ec929964aa5b6f84270 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Thu, 17 Jul 2025 15:42:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20MsgInHandler?= =?UTF-8?q?=20=E5=87=BD=E6=95=B0=E4=B8=AD=E7=9A=84=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E5=99=A8=E5=8C=B9=E9=85=8D=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=89=8D=E7=BC=80=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=A2=9E=E5=BC=BA=E4=BB=A3=E7=A0=81=E7=9A=84=E7=81=B5?= =?UTF-8?q?=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 --- handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler/handler.go b/handler/handler.go index dce9269..6c962c9 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -133,7 +133,7 @@ func MsgInHandler(msg model.Message) (reply *model.Reply) { for trigger, handler := range atHandlers { for _, textMsg := range msg.StructuredMsg { if textMsg.GetMessageType() == qq_message.TypeText { - if util.SplitN(textMsg.(*qq_message.TextMessage).Data.Text, 2)[0] == trigger { + if strings.HasPrefix(util.SplitN(textMsg.(*qq_message.TextMessage).Data.Text, 2)[0], trigger) { return auth.TryExecHandler(msg, handler.Level, handler.Handler) } }