audit_log_get
audit_log_get
Section titled “audit_log_get”Category: audit_log
Fetch audit log entries for a guild.
When to use
Section titled “When to use”investigate “who kicked X?”, post-incident forensics.
When NOT to use
Section titled “When NOT to use”| Field | Type | Required | Description |
|---|---|---|---|
guild_id | string | yes | Guild to query |
limit | integer | yes | Max entries (1-100, default 50) |
action_type | integer | no | Filter by Discord audit action type |
user_id | string | no | Filter to entries triggered by this user |
Returns
Section titled “Returns”\{entries:[\{id, target_id, user_id, action_type, reason\}], count\}. reason wrapped (mod-controlled).
Output schema
Section titled “Output schema”| Field | Type | Required | Description |
|---|---|---|---|
entries | array | yes | |
count | number | yes |
Annotations
Section titled “Annotations”| Property | Value |
|---|---|
| Read-only | yes |
| Destructive | no |
| Idempotent | yes |
| Open-world | yes |
| Confirmation required | no |