Table of Contents

Method GetPruneCountAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetPruneCountAsync(int, IEnumerable<DiscordRole>?)

Estimates the number of users to be pruned.

public Task<int> GetPruneCountAsync(int days = 7, IEnumerable<DiscordRole>? includedRoles = null)

Parameters

days int

Minimum number of inactivity days required for users to be pruned. Defaults to 7.

includedRoles IEnumerable<DiscordRole>

The roles to be included in the prune.

Returns

Task<int>

Number of users that will be pruned.

Exceptions

UnauthorizedException

Thrown when the client does not have the KickMembers permission.

NotFoundException

Thrown when the guild does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.