Class LegacyAuditLogQuerySpec

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

public final class LegacyAuditLogQuerySpec extends Object implements LegacySpec<Map<String,Object>>
A spec used to query audit log entries that match the specified filter.
  • Constructor Details

    • LegacyAuditLogQuerySpec

      public LegacyAuditLogQuerySpec()
  • Method Details

    • setResponsibleUser

      public LegacyAuditLogQuerySpec setResponsibleUser(Snowflake userId)
      Sets the query to only return entries where the user specified is responsible for the action.
      Parameters:
      userId - The Snowflake of the responsible user to filter by.
      Returns:
      This spec.
    • setActionType

      public LegacyAuditLogQuerySpec setActionType(ActionType actionType)
      Sets the query to return entries where the action type is the same as the one provided.
      Parameters:
      actionType - The ActionType of the audit log entries to filter by.
      Returns:
      This spec.
    • setBefore

      public LegacyAuditLogQuerySpec setBefore(Snowflake beforeId)
      Sets the query to return entries before a certain entry id.
      Parameters:
      beforeId - The Snowflake of the audit log id to filter by before of.
      Returns:
      This spec.
    • setLimit

      public LegacyAuditLogQuerySpec setLimit(int limit)
      Sets the query to return a max of entries.
      Parameters:
      limit - The limit of the audit log entries to filter by.
      Returns:
      This spec.
    • asRequest

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