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 }