mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
💫 ♻️ 🎉 ✨ ⚡️ 强制使用优先级
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/wdvxdr1123/ZeroBot/message"
|
||||
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
||||
|
||||
"github.com/FloatTech/ZeroBot-Plugin/order"
|
||||
control "github.com/FloatTech/zbputils/control"
|
||||
"github.com/FloatTech/zbputils/txt2img"
|
||||
)
|
||||
@@ -21,7 +22,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
engine = control.Register("omikuji", &control.Options{
|
||||
engine = control.Register("omikuji", order.PrioOmikuji, &control.Options{
|
||||
DisableOnDefault: false,
|
||||
Help: "浅草寺求签\n" +
|
||||
"- 求签|占卜\n- 解签",
|
||||
@@ -29,7 +30,7 @@ var (
|
||||
)
|
||||
|
||||
func init() { // 插件主体
|
||||
engine.OnFullMatchGroup([]string{"求签", "占卜"}).SetPriority(10).SetBlock(true).
|
||||
engine.OnFullMatchGroup([]string{"求签", "占卜"}).SetBlock(true).
|
||||
Handle(func(ctx *zero.Ctx) {
|
||||
miku := bangoToday(ctx.Event.UserID)
|
||||
ctx.SendChain(
|
||||
@@ -38,7 +39,7 @@ func init() { // 插件主体
|
||||
message.Image(fmt.Sprintf(bed, miku, 1)),
|
||||
)
|
||||
})
|
||||
engine.OnFullMatchGroup([]string{"解签"}).SetPriority(10).SetBlock(true).
|
||||
engine.OnFullMatchGroup([]string{"解签"}).SetBlock(true).
|
||||
Handle(func(ctx *zero.Ctx) {
|
||||
kujiBytes, err := txt2img.RenderToBase64(getKujiByBango(bangoToday(ctx.Event.UserID)), txt2img.FontFile, 400, 20)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user