// Send text messages. On success, the sent Message is returned.
Send text messages. On success, the sent Message is returned.
// Send text messages . On success the sent Message is returned .
func (e *Bot) SendMessage(body *SendMessageRequest) (*Message, error) {
	res, err := e.CallMethod("sendMessage", body)
	if err != nil {
		return nil, err
	}
	message := &SendMessageResponse{}
	err = json.Unmarshal(res, message)
	if err != nil {
		return nil, err
	}
	if !message.OK {
		return nil, errors.New(message.Description)
	}
	return message.Result, nil
}
func ( e * Bot ) SendMessage ( body * SendMessageRequest ) ( * Message , error ) { res , err := e . CallMethod ( " " , body ) if err != nil { return nil , err } message := & SendMessageResponse { } err = json . Unmarshal ( res , message ) if err != nil { return nil , err } if ! message . OK { return nil , errors . New ( message . Description ) } return message . Result , nil }
Send text messages.
Send text messages .