Update DeviceSession.cs

- adding Unban method
This commit is contained in:
FlorianDahn 2020-07-25 15:08:55 +02:00
parent bfd905d590
commit c00c2e8d8f

View File

@ -135,6 +135,7 @@ namespace TelegramBotBase.Sessions
this.ActiveForm.Device = this;
}
/// <summary>
/// Edits the text message
/// </summary>
@ -723,6 +724,19 @@ namespace TelegramBotBase.Sessions
}
}
public virtual async Task UnbanUser(int userId)
{
try
{
await this.Client.TelegramClient.UnbanChatMemberAsync(this.DeviceId, userId);
}
catch
{
}
}
/// <summary>
/// Eventhandler for sent messages