Class AuditLogPart

java.lang.Object
discord4j.core.object.audit.AuditLogPart

public class AuditLogPart extends Object
A part of a guild's audit logs. This holds all of the webhooks, users, and audit log entries for a portion of a guild's audit log.
  • Constructor Details

    • AuditLogPart

      public AuditLogPart(long guildId, GatewayDiscordClient gateway, discord4j.discordjson.json.AuditLogData data)
  • Method Details

    • getAutoModRules

      public List<AutoModRule> getAutoModRules()
      Get the auto mod rules that are involved in the entries of this portion of the audit log.
      Returns:
      The auto mod rules that are involved in the entries of this portion of the audit log.
    • getWebhooks

      public Set<Webhook> getWebhooks()
      Get the webhooks that are involved in the entries of this portion of the audit log.
      Returns:
      The webhooks that are involved in the entries of this portion of the audit log.
    • getUsers

      public Set<User> getUsers()
      Get the users that are involved in the entries of this portion of the audit log.
      Returns:
      The users that are involved in the entries of this portion of the audit log.
    • getEntries

      public List<AuditLogEntry> getEntries()
      Gets the entries in this portion of the audit log.
      Returns:
      The entries in this portion of the audit log.
    • getWebhookById

      public Optional<Webhook> getWebhookById(Snowflake webhookId)
      Gets a webhook involved in the entries of this portion of the audit log by ID.
      Parameters:
      webhookId - The ID of the webhook.
      Returns:
      The webhook with the given ID, if present.
    • getUserById

      public Optional<User> getUserById(Snowflake userId)
      Gets a user involved in the entries of this portion of the audit log by ID.
      Parameters:
      userId - The ID of the user.
      Returns:
      The user with the given ID, if present.
    • getGuildId

      public Snowflake getGuildId()
      Gets the ID of the guild associated with this audit log.
      Returns:
      The ID of the guild associated with this audit log.
    • combine

      public AuditLogPart combine(AuditLogPart other)
      Combines this portion of the audit log with another portion.
      Parameters:
      other - The other portion to combine with.
      Returns:
      A new AuditLogPart that contains all of the webhooks, users, and entries from both parts.