This commit is contained in:
cdle
2023-06-06 13:50:35 +08:00
parent 7bbf2e6ba1
commit 10f300626a
5 changed files with 62 additions and 22 deletions
+6
View File
@@ -404,6 +404,12 @@ func SetPluginMethod(vm *goja.Runtime, uuid string, on_start bool) {
vm.Set("getReplyMessage", func(plt string, bots_id []string) *goja.Promise {
return GetReplyMessage(vm, plt, bots_id)
})
vm.Set("Script", func(str string) interface{} {
if str == "" {
str = uuid
}
return Script(str)
})
}
func EncryptPlugin(script string) string {