forked from FloatTech/ZeroBot-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
45 lines (39 loc) · 1.3 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"fmt"
log "github.com/sirupsen/logrus"
easy "github.com/t-tomalak/logrus-easy-formatter"
zero "github.com/wdvxdr1123/ZeroBot"
"github.com/wdvxdr1123/ZeroBot/driver"
_ "github.com/Yiwen-Chan/ZeroBot-Plugin/github"
_ "github.com/Yiwen-Chan/ZeroBot-Plugin/manager"
_ "github.com/Yiwen-Chan/ZeroBot-Plugin/music"
setutime "github.com/Yiwen-Chan/ZeroBot-Plugin/setutime"
)
func init() {
log.SetFormatter(&easy.Formatter{
TimestampFormat: "2006-01-02 15:04:05",
LogFormat: "[zero][%time%][%lvl%]: %msg% \n",
})
log.SetLevel(log.DebugLevel)
setutime.CACHEGROUP = 868047498 // 涩图缓冲群,必须修改
setutime.PoolList = []string{"涩图", "二次元", "风景", "车万"} // 涩图类型,可以不修改
}
func main() {
fmt.Printf(`
====================[ZeroBot-Plugin]====================
* OneBot + ZeroBot + Golang
* Copyright © 2018-2020 Kanri, All Rights Reserved
* Project: https://github.com/Yiwen-Chan/ZeroBot-Plugin
========================================================
`)
zero.Run(zero.Config{
NickName: []string{"bot"},
CommandPrefix: "/",
SuperUsers: []string{"825111790", "213864964"}, // 必须修改,否则无权限
Driver: []zero.Driver{
driver.NewWebSocketClient("127.0.0.1", "6700", ""),
},
})
select {}
}