* Answer callback query (inline button press) * This stops the loading indicator on the button and optionally shows a message * https://core.telegram.org/bots/api#answercallbackquery
(callbackQueryId, text = null)
| 160 | * https://core.telegram.org/bots/api#answercallbackquery |
| 161 | */ |
| 162 | async function answerCallbackQuery (callbackQueryId, text = null) { |
| 163 | const data = { |
| 164 | callback_query_id: callbackQueryId |
| 165 | } |
| 166 | if (text) { |
| 167 | data.text = text |
| 168 | } |
| 169 | return (await fetch(apiUrl('answerCallbackQuery', data))).json() |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * Handle incoming callback_query (inline button press) |
no test coverage detected