Class LegacyGuildPruneCountSpec

java.lang.Object
discord4j.core.spec.legacy.LegacyGuildPruneCountSpec
All Implemented Interfaces:
LegacySpec<Multimap<String,Object>>

public class LegacyGuildPruneCountSpec extends Object implements LegacySpec<Multimap<String,Object>>
LegacySpec used to retrieve the number of members that would be removed in a prune operation.
See Also:
  • Constructor Details

    • LegacyGuildPruneCountSpec

      public LegacyGuildPruneCountSpec()
  • Method Details

    • setDays

      public LegacyGuildPruneCountSpec setDays(int days)
      Set the number of days to count prune for.
      Parameters:
      days - the number of days
      Returns:
      this spec
    • addRole

      public LegacyGuildPruneCountSpec addRole(Snowflake roleId)
      Include a role in the prune count 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
      Returns:
      this spec
    • addRoles

      public LegacyGuildPruneCountSpec addRoles(Collection<Snowflake> roleIds)
      Include multiple roles in the prune count 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
      Returns:
      this spec
    • asRequest

      public Multimap<String,Object> asRequest()
      Specified by:
      asRequest in interface LegacySpec<Multimap<String,Object>>