mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 02:00:24 +00:00
✨ 新增插件控制
This commit is contained in:
14
control/register.go
Normal file
14
control/register.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user