Td: Tap on inline button

Created on 17 May 2020  路  12Comments  路  Source: tdlib/td

Hello , how can we tap on inline keyboard in telegram-bot ??

All 12 comments

i think you need to try getCallbackQueryAnswer 馃

i think you need to try getCallbackQueryAnswer 馃

Capture

I mean how to select on of these buttons in inline mode ?

chat_id,message_id you know payload is data of button

chat_id,message_id you know payload is data of button

I dont know what is payload would you please explain it for me ?

see here https://core.telegram.org/bots/api#inlinekeyboardbutton
callback_data is the payload

see here https://core.telegram.org/bots/api#inlinekeyboardbutton callback_data is the payload

would you please show me an example to how to use payload ?? i mean as callback_data what should i set ?

in your example did you make the inline button using normal bot api or tdlib ?
if its tdlib then you need to see this https://github.com/tdlib/td/blob/f2cb3afaef62f2dba2a0dc3dc63e374beabcb2df/td/generate/scheme/td_api.tl#L771 data param
if its normal bot api see this https://core.telegram.org/bots/api#inlinekeyboardbutton callback_data param

in your example did you make the inline button using normal bot api or tdlib ? if its tdlib then you need to see this https://github.com/tdlib/td/blob/f2cb3afaef62f2dba2a0dc3dc63e374beabcb2df/td/generate/scheme/td_api.tl#L771 data param if its normal bot api see this https://core.telegram.org/bots/api#inlinekeyboardbutton callback_data param

i use cli bot with telegram-bot and i want to tap on a button of inline message with my cli bot

can you post here example code you are using to send the message with the button?

when you receive a message that has inline buttons then you need to check the reply_markup of the message which contains replyMarkupInlineKeyboard https://github.com/tdlib/td/blob/f2cb3afaef62f2dba2a0dc3dc63e374beabcb2df/td/generate/scheme/td_api.tl#L806 inside the replyMarkupInlineKeyboard for each button there is inlineKeyboardButton https://github.com/tdlib/td/blob/f2cb3afaef62f2dba2a0dc3dc63e374beabcb2df/td/generate/scheme/td_api.tl#L771 which contains the data of button. If you want to click/tap on the button you need to put that data inCallbackQueryPayload then use that ingetCallbackQueryAnswer https://github.com/tdlib/td/blob/f2cb3afaef62f2dba2a0dc3dc63e374beabcb2df/td/generate/scheme/td_api.tl#L3595

its hard to explain if you don't know basics of .tl 馃

Hello , how can we tap on inline keyboard in telegram-bot ??

https://stackoverflow.com/questions/56923326/how-to-answer-on-replymarkup-using-telegram-java-tdapi

try this. maybe u know how to tap on ReplyKeyboardMarkup button?)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikolayozhogov picture nikolayozhogov  路  5Comments

IRGC picture IRGC  路  4Comments

devxpy picture devxpy  路  5Comments

RadRussianRus picture RadRussianRus  路  3Comments

kossnocorp picture kossnocorp  路  3Comments