mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-07-12 08:23:48 +00:00
fix issue of sending the empty message.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user