I´m developing a telegram bot in c#. Using the class TelegramBotClient in Telegram.Bot library.
TelegramBotClient
Telegram.Bot
I want to create a pop-up notification after click on a InlineKeyboardButton.
InlineKeyboardButton
Does anyone know how to do it? Thank you very much.
I want to create something similar to this image:
2
I have done in python:
bot.answer_callback_query(call.id, "THIS IS AN ALERT", show_alert=True)
you have it in doc: https://core.telegram.org/bots/api#answercallbackquery
the parameter is show_alert
Just use method AnswerCallbackQueryAsync with optional "show alert" parameter in true, like this:
await botClient.AnswerCallbackQueryAsync(e.CallbackQuery.Id, "Notification already enabled", true);
Click here to cancel reply.
2
Answers
I have done in python:
you have it in doc: https://core.telegram.org/bots/api#answercallbackquery
the parameter is show_alert
Just use method AnswerCallbackQueryAsync with optional "show alert" parameter in true, like this: