1
0
mirror of https://github.com/fumiama/NanoBot.git synced 2026-06-13 15:00:41 +08:00

fix b.client nil pointer

This commit is contained in:
源文雨
2023-10-16 14:18:51 +09:00
parent 33992c7d3a
commit 2e7ee9df5c

2
bot.go
View File

@@ -48,7 +48,7 @@ type Bot struct {
// getinitinfo 获得 gateway 和 shard
func (b *Bot) getinitinfo() (gw string, shard [2]byte, err error) {
shard[1] = 1
if b.client != nil {
if b.client == nil {
b.client = http.DefaultClient
}
if b.ShardIndex == 0 {