Skip to content

Commit

Permalink
✏️ driver 使用 api 写法
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Oct 16, 2021
1 parent e95367f commit 2d69ae2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,15 @@ func main() {
zero.Run(zero.Config{
NickName: []string{"椛椛", "ATRI", "atri", "亚托莉", "アトリ"},
CommandPrefix: "/",

// SuperUsers 某些功能需要主人权限,可通过以下两种方式修改
// []string{}:通过代码写死的方式添加主人账号
// flag.Args():通过命令行参数的方式添加主人账号
SuperUsers: append([]string{"12345678", "87654321"}, flag.Args()...),

Driver: []zero.Driver{
&driver.WSClient{
// OneBot 正向WS 默认使用 6700 端口
Url: *url,
AccessToken: *token,
},
driver.NewWebSocketClient(*url, *token),
},
})
},
)

// 帮助
zero.OnFullMatchGroup([]string{"/help", ".help", "菜单"}, zero.OnlyToMe).SetBlock(true).FirstPriority().
Expand Down

0 comments on commit 2d69ae2

Please sign in to comment.