crux_structs v0.1.6 Crux.Structs.AuditLogEntry View Source
Represents a Discord Audit Log Object
Link to this section Summary
Functions
Creates a Crux.Structs.AuditLogEntry
struct from raw data
Gets the event name from the action type id
Returns a map of all audit log event names with their id
Link to this section Types
Link to this type
event_name()
View Source
(since 0.1.6)
event_name() :: :guild_update | :channel_create | :channel_update | :channel_delete | :channel_overwrite_create | :channel_overwrite_update | :channel_overwrite_delete | :member_kick | :member_prune | :member_ban_add | :member_ban_remove | :member_update | :member_role_update | :role_create | :role_update | :role_delete | :invite_create | :invite_update | :invite_delete | :webhook_create | :webhook_update | :webhook_delete | :emoji_create | :emoji_update | :emoji_delete | :message_delete
Union type of audit log event name atoms.
Link to this type
t()
View Source
(since 0.1.6)
t() :: %Crux.Structs.AuditLogEntry{ action_type: non_neg_integer(), changes: %{optional(String.t()) => Crux.Structs.AuditLogChange.t()}, id: Crux.Rest.snowflake(), options: %{} | nil, reason: String.t() | nil, target_id: Crux.Rest.snowflake(), user_id: Crux.Rest.snowflake() }
Link to this section Functions
Creates a Crux.Structs.AuditLogEntry
struct from raw data.
Automatically invoked by
Crux.Structs.create/2
.
Link to this function
event_name(action_type)
View Source
(since 0.1.6)
event_name(action_type :: non_neg_integer()) :: atom()
Gets the event name from the action type id
Link to this function
events()
View Source
(since 0.1.6)
events() :: %{optional(event_name()) => non_neg_integer()}
Returns a map of all audit log event names with their id