/// <summary> /// Deletes a user from a chat and sends a service message on it. /// </summary> /// <param name="chatId">Chat's identifier</param> /// <param name="user">User ID to be deleted</param> /// <returns> /// Returns a <see cref="IUpdates"/> object containing a service message sent during the action. /// </returns> public async Task <IUpdates> DeleteChatUser(int chatId, IInputUser user) { EnsureUserAuthorized(); var request = new RequestDeleteChatUser { ChatId = chatId, UserId = user }; return(await SenderService.SendRequestAsync(request).ConfigureAwait(false)); }
/// <inheritdoc /> public async Task <IUpdates> DeleteChatUser(int chatId, IInputUser user, CancellationToken cancellationToken = default(CancellationToken)) { ClientSettings.EnsureUserAuthorized(); var request = new RequestDeleteChatUser { ChatId = chatId, UserId = user }; return(await RequestSender.SendRequestAsync(request, cancellationToken).ConfigureAwait(false)); }