Export Audit Logs

Export Audit Logs

⚠️

This command may take several minutes to run.

This command (export_audit_logs) exports the audit log history from a server to a CSV file.

Permissions

Bot Permissions

  • The bot must have the VIEW_AUDIT_LOG permission.
  • The bot must have the ATTACH_FILES permission.

Parameters

event_id

Optional. If present, will filter audit logs to only include the event specified. Must be a valid number. The list of numbers, along with their associated definitions, can be found in Discord's developer documentation (opens in a new tab).

executor

Optional. If present, will filter audit logs to only include events initiated by the user specified. Stacks with event_id (i.e. if both are present, will only return records that meet both criteria).

ephemeral

Optional. Whether other server members should be able to see the bot's response. Does not affect logging.

Cooldown

Like other commands, cooldowns operate at the server level. The cooldown values are:

BasicStandardAdvanced
1 week4 days2 days