audit_log_get
Retrieve Discord server audit logs to investigate actions like member kicks, with optional filters for user, action type, and pagination.
Instructions
Purpose: Fetch audit log entries for a guild.
When to use: investigate "who kicked X?", post-incident forensics.
Example: {guild_id:"999000999000999000", limit:50, action_type:20} (action_type 20 = MEMBER_KICK)
Pagination: pass before as the last entry's oldest_id to fetch older entries. Discord returns entries in descending ID order; repeat until a page is empty.
Returns: {entries:[{id, target_id, user_id, action_type, reason}], count, oldest_id?}. Structured reason values remain raw moderator-controlled data; the human-readable text response fences them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max entries (1-100, default 50) | |
| before | No | Return entries with ID less than this entry ID | |
| user_id | No | Filter to entries triggered by this user | |
| guild_id | Yes | Guild to query | |
| action_type | No | Filter by Discord audit action type |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||