mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
fix issue of sending the empty message.
This commit is contained in:
parent
6ad0d68978
commit
84b4889def
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user