job可获取网页信息,可代表执行

This commit is contained in:
源文雨
2022-03-09 12:14:20 +08:00
parent 183be05d82
commit a27132f907
4 changed files with 155 additions and 19 deletions

View File

@@ -512,11 +512,8 @@ func init() { // 插件主体
// 运行 CQ 码
engine.OnRegex(`^run(.*)$`, zero.SuperUserPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
var cmd = ctx.State["regex_matched"].([]string)[1]
cmd = strings.ReplaceAll(cmd, "[", "[")
cmd = strings.ReplaceAll(cmd, "]", "]")
// 可注入,权限为主人
ctx.Send(cmd)
ctx.Send(message.UnescapeCQCodeText(ctx.State["regex_matched"].([]string)[1]))
})
// 根据 gist 自动同意加群
// 加群请在github新建一个gist其文件名为本群群号的字符串的md5(小写)内容为一行是当前unix时间戳(10分钟内有效)。