Commit 84b4889d authored by Mrs4s's avatar Mrs4s

fix issue of sending the empty message.

parent 6ad0d689
......@@ -211,6 +211,10 @@ func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int
}
newElem = append(newElem, elem)
}
if len(newElem) == 0 {
log.Warnf("群消息发送失败: 消息为空.")
return -1
}
m.Elements = newElem
ret := bot.Client.SendGroupMessage(groupId, m, ForceFragmented)
if ret == nil || ret.Id == -1 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment