Answer the question
In order to leave comments, you need to log in
sendMessage method. How to send a keyboard that, when one button is clicked, sends a great message?
https://core.telegram.org/bots/api#sendmessage
There is a reply_markup where you can send a keyboard.
I want that when sending ReplyKeyboardMarkup one thing is written, and another message is sent.
In other words, I want to click on the stars, and what would go 5 for example.
Answer the question
In order to leave comments, you need to log in
If I understood you correctly, then you want to send numbers from 1 to 5 when clicking on the stars, depending on which star is clicked on?
if yes, then in the form in which you want to get it on ReplyKeyboardMarkup, this cannot be done in principle,
but for InlineKeyboardMarkup, this option is possible - make the last line 5 buttons with asterisks, setting a number from 1 to 5 through CallBackData for each of the asterisks, which and will be sent to the bot when the button is clicked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question