Files
qbot/api/can_send_record.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
}