From 2e7ee9df5cb68506a356c1d5bf59691685caafb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:18:51 +0900 Subject: [PATCH] fix b.client nil pointer --- bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.go b/bot.go index 85e9118..64c9b4a 100644 --- a/bot.go +++ b/bot.go @@ -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 {