update
This commit is contained in:
+4
-1
@@ -174,7 +174,6 @@ func init123() {
|
|||||||
var handler = func(s Sender) interface{} {
|
var handler = func(s Sender) interface{} {
|
||||||
template := data
|
template := data
|
||||||
template = strings.Replace(template, "ImType()", fmt.Sprintf(`"%s"`, s.GetImType()), -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 {
|
param := func(call otto.Value) otto.Value {
|
||||||
i, _ := call.ToInteger()
|
i, _ := call.ToInteger()
|
||||||
v, _ := otto.ToValue(s.Get(int(i - 1)))
|
v, _ := otto.ToValue(s.Get(int(i - 1)))
|
||||||
@@ -193,6 +192,10 @@ func init123() {
|
|||||||
vm.Set("Delete", func() {
|
vm.Set("Delete", func() {
|
||||||
s.Delete()
|
s.Delete()
|
||||||
})
|
})
|
||||||
|
vm.Set("GetChatID", func() otto.Value {
|
||||||
|
v, _ := otto.ToValue(s.GetChatID())
|
||||||
|
return v
|
||||||
|
})
|
||||||
vm.Set("Continue", func() {
|
vm.Set("Continue", func() {
|
||||||
s.Continue()
|
s.Continue()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user