mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
added methods to get the participants of a group/channel
This commit is contained in:
parent
65ff8ccbc1
commit
3721e8cfee
|
|
@ -73,6 +73,8 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Network\Requests\AckRequest.cs" />
|
||||
<Compile Include="Network\Requests\PingRequest.cs" />
|
||||
<Compile Include="Types\DataCenterIPVersions.cs" />
|
||||
<Compile Include="Types\ParticipantTypes.cs" />
|
||||
<Compile Include="Utils\UploadHelper.cs" />
|
||||
<Compile Include="Session.cs" />
|
||||
<Compile Include="TelegramClient.cs" />
|
||||
|
|
@ -88,9 +90,7 @@
|
|||
<Name>TeleSharp.TL</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Types\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
|||
|
|
@ -18,13 +18,18 @@ using TLSharp.Core.Exceptions;
|
|||
using TLSharp.Core.MTProto.Crypto;
|
||||
using TLSharp.Core.Network;
|
||||
using TLSharp.Core.Network.Exceptions;
|
||||
using TLSharp.Core.Types;
|
||||
using TLSharp.Core.Utils;
|
||||
using TLAuthorization = TeleSharp.TL.Auth.TLAuthorization;
|
||||
using TLRequestUpdateUsername = TeleSharp.TL.Account.TLRequestUpdateUsername;
|
||||
|
||||
namespace TLSharp.Core
|
||||
{
|
||||
public class TelegramClient : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// When pagination is needed, this is the default page size
|
||||
/// </summary>
|
||||
public const int DEFAULT_PAGE_SIZE = 200;
|
||||
|
||||
private MtProtoSender sender;
|
||||
|
|
@ -265,7 +270,7 @@ namespace TLSharp.Core
|
|||
|
||||
public async Task<bool> CheckUsernameAsync(string username, CancellationToken token = default(CancellationToken))
|
||||
{
|
||||
var req = new TLRequestCheckUsername { Username = username };
|
||||
var req = new TeleSharp.TL.Account.TLRequestCheckUsername { Username = username };
|
||||
|
||||
return await SendAuthenticatedRequestAsync<bool>(req, token)
|
||||
.ConfigureAwait(false);
|
||||
|
|
|
|||
16
TLSharp.Core/Types/ParticipantTypes.cs
Normal file
16
TLSharp.Core/Types/ParticipantTypes.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
namespace TLSharp.Core.Types
|
||||
{
|
||||
public enum ParticipantTypes
|
||||
{
|
||||
Recents,
|
||||
Restricted,
|
||||
Admins,
|
||||
Bots,
|
||||
Search,
|
||||
Contacts,
|
||||
Kicked,
|
||||
Banned
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue