Skip to content

Commit

Permalink
Beta467 (#469)
Browse files Browse the repository at this point in the history
* beta447

* beta448

* beta449

* beta450

* beta451

* beta452

* beta453

* beta454

* beta455

* btea455

* beta456

* beta457

* beta458

* beta460

* beta460

* beta461

* beta462

* beta463

* beta464

* beta465

* beta467
  • Loading branch information
Hoshinonyaruko authored Jul 21, 2024
1 parent 2d7b096 commit 09c6d85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ func main() {
// 指定需要启动的分片数为 2 的话可以手动修改 wsInfo
if conf.Settings.ShardCount == 1 {
go func() {
wsInfo.Shards = 1
wsInfo.Shards = uint32(conf.Settings.ShardNum)
if err = botgo.NewSessionManager().Start(wsInfo, token, &intent); err != nil {
log.Fatalln(err)
}
Expand Down
1 change: 1 addition & 0 deletions structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Settings struct {
ShardCount int `yaml:"shard_count"`
ShardID int `yaml:"shard_id"`
UseUin bool `yaml:"use_uin"`
ShardNum int `yaml:"shard_num"`
//事件订阅类
TextIntent []string `yaml:"text_intent"`
//转换类
Expand Down
1 change: 1 addition & 0 deletions template/config_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ settings:
client_secret: "<YOUR_CLIENT_SECRET>" # 你的客户端密钥
shard_count: 1 #分片数量 默认1
shard_id: 0 #当前分片id 默认从0开始,详细请看 https://bot.q.qq.com/wiki/develop/api/gateway/reference.html
shard_num: 1 #接口调用超过频率限制时,如果不想要多开gsk,尝试调大.gsk会尝试连接到n个分片处理信息. n为你所配置的值.与 shard_count和shard_id互不相干.
#事件订阅
text_intent: # 请根据公域 私域来选择intent,错误的intent将连接失败
Expand Down

0 comments on commit 09c6d85

Please sign in to comment.