mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-06 20:13:50 +08:00
commit
d4613cf9c1
10
coolq/api.go
10
coolq/api.go
@ -376,7 +376,7 @@ func (bot *CQBot) CQSendGroupMessage(groupID int64, i interface{}, autoEscape bo
|
||||
fixAt(elem)
|
||||
mid := bot.SendGroupMessage(groupID, &message.SendingMessage{Elements: elem})
|
||||
if mid == -1 {
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考输出")
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考 go-cqhttp 端输出")
|
||||
}
|
||||
log.Infof("发送群 %v(%v) 的消息: %v (%v)", group.Name, groupID, limitedString(ToStringMessage(elem, groupID)), mid)
|
||||
return OK(MSG{"message_id": mid})
|
||||
@ -403,7 +403,7 @@ func (bot *CQBot) CQSendGroupMessage(groupID int64, i interface{}, autoEscape bo
|
||||
fixAt(elem)
|
||||
mid := bot.SendGroupMessage(groupID, &message.SendingMessage{Elements: elem})
|
||||
if mid == -1 {
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考输出")
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考 go-cqhttp 端输出")
|
||||
}
|
||||
log.Infof("发送群 %v(%v) 的消息: %v (%v)", group.Name, groupID, limitedString(str), mid)
|
||||
return OK(MSG{"message_id": mid})
|
||||
@ -530,7 +530,7 @@ func (bot *CQBot) CQSendGroupForwardMessage(groupID int64, m gjson.Result) MSG {
|
||||
ret := bot.Client.SendGroupForwardMessage(groupID, &message.ForwardMessage{Nodes: sendNodes})
|
||||
if ret == nil || ret.Id == -1 {
|
||||
log.Warnf("合并转发(群)消息发送失败: 账号可能被风控.")
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考输出")
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考 go-cqhttp 端输出")
|
||||
}
|
||||
return OK(MSG{
|
||||
"message_id": bot.InsertGroupMessage(ret),
|
||||
@ -549,7 +549,7 @@ func (bot *CQBot) CQSendPrivateMessage(userID int64, groupID int64, i interface{
|
||||
elem := bot.ConvertObjectMessage(m, false)
|
||||
mid := bot.SendPrivateMessage(userID, groupID, &message.SendingMessage{Elements: elem})
|
||||
if mid == -1 {
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考输出")
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考 go-cqhttp 端输出")
|
||||
}
|
||||
log.Infof("发送好友 %v(%v) 的消息: %v (%v)", userID, userID, limitedString(m.String()), mid)
|
||||
return OK(MSG{"message_id": mid})
|
||||
@ -574,7 +574,7 @@ func (bot *CQBot) CQSendPrivateMessage(userID int64, groupID int64, i interface{
|
||||
}
|
||||
mid := bot.SendPrivateMessage(userID, groupID, &message.SendingMessage{Elements: elem})
|
||||
if mid == -1 {
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考输出")
|
||||
return Failed(100, "SEND_MSG_API_ERROR", "请参考 go-cqhttp 端输出")
|
||||
}
|
||||
log.Infof("发送好友 %v(%v) 的消息: %v (%v)", userID, userID, limitedString(str), mid)
|
||||
return OK(MSG{"message_id": mid})
|
||||
|
Loading…
x
Reference in New Issue
Block a user