user3702922
user3702922

Reputation: 21

Visual indication for inline buttons

Is there a way to show some visual indication that the inline button has been pressed in telegram bot.

I have a bit which send inline keyboard, and when I press each buttons it works perfectly fine, but there is a slight delay in getting response from the server. As there is no visual indication to show if a button has been pressed, it is confusing for uses to know if the button was pressed and end up pressing the same button several times.

Upvotes: 1

Views: 1781

Answers (2)

Vahid Msm
Vahid Msm

Reputation: 1082

As an alternative way, after you got the callback response at your server, you can use Emoji for showing feedback to your users. Just edit the inline message and edit some relative emoji to the button text.

Upvotes: 1

aleix
aleix

Reputation: 277

there are different types of inline buttons in Telegram:

  • Opens URL (with url).
  • Forward a message (with switch_inline_query).
  • Insert query at the chat (with switch_inline_query_current_chat).
  • Button with action (with callback_data).

I suppose you are refering to the last type of button, in that case, if a user press a button you will get the callback_data via CallbackQuery, and that lets you modify the original message with editMessageText to add something like:

Button TEST pressed.

Upvotes: 3

Related Questions