新增插件控制

This commit is contained in:
fumiama
2021-09-09 00:20:04 +08:00
parent be49ba83b3
commit 087c6c0298
21 changed files with 355 additions and 48 deletions

14
control/register.go Normal file
View File

@@ -0,0 +1,14 @@
package control
import (
zero "github.com/wdvxdr1123/ZeroBot"
)
var m Control
func Register(service string, o *Options) *zero.Engine {
engine := zero.New()
m = *New(service, o)
engine.UsePreHandler(m.Handler())
return engine
}