tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

How to send inline queries #2547

Closed hui87667137 closed 1 year ago

hui87667137 commented 1 year ago

I am developing a chat feature using Tdlib - Java. I have encountered an issue where a bot sends me content similar to the following:

InlineKeyboardButton {
text = "hello"
type = InlineKeyboardButtonTypeCallback {
data = bytes [4] { 61 61 61 61 }
}
}

How can I simulate the behavior of the official Telegram app to click this button and initiate a query?

levlam commented 1 year ago

Use the method getCallbackQueryAnswer.

hui87667137 commented 1 year ago

Thanks