🐛 Fixed DeleteWebhook method
This commit is contained in:
parent
5a4054b0a2
commit
ea5dd969d2
|
@ -1,7 +1,16 @@
|
|||
package telegram
|
||||
|
||||
import json "github.com/pquerna/ffjson/ffjson"
|
||||
|
||||
// DeleteWebhook remove webhook integration if you decide to switch back to
|
||||
// getUpdates. Returns True on success. Requires no parameters.
|
||||
func (bot *Bot) DeleteWebhook() (*Response, error) {
|
||||
return bot.request(nil, "deleteWebhook", nil)
|
||||
func (bot *Bot) DeleteWebhook() (bool, error) {
|
||||
resp, err := bot.request(nil, "deleteWebhook", nil)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
var data bool
|
||||
err = json.Unmarshal(*resp.Result, &data)
|
||||
return data, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user