简体   繁体   中英

How can I create a pop-up notification in Telegram bot?

I´m developing a telegram bot in c#. Using the class TelegramBotClient in Telegram.Bot library.

I want to create a pop-up notification after click on a InlineKeyboardButton .

Does anyone know how to do it? Thank you very much.

I want to create something similar to this image:

在此处输入图片说明

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

只需将方法 AnswerCallbackQueryAsync 与可选的“显示警报”参数一起使用,就像这样:

await botClient.AnswerCallbackQueryAsync(e.CallbackQuery.Id, "Notification already enabled", true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM