mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
✏️ 完成插件卸载
This commit is contained in:
19
plugins/plugin_demo/main.go
Normal file
19
plugins/plugin_demo/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
zero "github.com/wdvxdr1123/ZeroBot"
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||
)
|
||||
|
||||
func init() {
|
||||
en := control.Register("demo", &control.Options{
|
||||
DisableOnDefault: false,
|
||||
Help: "help from demo",
|
||||
})
|
||||
en.OnCommand("demo", zero.AdminPermission).SetBlock(true).SecondPriority().
|
||||
Handle(func(ctx *zero.Ctx) {
|
||||
ctx.SendChain(message.Text("回复"))
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user