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_me.go
2018-11-29 20:32:51 +04:00

17 lines
387 B
Go

package telegram
import json "github.com/pquerna/ffjson/ffjson"
// GetMe testing your bot's auth token. Requires no parameters. Returns basic
// information about the bot in form of a User object.
func (bot *Bot) GetMe() (me *User, err error) {
resp, err := bot.request(nil, MethodGetMe)
if err != nil {
return
}
me = new(User)
err = json.Unmarshal(*resp.Result, me)
return
}