From 3d4c3d447fa9d2c87d216313724294faed951952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 6 Oct 2022 15:19:41 +0800 Subject: [PATCH] fix cust cmd rule --- rules.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rules.go b/rules.go index d2cb648..019e937 100644 --- a/rules.go +++ b/rules.go @@ -105,9 +105,12 @@ func CommandRule(commands ...string) Rule { case ctx.IsToMe && msg.IsCommand(): cmdMessage = msg.Command() args = msg.CommandArguments() + logrus.Debugln("CommandRule: IsCommand:", cmdMessage, "args:", args) case strings.HasPrefix(msg.Text, "/"): cmdMessage, args, _ = strings.Cut(msg.Text, " ") cmdMessage, _, _ = strings.Cut(cmdMessage, "@") + cmdMessage = cmdMessage[1:] + logrus.Debugln("CommandRule: has/prefix:", cmdMessage, "args:", args) default: return false }