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

update MiraiGo

This commit is contained in:
wdvxdr 2023-02-20 15:08:53 +08:00
parent 0c9f7a1f8f
commit cb1604a098
3 changed files with 5 additions and 5 deletions

View File

@ -173,7 +173,7 @@ func (bot *CQBot) uploadLocalImage(target message.Source, img *msg.LocalImage) (
} }
img.Stream = bytes.NewReader(stream.Bytes()) img.Stream = bytes.NewReader(stream.Bytes())
} }
i, err := bot.Client.UploadImage(target, img.Stream, 4) i, err := bot.Client.UploadImage(target, img.Stream)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -194,7 +194,7 @@ func (bot *CQBot) uploadLocalVideo(target message.Source, v *msg.LocalVideo) (*m
return nil, err return nil, err
} }
defer func() { _ = video.Close() }() defer func() { _ = video.Close() }()
return bot.Client.UploadShortVideo(target, video, v.Thumb, 4) return bot.Client.UploadShortVideo(target, video, v.Thumb)
} }
func removeLocalElement(elements []message.IMessageElement) []message.IMessageElement { func removeLocalElement(elements []message.IMessageElement) []message.IMessageElement {

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.20
require ( require (
github.com/FloatTech/sqlite v1.5.7 github.com/FloatTech/sqlite v1.5.7
github.com/Microsoft/go-winio v0.6.0 github.com/Microsoft/go-winio v0.6.0
github.com/Mrs4s/MiraiGo v0.0.0-20230219115954-3b97ce341ba8 github.com/Mrs4s/MiraiGo v0.0.0-20230220070519-af032dec9677
github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e
github.com/RomiChan/websocket v1.4.3-0.20220123145318-307a86b127bc github.com/RomiChan/websocket v1.4.3-0.20220123145318-307a86b127bc
github.com/fumiama/go-base16384 v1.6.1 github.com/fumiama/go-base16384 v1.6.1

4
go.sum
View File

@ -4,8 +4,8 @@ github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b h1:tvciXWq2nuvTbFeJG
github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b/go.mod h1:fHZFWGquNXuHttu9dUYoKuNbm3dzLETnIOnm1muSfDs= github.com/FloatTech/ttl v0.0.0-20220715042055-15612be72f5b/go.mod h1:fHZFWGquNXuHttu9dUYoKuNbm3dzLETnIOnm1muSfDs=
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
github.com/Mrs4s/MiraiGo v0.0.0-20230219115954-3b97ce341ba8 h1:TA9aA5uF1oSttyZwAio6GcanEwO6XDGJkznOn+7vs7s= github.com/Mrs4s/MiraiGo v0.0.0-20230220070519-af032dec9677 h1:ekVLExixkpJybGXsRyQorPZJN7k2b5ZqH+pOgPVfAJM=
github.com/Mrs4s/MiraiGo v0.0.0-20230219115954-3b97ce341ba8/go.mod h1:mU3fBFU+7eO0kaGes7YRKtzIDtwIU84nSSwTV7NK2b0= github.com/Mrs4s/MiraiGo v0.0.0-20230220070519-af032dec9677/go.mod h1:mU3fBFU+7eO0kaGes7YRKtzIDtwIU84nSSwTV7NK2b0=
github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d h1:/Xuj3fIiMY2ls1TwvPKmaqQrtJsPY+c9s+0lOScVHd8= github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d h1:/Xuj3fIiMY2ls1TwvPKmaqQrtJsPY+c9s+0lOScVHd8=
github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d/go.mod h1:2Ie+hdBFQpQFDHfeklgxoFmQRCE7O+KwFpISeXq7OwA= github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d/go.mod h1:2Ie+hdBFQpQFDHfeklgxoFmQRCE7O+KwFpISeXq7OwA=
github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e h1:wR3MXQ3VbUlPKOOUwLOYgh/QaJThBTYtsl673O3lqSA= github.com/RomiChan/syncx v0.0.0-20221202055724-5f842c53020e h1:wR3MXQ3VbUlPKOOUwLOYgh/QaJThBTYtsl673O3lqSA=