mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
try to fix #115.
This commit is contained in:
parent
fa33dbdd4e
commit
22d9ddb4ea
@ -12,6 +12,7 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/xujiajun/nutsdb"
|
||||
"hash/crc32"
|
||||
"math/rand"
|
||||
"path"
|
||||
"sync"
|
||||
"time"
|
||||
@ -94,7 +95,8 @@ func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int
|
||||
var newElem []message.IMessageElement
|
||||
for _, elem := range m.Elements {
|
||||
if i, ok := elem.(*message.ImageElement); ok {
|
||||
gm, err := bot.Client.UploadGroupImage(114514, i.Data)
|
||||
_, _ = bot.Client.UploadGroupImage(int64(rand.Intn(11451419198)), i.Data)
|
||||
gm, err := bot.Client.UploadGroupImage(groupId, i.Data)
|
||||
if err != nil {
|
||||
log.Warnf("警告: 群 %v 消息图片上传失败: %v", groupId, err)
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user