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

fix: bus_id compatibility

This commit is contained in:
wdvxdr 2021-12-23 21:18:01 +08:00
parent c775d91e1c
commit 024ec34fbe
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6
2 changed files with 4 additions and 4 deletions

View File

@ -568,7 +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
// @route(get_group_file_url)
// @rename(bus_id->busid)
// @rename(bus_id->"[busid\x2Cbus_id].0")
func (bot *CQBot) CQGetGroupFileURL(groupID int64, fileID string, busID int32) global.MSG {
url := bot.Client.GetGroupFileUrl(groupID, fileID, busID)
if url == "" {
@ -639,7 +639,7 @@ func (bot *CQBot) CQGroupFileDeleteFolder(groupID int64, id string) global.MSG {
// CQGroupFileDeleteFile 拓展API-删除群文件
//
// @route(delete_group_file)
// @rename(id->file_id, bus_id->busid)
// @rename(id->file_id, bus_id->"[busid\x2Cbus_id].0")
func (bot *CQBot) CQGroupFileDeleteFile(groupID int64, id string, busID int32) global.MSG {
fs, err := bot.Client.GetGroupFileSystem(groupID)
if err != nil {

View File

@ -61,7 +61,7 @@ func (c *Caller) call(action string, p Getter) global.MSG {
case "delete_group_file":
p0 := p.Get("group_id").Int()
p1 := p.Get("file_id").String()
p2 := int32(p.Get("busid").Int())
p2 := int32(p.Get("[busid,bus_id].0").Int())
return c.bot.CQGroupFileDeleteFile(p0, p1, p2)
case "delete_group_folder":
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":
p0 := p.Get("group_id").Int()
p1 := p.Get("file_id").String()
p2 := int32(p.Get("busid").Int())
p2 := int32(p.Get("[busid,bus_id].0").Int())
return c.bot.CQGetGroupFileURL(p0, p1, p2)
case "get_group_files_by_folder":
p0 := p.Get("group_id").Int()