1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-07 20:45:53 +08:00
This commit is contained in:
Mrs4s 2021-11-12 18:01:21 +08:00
parent ea036c5d05
commit 4d328358e3
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -576,7 +576,7 @@ func (bot *CQBot) CQSendGuildChannelMessage(guildID, channelID uint64, m gjson.R
return Failed(100, "CHANNEL_NOT_FOUND", "子频道不存在") return Failed(100, "CHANNEL_NOT_FOUND", "子频道不存在")
} }
if channel.ChannelType != client.ChannelTypeText { if channel.ChannelType != client.ChannelTypeText {
log.Warnf("无法发送频道信息: 频道类型错误, 不接受文信息") log.Warnf("无法发送频道信息: 频道类型错误, 不接受文信息")
return Failed(100, "CHANNEL_NOT_SUPPORTED_TEXT_MSG", "子频道类型错误, 无法发送文本信息") return Failed(100, "CHANNEL_NOT_SUPPORTED_TEXT_MSG", "子频道类型错误, 无法发送文本信息")
} }
var elem []message.IMessageElement var elem []message.IMessageElement
@ -586,7 +586,7 @@ func (bot *CQBot) CQSendGuildChannelMessage(guildID, channelID uint64, m gjson.R
} else { } else {
str := m.String() str := m.String()
if str == "" { if str == "" {
log.Warn("群消息发送失败: 信息为空.") log.Warn("频道发送失败: 信息为空.")
return Failed(100, "EMPTY_MSG_ERROR", "消息为空") return Failed(100, "EMPTY_MSG_ERROR", "消息为空")
} }
if autoEscape { if autoEscape {