telegramAPI icon indicating copy to clipboard operation
telegramAPI copied to clipboard

reply_markup -> 400 Bad Request

Open dpblnt opened this issue 7 years ago • 1 comments

I would like to use this lib, it's fast and reliable, but unfortunately for the following code:

api.sendMessage(this_chat_id, "...",
{
	"parse_mode"=> "Markdown",
	"reply_markup"=>{
		"keyboard"=>[["1", "2"]],
		# Other optional settings:
		"resize_keyboard"=>true,
		"one_time_keyboard"=>true,
		"selective"=>true,
		"force_reply"=>true
  # "hide_keyboard"=>true
	}
})

I get this reponse::

400 Bad Request
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:809:in `process_result'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:725:in `block in transmit'
/usr/lib/ruby/2.3.0/net/http.rb:853:in `start'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:715:in `transmit'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:145:in `execute'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:52:in `execute'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient.rb:71:in `post'
/usr/local/lib/ruby/gems/2.3.0/gems/telegramAPI-1.4.2/lib/telegramAPI.rb:28:in `query'
/usr/local/lib/ruby/gems/2.3.0/gems/telegramAPI-1.4.2/lib/telegramAPI.rb:53:in `sendMessage'

Any hints?

dpblnt avatar Oct 09 '18 08:10 dpblnt

Also for

api.sendMessage(this_chat_id, "the message", {"parse_mode"=> "HTML"})

i get

/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:809:in `process_result'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:725:in `block in transmit'
/usr/lib/ruby/2.3.0/net/http.rb:853:in `start'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:715:in `transmit'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:145:in `execute'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient/request.rb:52:in `execute'
/usr/local/lib/ruby/gems/2.3.0/gems/rest-client-2.0.2/lib/restclient.rb:71:in `post'
/usr/local/lib/ruby/gems/2.3.0/gems/telegramAPI-1.4.2/lib/telegramAPI.rb:28:in `query'
/usr/local/lib/ruby/gems/2.3.0/gems/telegramAPI-1.4.2/lib/telegramAPI.rb:53:in `sendMessage'

Could it be the same issue? Could it by my system?

dpblnt avatar Oct 09 '18 11:10 dpblnt