I'm building a Telegram bot, in which the user sends messages, which are later posted to another website. The bot can often give the user a suggestion of what to write, but the user must have a chance to edit this suggestion before actually posting it.
I could send this suggestion as a message from the bot to the user, and the user could copy and paste it to the message input box. However, copying and pasting is a bit cumbersome, especially on a touch device. It would be much more convenient if I could put the text directly into the editing box.
Is it possible?
I am now using the Tgfancy library, but I don't mind using another library if it has this feature.
Thank you!
In order to send a message to "@Username", you will need them to start your bot, and then store the username with the user_id. Then, you can input the username to find the correct user_id each time you want to send them a message.
Only the inline bot can edit message.
Once you have Telegram open, tap on the three-lined menu at the top left. When the side-menu appears, tap on the Settings option. Once you're in Settings, look for and tap on the Chat Settings option. In Chat Settings, you'll see a slider at the top.
switch_inline_query_current_chat of InlineKeyboardButton
is what is needed to pre-fill the text area with your inline query parameter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With