1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

Update cqcode.go (#2001)

fix #1998
This commit is contained in:
EnderFx 2023-03-20 10:34:05 +08:00 committed by GitHub
parent 82ecf19480
commit 008d546f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -642,7 +642,7 @@ func (bot *CQBot) ConvertElement(spec *onebot.Spec, elem msg.Element, sourceType
return bot.reply(spec, elem, sourceType)
case "forward":
id := elem.Get("id")
if id != "" {
if id == "" {
return nil, errors.New("forward 消息中必须包含 id")
}
fwdMsg := bot.Client.DownloadForwardMessage(id)