Reputation: 2933
My bot shows an inline keyboard in a group that the users have to click in order to send a preset message to the group.
The bot presents the preset text and pass it as callback_data
:
bot.telegram.sendPhoto(process.env.TELEGRAM_GROUP_ID, {
source: filepath
}, {
reply_markup: {
inline_keyboard: [[
{ text: text, callback_data: text }
]]
}
})
Then when the user click the button the bot send a reply that shows the reply keyboard showing the preset text:
ctx.replyWithHTML("instructions", {
reply_markup: {
resize_keyboard: true,
one_time_keyboard: true,
selective: true,
keyboard: [
[text]
]
}
});
Is there a way to show the reply keyboard without having to send a separate message, or maybe to have the preset text to apear in the text box ready to be send by the user instead of on a button in the reply keyboard?
Upvotes: 3
Views: 3099
Reputation: 2106
Question :
May I insert a text into text box that user can send it to the bot?
Answer
:
NO
Question :
Is there a way to show the reply keyboard without having to send a separate message?
Answer :
Yes , You can update your message with a/many inline keyboard (inline button)
Question :
Where can I read bout Inline-keyboard?
Answer :
Here is document
Question :
Any source example?
Answer:
Yes , Here is some example
Upvotes: 3