diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs
index cee8c00..d4906a8 100644
--- a/TLSharp.Core/TelegramClient.cs
+++ b/TLSharp.Core/TelegramClient.cs
@@ -434,6 +434,69 @@ namespace TLSharp.Core
.ConfigureAwait(false);
}
+ ///
+ /// Authenticates a Bot
+ ///
+ /// The token of the bot to authenticate
+ ///
+ /// The TLUser descriptor
+ public async Task MakeAuthBotAsync(string botAuthToken, CancellationToken token = default(CancellationToken))
+ {
+ if (String.IsNullOrWhiteSpace(botAuthToken))
+ {
+ throw new ArgumentNullException(nameof(botAuthToken));
+ }
+
+ var request = new TLRequestImportBotAuthorization() { BotAuthToken = botAuthToken, ApiId = apiId, ApiHash = apiHash };
+
+ await RequestWithDcMigration(request, token).ConfigureAwait(false);
+
+ OnUserAuthenticated(((TLUser)request.Response.User));
+
+ return ((TLUser)request.Response.User);
+ }
+
+ ///
+ /// Gets the full information of a specified chat
+ ///
+ /// The ID of the chat we want the info of
+ ///
+ ///
+ public async Task GetFullChat(int chatId, CancellationToken token = default(CancellationToken))
+ {
+ var req = new TLRequestGetFullChat() { ChatId = chatId };
+ var fchat = await SendRequestAsync(req).ConfigureAwait(false);
+
+ return fchat;
+ }
+
+ ///
+ /// Gets the list of chats opened by the authenticated user.
+ /// Throws an exception if the authenticated user is a bot.
+ ///
+ ///
+ /// The list of chats opened by the authenticated user
+ public async Task GetAllChats(CancellationToken token = default(CancellationToken))
+ {
+ return await GetAllChats(null, token);
+ }
+
+ ///
+ /// Gets the list of chats opened by the authenticated user except the passed ones.
+ /// Throws an exception if the authenticated user is a bot.
+ ///
+ /// The IDs of the chats that we don't want to be returned
+ ///
+ /// The list of chats opened by the authenticated user
+ public async Task GetAllChats(int[] exceptIds = null, CancellationToken token = default(CancellationToken))
+ {
+ var ichats = new TeleSharp.TL.TLVector(); // we can't pass a null argument to the TLRequestGetChats
+ if (exceptIds != null)
+ Array.ForEach(exceptIds, x => ichats.Add(x));
+ var chatInfo = await SendRequestAsync(new TLRequestGetChats() { Id = ichats }).ConfigureAwait(false);
+ return chatInfo;
+ }
+
///
/// Serch user or chat. API: contacts.search#11f812d8 q:string limit:int = contacts.Found;
///