Archived
1
This repository has been archived on 2022-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
fwzookeeper/vendor/gitlab.com/toby3d/telegram/get_webhook_info.go

18 lines
490 B
Go
Raw Normal View History

2018-12-22 17:38:56 +04:00
package telegram
import json "github.com/pquerna/ffjson/ffjson"
// GetWebhookInfo get current webhook status. Requires no parameters. On success,
// returns a WebhookInfo object. If the bot is using getUpdates, will return an
// object with the url field empty.
func (bot *Bot) GetWebhookInfo() (info *WebhookInfo, err error) {
resp, err := bot.request(nil, MethodGetWebhookInfo)
if err != nil {
return
}
info = new(WebhookInfo)
err = json.Unmarshal(*resp.Result, info)
return
}