-update on FormBase which should prevent issues on control management

This commit is contained in:
FlorianDahn
2019-12-02 03:46:40 +01:00
parent 7be0f15ca4
commit a08ba8f512
13 changed files with 182 additions and 31 deletions
+20
View File
@@ -492,6 +492,26 @@ namespace TelegramBotBase.Sessions
return await this.Client.TelegramClient.SendTextMessageAsync(this.DeviceId, requestMessage, replyMarkup: rcl);
}
public async Task<Message> HideReplyKeyboard(String closedMsg = "Closed", bool autoDeleteResponse = true)
{
try
{
var m = await this.Send(closedMsg, new ReplyKeyboardRemove());
if (autoDeleteResponse && m != null)
{
await this.DeleteMessage(m);
}
return m;
}
catch
{
}
return null;
}
/// <summary>
/// Deletes a message
/// </summary>