From 77380471e49851a6c5c664723111bd51e89aac75 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Sat, 30 Oct 2021 19:15:14 +0800 Subject: [PATCH] update --- core/otto.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/otto.go b/core/otto.go index 4e2f73d..b6a3914 100644 --- a/core/otto.go +++ b/core/otto.go @@ -196,7 +196,11 @@ func init123() { continue } var handler = func(s Sender) interface{} { - template := data + data, err := os.ReadFile(jr) + if err != nil { + return nil + } + template := string(data) template = strings.Replace(template, "ImType()", fmt.Sprintf(`"%s"`, s.GetImType()), -1) param := func(call otto.Value) otto.Value { i, _ := call.ToInteger()