优化 banner

This commit is contained in:
源文雨
2023-03-01 12:22:14 +08:00
parent 0e52bbe0f7
commit 1c274d6eb8
8 changed files with 32 additions and 18 deletions

10
main.go
View File

@@ -12,10 +12,10 @@ import (
"strings"
"time"
"github.com/FloatTech/ZeroBot-Plugin/kanban" // 在最前打印 banner
_ "github.com/FloatTech/ZeroBot-Plugin/console" // 更改控制台属性
"github.com/FloatTech/ZeroBot-Plugin/kanban" // 打印 banner
// ---------以下插件均可通过前面加 // 注释,注释后停用并不加载插件--------- //
// ----------------------插件优先级按顺序从高到低---------------------- //
// //
@@ -190,6 +190,8 @@ import (
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/driver"
"github.com/wdvxdr1123/ZeroBot/message"
"github.com/FloatTech/ZeroBot-Plugin/kanban/banner"
// -----------------------以上为内置依赖,勿动------------------------ //
)
@@ -301,11 +303,11 @@ func main() {
// 帮助
zero.OnFullMatchGroup([]string{"/help", ".help", "菜单"}, zero.OnlyToMe).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
ctx.SendChain(message.Text(kanban.Banner, "\n管理发送\"/服务列表\"查看 bot 功能\n发送\"/用法name\"查看功能用法"))
ctx.SendChain(message.Text(banner.Banner, "\n管理发送\"/服务列表\"查看 bot 功能\n发送\"/用法name\"查看功能用法"))
})
zero.OnFullMatch("查看zbp公告", zero.OnlyToMe, zero.AdminPermission).SetBlock(true).
Handle(func(ctx *zero.Ctx) {
ctx.SendChain(message.Text(kanban.Kanban()))
ctx.SendChain(message.Text(strings.ReplaceAll(kanban.Kanban(), "\t", "")))
})
zero.RunAndBlock(&config.Z, process.GlobalInitMutex.Unlock)
}