1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

fix: panic of getting group code error in forward message

This commit is contained in:
Mrs4s 2022-09-08 18:43:34 +08:00
parent 093605cf01
commit 140192c76a
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -836,7 +836,7 @@ func (bot *CQBot) uploadForwardElement(m gjson.Result, target int64, sourceType
if len(bot.Client.GroupList) == 0 { if len(bot.Client.GroupList) == 0 {
groupID = 1 groupID = 1
} else { } else {
groupID = bot.Client.GroupList[1].Uin groupID = bot.Client.GroupList[0].Uin
} }
} }
builder := bot.Client.NewForwardMessageBuilder(groupID) builder := bot.Client.NewForwardMessageBuilder(groupID)