New ConfirmAction method

This commit is contained in:
FlorianDahn 2021-11-26 17:49:33 +01:00
parent 2aee486370
commit e9c25ea9e4

View File

@ -140,6 +140,23 @@ namespace TelegramBotBase.Sessions
}
/// <summary>
/// Confirm incomming action (i.e. Button click)
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public async Task ConfirmAction(String CallbackQueryId, String message = "", bool showAlert = false, String urlToOpen = null)
{
try
{
await this.Client.TelegramClient.AnswerCallbackQueryAsync(CallbackQueryId, message, showAlert, urlToOpen);
}
catch
{
}
}
/// <summary>
/// Edits the text message
/// </summary>