2017-09-04 18:32:57 +00:00
|
|
|
package telegram
|
|
|
|
|
2017-10-12 09:45:08 +00:00
|
|
|
import json "github.com/pquerna/ffjson/ffjson"
|
|
|
|
|
2017-10-06 07:55:54 +00:00
|
|
|
// DeleteWebhook remove webhook integration if you decide to switch back to
|
|
|
|
// getUpdates. Returns True on success. Requires no parameters.
|
2017-10-12 09:45:08 +00:00
|
|
|
func (bot *Bot) DeleteWebhook() (bool, error) {
|
2018-04-12 11:58:05 +00:00
|
|
|
resp, err := bot.request(nil, MethodDeleteWebhook)
|
2017-10-12 09:45:08 +00:00
|
|
|
if err != nil {
|
|
|
|
return false, err
|
|
|
|
}
|
|
|
|
|
|
|
|
var data bool
|
|
|
|
err = json.Unmarshal(*resp.Result, &data)
|
|
|
|
return data, err
|
2017-09-04 18:32:57 +00:00
|
|
|
}
|