mirror of
https://github.com/awfufu/qbot.git
synced 2026-03-01 13:29:43 +08:00
19 lines
356 B
Go
19 lines
356 B
Go
package api
|
|
|
|
import "encoding/json"
|
|
|
|
func GetGroupList(c Client, noCache bool) ([]GroupInfo, error) {
|
|
params := map[string]any{
|
|
"no_cache": noCache,
|
|
}
|
|
data, err := c.Send("get_group_list", params)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
var resp []GroupInfo
|
|
if err := json.Unmarshal(data, &resp); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|