roles: roles.Select(x => x.Id).Where(x => x != serverId));
}
public Task<EditUserResponse> EditProfile(string currentPassword = "",
public Task KickUser(User user)
{
if (user == null) throw new ArgumentNullException(nameof(user));
return _api.KickUser(user.Server?.Id, user.Id);
}
public Task BanUser(User user)
{
if (user == null) throw new ArgumentNullException(nameof(user));
return _api.BanUser(user.Server?.Id, user.Id);
}
public Task UnbanUser(Server server, string userId)
{
if (server == null) throw new ArgumentNullException(nameof(server));
if (userId == null) throw new ArgumentNullException(nameof(userId));
return _api.UnbanUser(server.Id, userId);
}
public async Task<int> PruneUsers(string serverId, int days, bool simulate = false)
{
if (serverId == null) throw new ArgumentNullException(nameof(serverId));
if (days <= 0) throw new ArgumentOutOfRangeException(nameof(days));
CheckReady();
var response = await _api.PruneUsers(serverId, days, simulate);
return response.Pruned ?? 0;
}
/// <summary>When Config.UseLargeThreshold is enabled, running this command will request the Discord server to provide you with all offline users for a particular server.</summary>
public void RequestOfflineUsers(string serverId)
{
if (serverId == null) throw new ArgumentNullException(nameof(serverId));
_dataSocket.SendGetUsers(serverId);
}
public Task EditProfile(string currentPassword = "",
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.