From 1dc8d8edd773b18306756c429b367e2d488a9499 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Wed, 6 Oct 2021 09:58:00 +0800 Subject: [PATCH] update --- core/otto.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/otto.go b/core/otto.go index 1151980..de39574 100644 --- a/core/otto.go +++ b/core/otto.go @@ -139,9 +139,7 @@ func init() { } var handler = func(s Sender) interface{} { template := data - for k, v := range s.GetMatch() { - template = strings.Replace(template, fmt.Sprintf(`param(%d)`, k+1), fmt.Sprintf(`"%s"`, v), -1) - } + template = strings.Replace(template, "ImType()", fmt.Sprintf(`"%s"`, s.GetImType()), -1) template = strings.Replace(template, "GetChatID()", fmt.Sprint(s.GetChatID()), -1) param := func(call otto.Value) otto.Value {