Package discord4j.core.spec.legacy
Class LegacyGuildPruneSpec
java.lang.Object
discord4j.core.spec.legacy.LegacyGuildPruneSpec
- All Implemented Interfaces:
LegacyAuditSpec<Multimap<String,
,Object>> LegacySpec<Multimap<String,
Object>>
public class LegacyGuildPruneSpec
extends Object
implements LegacyAuditSpec<Multimap<String,Object>>
LegacySpec used to begin a prune operation.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionInclude a role in the prune request.addRoles
(Collection<Snowflake> roleIds) Include multiple roles in the prune request.Returns the current audit log reason set on the spec.setComputePruneCount
(boolean enable) Set whether the number of pruned members is returned when this actions completes.setDays
(int days) Set the number of days to prune.Sets the reason to show in the audit logs when the spec is built.
-
Constructor Details
-
LegacyGuildPruneSpec
public LegacyGuildPruneSpec()
-
-
Method Details
-
setDays
Set the number of days to prune.- Parameters:
days
- the number of days- Returns:
- this spec
-
addRole
Include a role in the prune request. By default, prune will not remove users with roles, therefore this method can be used to include such users.- Parameters:
roleId
- the role ID to include for prune- Returns:
- this spec
-
addRoles
Include multiple roles in the prune request. By default, prune will not remove users with roles, therefore this method can be used to include such users.- Parameters:
roleIds
- the role IDs to include for prune- Returns:
- this spec
-
setComputePruneCount
Set whether the number of pruned members is returned when this actions completes. By default this is enabled, but this is discouraged on large guilds so you can set it tofalse
.- Parameters:
enable
- whether the pruned total is returned, iffalse
, the prune action will eventually complete with an emptyMono
.- Returns:
- this spec
-
setReason
Description copied from interface:LegacyAuditSpec
Sets the reason to show in the audit logs when the spec is built.- Specified by:
setReason
in interfaceLegacyAuditSpec<Multimap<String,
Object>> - Parameters:
reason
- The audit log reason.- Returns:
- This spec.
-
getReason
Description copied from interface:LegacyAuditSpec
Returns the current audit log reason set on the spec.- Specified by:
getReason
in interfaceLegacyAuditSpec<Multimap<String,
Object>> - Returns:
- The current audit log reason.
-
asRequest
- Specified by:
asRequest
in interfaceLegacySpec<Multimap<String,
Object>>
-