/// <summary> /// Serch user or chat. API: contacts.search#11f812d8 q:string limit:int = contacts.Found; /// </summary> /// <param name="q">User or chat name</param> /// <param name="limit">Max result count</param> /// <returns></returns> public async Task <TLFound> SearchUserAsync(string q, int limit = 10) { var r = new TeleSharp.TL.Contacts.TLRequestSearch { Q = q, Limit = limit }; return(await SendRequestAsync <TLFound>(r)); }
/// <summary> /// Serch user or chat. API: contacts.search#11f812d8 q:string limit:int = contacts.Found; /// </summary> /// <param name="q">User or chat name</param> /// <param name="limit">Max result count</param> /// <param name="token"></param> /// <returns></returns> public async Task <TLFound> SearchUserAsync(string q, int limit = 10, CancellationToken token = default(CancellationToken)) { var r = new TeleSharp.TL.Contacts.TLRequestSearch { Q = q, Limit = limit }; return(await SendRequestAsync <TLFound>(r, token).ConfigureAwait(false)); }