mirror of
https://github.com/awfufu/qbot.git
synced 2026-03-01 13:29:43 +08:00
18 lines
319 B
Go
18 lines
319 B
Go
package api
|
|
|
|
import "encoding/json"
|
|
|
|
func CanSendRecord(c Client) (bool, error) {
|
|
data, err := c.SendParams("can_send_record", nil)
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
var resp struct {
|
|
Yes bool `json:"yes"`
|
|
}
|
|
if err := json.Unmarshal(data, &resp); err != nil {
|
|
return false, err
|
|
}
|
|
return resp.Yes, nil
|
|
}
|