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