REST API endpoints for Discord guilds.
All functions return {:ok, result} or {:error, reason}.
Summary
Functions
Gets the audit log for a guild.
Gets channels in a guild.
Gets a guild by ID.
Gets invites for a guild.
Modifies a guild.
Begins a guild prune. This kicks members.
Gets the number of members that would be pruned.
Functions
@spec audit_log( String.t() | integer(), keyword() ) :: {:ok, %{entries: [EDA.AuditLog.Entry.t()], users: [map()], webhooks: [map()]}} | {:error, term()}
Gets the audit log for a guild.
Options
:user_id- Filter by user who performed the action:action_type- Filter by action type (integer or atom viaEDA.AuditLog.action_type/1):before- Get entries before this entry ID:after- Get entries after this entry ID:limit- Number of entries (1-100, default 50)
Gets channels in a guild.
Gets a guild by ID.
Gets invites for a guild.
Modifies a guild.
Begins a guild prune. This kicks members.
Options
:days- inactivity threshold, 1–30, default 7:compute_prune_count- whether the response reports how many were removed. Discord advisesfalseon large guilds:include_roles- role ids whose members are eligible; without it, members with any role are spared:reason- audit log reason
Accepts a keyword list or a map. An option this endpoint does not define is reported with
a warning: Discord ignores an unrecognised body field, so day: 30 prunes on the default
7 days instead — a destructive call doing more than it was asked. EDA 0.5 will refuse it.
Gets the number of members that would be pruned.