Update DeviceSession.cs
- adding Unban method
This commit is contained in:
@@ -135,6 +135,7 @@ namespace TelegramBotBase.Sessions
|
|||||||
this.ActiveForm.Device = this;
|
this.ActiveForm.Device = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Edits the text message
|
/// Edits the text message
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// Eventhandler for sent messages
|
/// Eventhandler for sent messages
|
||||||
|
|||||||
Reference in New Issue
Block a user