13

Telegram bot sends me a message with a text snippet, which I want to edit, and send back to the bot for further processing.

Copy and paste takes time. Typing message anew takes time.

Ideally I'd like to press an inline button "Edit" on the bot's message and get the message text appear in my reply input box for editing.(A message id attached to my reply somehow would be a plus).

I tried to use deep linking with parameters other than /start*, but that doesn't seem to work.

Can I use bot API (or any other telegram API) to have text ready for editing in my input box?

Alexander Gorshenev
  • 2,769
  • 18
  • 33

1 Answers1

10

It's impossible in official apps yet. Your question is about working with drafts - there are no methods in both API to create them or clear.


Nevertheless, you could fork any official app stored on GiHub and implement what you need if you would prefer a hard way, but compared to that copy/past solution seems much more easier, isn't it?


UPD

I can offer to you a new idea how to solve your problem - hope it will be helpful.

This is about switch_inline_query_current_chat field of InlineKeyboardButton. Just attach an inline button to messages you need to edit. Set a text for this field gotten from recieved message and after pressing you will get this text to your input area. All seems good, but you will take bot's username before the text also.

ozg
  • 17,532
  • 5
  • 19
  • 21
anatol
  • 1,680
  • 2
  • 24
  • 47
  • Could you clarify a little what apps are you talking about and what the hard way would look like? – Alexander Gorshenev Jul 31 '17 at 09:54
  • 1. Fork your own copy of official app from list above, for example - [android app](https://github.com/DrKLO/Telegram) 2. Implement your own mechanism of [working with drafts](https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/messenger/query/DraftQuery.java) 3. Build new app 4. Use it and enjoy with your new feature – anatol Jul 31 '17 at 10:46
  • Note that it is not serious recommendation if you took it seriously. This is just a possible way but very hard way – anatol Jul 31 '17 at 10:52