1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 11:07:39 +08:00

api: _send_group_notice return noticeId (#1834)

Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
This commit is contained in:
脆饼干 2023-08-01 11:45:05 +08:00 committed by GitHub
parent 1bd0bb9ae2
commit 7cae9829a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1113,17 +1113,18 @@ func (bot *CQBot) CQSetGroupMemo(groupID int64, msg, img string) global.MSG {
if err != nil {
return Failed(100, "IMAGE_NOT_FOUND", "图片未找到")
}
_, err = bot.Client.AddGroupNoticeWithPic(groupID, msg, data)
noticeID, err := bot.Client.AddGroupNoticeWithPic(groupID, msg, data)
if err != nil {
return Failed(100, "SEND_NOTICE_ERROR", err.Error())
}
return OK(global.MSG{"notice_id": noticeID})
} else {
_, err := bot.Client.AddGroupNoticeSimple(groupID, msg)
noticeID, err := bot.Client.AddGroupNoticeSimple(groupID, msg)
if err != nil {
return Failed(100, "SEND_NOTICE_ERROR", err.Error())
}
return OK(global.MSG{"notice_id": noticeID})
}
return OK(nil)
}
return Failed(100, "GROUP_NOT_FOUND", "群聊不存在")
}