From c9a914b5d5cae2928db3ea8b256f0b56404bee40 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Thu, 20 Aug 2020 02:30:44 +0800 Subject: [PATCH] fix #141. --- coolq/bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolq/bot.go b/coolq/bot.go index 32f81da..026d3c7 100644 --- a/coolq/bot.go +++ b/coolq/bot.go @@ -130,7 +130,7 @@ func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int } m.Elements = newElem ret := bot.Client.SendGroupMessage(groupId, m) - if ret.Id == -1 { + if ret == nil || ret.Id == -1 { log.Warnf("警告: 群 %v 消息发送失败, 账号可能被风控.", groupId) return -1 }