Reputation: 465
I am trying to build a bot that sends messages which embed a couple of standard replies which can be sent just by tapping on them.
Each link would contain a space - e.g. "/ack 20134" & "/pass 20134"
So tapping on the first link causes the text "/ack 20134" to be sent back to the bot.
How do I embed this into the message that I send from the bot to the client in text, HTML or Markup?
Upvotes: 2
Views: 4846
Reputation: 1980
set that element (button text for example) text
field to "/ack 20134" .Then when user hit the button this command will send to your bot. you can use inline keyboards
and set its data
incallback_data
to this value. But you cannont use it a text message because space separates two fields(embeds just "/ack" i.e. command part. user can hit it but your bot just receives "/ack".)
For text messages there is another option: do not use space(e.g. "/ack20134" without space) and your bot's would receive "/ack20134", then you must parse commands part)
Upvotes: 1