应用插件控制到大部分插件

This commit is contained in:
fumiama
2021-09-09 11:13:23 +08:00
parent cb3cfa054b
commit 91396c8885
14 changed files with 155 additions and 146 deletions

View File

@@ -18,13 +18,12 @@ import (
)
func init() { // 插件主体
engine := control.Register("github", &control.Options{
control.Register("github", &control.Options{
DisableOnDefault: false,
Help: "GitHub仓库搜索\n" +
"- >github [xxx]\n" +
"- >github -p [xxx]",
})
engine.OnRegex(`^>github\s(-.{1,10}? )?(.*)$`).SetBlock(true).FirstPriority().
}).OnRegex(`^>github\s(-.{1,10}? )?(.*)$`).SetBlock(true).FirstPriority().
Handle(func(ctx *zero.Ctx) {
// 发送请求
header := http.Header{