🎨 改进代码结构

This commit is contained in:
Yiwen-Chan
2021-03-18 18:13:50 +08:00
parent c7b86e767e
commit 0b9b507740
13 changed files with 543 additions and 813 deletions

18
main.go
View File

@@ -6,10 +6,11 @@ import (
log "github.com/sirupsen/logrus"
easy "github.com/t-tomalak/logrus-easy-formatter"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/driver"
_ "bot/manager"
_ "bot/music"
_ "bot/setutime"
setutime "bot/setutime"
)
func init() {
@@ -18,6 +19,9 @@ func init() {
LogFormat: "[zero][%time%][%lvl%]: %msg% \n",
})
log.SetLevel(log.DebugLevel)
setutime.CACHEGROUP = 868047498 // 涩图缓冲群,必须修改
setutime.PoolList = []string{"涩图", "二次元", "风景", "车万"} // 涩图类型,可以不修改
}
func main() {
@@ -28,13 +32,13 @@ func main() {
* Project: https://github.com/Yiwen-Chan/ZeroBot-Plugin
========================================================
`)
zero.Run(zero.Option{
Host: "127.0.0.1",
Port: "6700",
AccessToken: "",
NickName: []string{"椛椛"},
zero.Run(zero.Config{
NickName: []string{"bot"},
CommandPrefix: "/",
SuperUsers: []string{"825111790", "213864964"},
SuperUsers: []string{"825111790", "213864964"}, // 必须修改,否则无权限
Driver: []zero.Driver{
driver.NewWebSocketClient("127.0.0.1", "6700", ""),
},
})
select {}
}