mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
fix: download & delete group file api error
This commit is contained in:
parent
304667a822
commit
cb16c08ac8
@ -568,6 +568,7 @@ func (bot *CQBot) CQGetGroupFilesByFolderID(groupID int64, folderID string) glob
|
|||||||
//
|
//
|
||||||
// https://docs.go-cqhttp.org/api/#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%96%87%E4%BB%B6%E8%B5%84%E6%BA%90%E9%93%BE%E6%8E%A5
|
// https://docs.go-cqhttp.org/api/#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%96%87%E4%BB%B6%E8%B5%84%E6%BA%90%E9%93%BE%E6%8E%A5
|
||||||
// @route(get_group_file_url)
|
// @route(get_group_file_url)
|
||||||
|
// @rename(bus_id->busid)
|
||||||
func (bot *CQBot) CQGetGroupFileURL(groupID int64, fileID string, busID int32) global.MSG {
|
func (bot *CQBot) CQGetGroupFileURL(groupID int64, fileID string, busID int32) global.MSG {
|
||||||
url := bot.Client.GetGroupFileUrl(groupID, fileID, busID)
|
url := bot.Client.GetGroupFileUrl(groupID, fileID, busID)
|
||||||
if url == "" {
|
if url == "" {
|
||||||
@ -638,7 +639,7 @@ func (bot *CQBot) CQGroupFileDeleteFolder(groupID int64, id string) global.MSG {
|
|||||||
// CQGroupFileDeleteFile 拓展API-删除群文件
|
// CQGroupFileDeleteFile 拓展API-删除群文件
|
||||||
//
|
//
|
||||||
// @route(delete_group_file)
|
// @route(delete_group_file)
|
||||||
// @rename(id->file_id)
|
// @rename(id->file_id, bus_id->busid)
|
||||||
func (bot *CQBot) CQGroupFileDeleteFile(groupID int64, id string, busID int32) global.MSG {
|
func (bot *CQBot) CQGroupFileDeleteFile(groupID int64, id string, busID int32) global.MSG {
|
||||||
fs, err := bot.Client.GetGroupFileSystem(groupID)
|
fs, err := bot.Client.GetGroupFileSystem(groupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.17
|
|||||||
require (
|
require (
|
||||||
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f
|
github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f
|
||||||
github.com/Microsoft/go-winio v0.5.1
|
github.com/Microsoft/go-winio v0.5.1
|
||||||
github.com/Mrs4s/MiraiGo v0.0.0-20211216072607-5a59cc656c48
|
github.com/Mrs4s/MiraiGo v0.0.0-20211216171228-a5410846cb5f
|
||||||
github.com/dustin/go-humanize v1.0.0
|
github.com/dustin/go-humanize v1.0.0
|
||||||
github.com/fumiama/go-hide-param v0.1.4
|
github.com/fumiama/go-hide-param v0.1.4
|
||||||
github.com/gabriel-vasile/mimetype v1.4.0
|
github.com/gabriel-vasile/mimetype v1.4.0
|
||||||
|
4
go.sum
4
go.sum
@ -3,8 +3,8 @@ github.com/Baozisoftware/qrcode-terminal-go v0.0.0-20170407111555-c0650d8dff0f/g
|
|||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY=
|
github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY=
|
||||||
github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||||
github.com/Mrs4s/MiraiGo v0.0.0-20211216072607-5a59cc656c48 h1:ZXofuoHtO8bWDSEAFJyho5qJyBjOdbLv/vDSn0d/rOI=
|
github.com/Mrs4s/MiraiGo v0.0.0-20211216171228-a5410846cb5f h1:xM45KYUWkSGmImTpalgQJYWHVz7/eSSOoOnrRuUeb/4=
|
||||||
github.com/Mrs4s/MiraiGo v0.0.0-20211216072607-5a59cc656c48/go.mod h1:YD9gBKkxC9lPPtx3doYXRG26VBkK6YXjrS76cv01C5w=
|
github.com/Mrs4s/MiraiGo v0.0.0-20211216171228-a5410846cb5f/go.mod h1:YD9gBKkxC9lPPtx3doYXRG26VBkK6YXjrS76cv01C5w=
|
||||||
github.com/RomiChan/protobuf v0.0.0-20211204042931-ff4f35848737 h1:p4o7/eSoP39jwnGZz08N1IpH/mNzg9SdCn7kPM9A9BE=
|
github.com/RomiChan/protobuf v0.0.0-20211204042931-ff4f35848737 h1:p4o7/eSoP39jwnGZz08N1IpH/mNzg9SdCn7kPM9A9BE=
|
||||||
github.com/RomiChan/protobuf v0.0.0-20211204042931-ff4f35848737/go.mod h1:CKKOWC7mBxd36zxsCB1V8DTrwlTNRQvkSVbYqyUiGEE=
|
github.com/RomiChan/protobuf v0.0.0-20211204042931-ff4f35848737/go.mod h1:CKKOWC7mBxd36zxsCB1V8DTrwlTNRQvkSVbYqyUiGEE=
|
||||||
github.com/bits-and-blooms/bitset v1.2.1 h1:M+/hrU9xlMp7t4TyTDQW97d3tRPVuKFC6zBEK16QnXY=
|
github.com/bits-and-blooms/bitset v1.2.1 h1:M+/hrU9xlMp7t4TyTDQW97d3tRPVuKFC6zBEK16QnXY=
|
||||||
|
@ -61,7 +61,7 @@ func (c *Caller) call(action string, p Getter) global.MSG {
|
|||||||
case "delete_group_file":
|
case "delete_group_file":
|
||||||
p0 := p.Get("group_id").Int()
|
p0 := p.Get("group_id").Int()
|
||||||
p1 := p.Get("file_id").String()
|
p1 := p.Get("file_id").String()
|
||||||
p2 := int32(p.Get("bus_id").Int())
|
p2 := int32(p.Get("busid").Int())
|
||||||
return c.bot.CQGroupFileDeleteFile(p0, p1, p2)
|
return c.bot.CQGroupFileDeleteFile(p0, p1, p2)
|
||||||
case "delete_group_folder":
|
case "delete_group_folder":
|
||||||
p0 := p.Get("group_id").Int()
|
p0 := p.Get("group_id").Int()
|
||||||
@ -99,7 +99,7 @@ func (c *Caller) call(action string, p Getter) global.MSG {
|
|||||||
case "get_group_file_url":
|
case "get_group_file_url":
|
||||||
p0 := p.Get("group_id").Int()
|
p0 := p.Get("group_id").Int()
|
||||||
p1 := p.Get("file_id").String()
|
p1 := p.Get("file_id").String()
|
||||||
p2 := int32(p.Get("bus_id").Int())
|
p2 := int32(p.Get("busid").Int())
|
||||||
return c.bot.CQGetGroupFileURL(p0, p1, p2)
|
return c.bot.CQGetGroupFileURL(p0, p1, p2)
|
||||||
case "get_group_files_by_folder":
|
case "get_group_files_by_folder":
|
||||||
p0 := p.Get("group_id").Int()
|
p0 := p.Get("group_id").Int()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user