// A simple method for testing your bot's auth token. Requires no parameters.
// Returns basic information about the bot in form of a User object.
A simple method for testing your bot's auth token. Requires no parameters.
Returns basic information about the bot in form of a User object.
// A simple method for testing your bot ' s auth token . Requires no parameters . // Returns basic information about the bot in form of a User object .
func (e *Bot) GetMe() (*User, error) {
	res, err := e.CallMethod("getMe", nil)
	if err != nil {
		return nil, err
	}
	me := &GetMeResponse{}
	err = json.Unmarshal(res, me)
	if err != nil {
		return nil, err
	}
	if !me.OK {
		return nil, errors.New(me.Description)
	}
	return me.Result, nil
}
func ( e * Bot ) GetMe ( ) ( * User , error ) { res , err := e . CallMethod ( " " , nil ) if err != nil { return nil , err } me := & GetMeResponse { } err = json . Unmarshal ( res , me ) if err != nil { return nil , err } if ! me . OK { return nil , errors . New ( me . Description ) } return me . Result , nil }
A simple method for testing your bot's auth token.
A simple method for testing your bot ' s auth token .