Class LegacyGuildPruneSpec

    • Constructor Detail

      • LegacyGuildPruneSpec

        public LegacyGuildPruneSpec()
    • Method Detail

      • setDays

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

        public LegacyGuildPruneSpec addRole​(Snowflake roleId)
        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

        public LegacyGuildPruneSpec addRoles​(Collection<Snowflake> roleIds)
        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

        public LegacyGuildPruneSpec setComputePruneCount​(boolean enable)
        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 to false.
        Parameters:
        enable - whether the pruned total is returned, if false, the prune action will eventually complete with an empty Mono.
        Returns:
        this spec