mirror of
https://github.com/awfufu/qbot.git
synced 2026-03-01 05:19:44 +08:00
18 lines
317 B
Go
18 lines
317 B
Go
package api
|
|
|
|
import "encoding/json"
|
|
|
|
func CanSendImage(c Client) (bool, error) {
|
|
data, err := c.SendParams("can_send_image", 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
|
|
}
|