mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
20 lines
442 B
Go
20 lines
442 B
Go
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("回复"))
|
|
})
|
|
}
|