Audit log types, action type mappings, and pagination helpers.
Summary
Functions
Converts an integer action type to an atom. Returns :unknown for unrecognized types.
Converts an atom action type to its integer value. Returns nil if not found.
Returns all known action types as a map of integer => atom.
Returns a lazy Stream that paginates through audit log entries.
Uses snowflake-based before pagination via Stream.resource/3.
Stops when a page returns fewer entries than per_page.
Functions
Converts an integer action type to an atom. Returns :unknown for unrecognized types.
Converts an atom action type to its integer value. Returns nil if not found.
Returns all known action types as a map of integer => atom.
@spec stream( String.t() | integer(), keyword() ) :: Enumerable.t()
Returns a lazy Stream that paginates through audit log entries.
Uses snowflake-based before pagination via Stream.resource/3.
Stops when a page returns fewer entries than per_page.
Options
Same as EDA.API.Guild.audit_log/2 plus:
:per_page— entries per page (default 50, max 100)
Example
EDA.AuditLog.stream("guild_id", action_type: EDA.AuditLog.action_type(:member_ban_add))
|> Stream.take(200)
|> Enum.to_list()