Update DeviceSession.cs
- adding Unban method
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user