crux_structs v0.2.3 Crux.Structs.AuditLogEntry View Source
Represents a Discord Audit Log Entry Object.
Link to this section Summary
Functions
Creates a t:Crux.Structs.AuditLogEntry.t/0 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
Specs
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 | :member_move | :member_disconnect | :bot_add | :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 | :message_bulk_delete | :message_pin | :message_unpin | :integration_create | :integration_update | :integration_delete
Union type of audit log event name atoms.
Specs
t() :: %Crux.Structs.AuditLogEntry{
action_type: non_neg_integer(),
changes: %{required(String.t()) => Crux.Structs.AuditLogChange.t()},
id: Crux.Structs.Snowflake.t(),
options: %{} | nil,
reason: String.t() | nil,
target_id: Crux.Structs.Snowflake.t(),
user_id: Crux.Structs.Snowflake.t()
}
Link to this section Functions
Specs
Creates a t:Crux.Structs.AuditLogEntry.t/0 struct from raw data.
Automatically invoked by
Crux.Structs.create/2.
Specs
event_name(action_type :: non_neg_integer()) :: atom()
Gets the event name from the action type id
Specs
events() :: %{required(event_name()) => non_neg_integer()}
Returns a map of all audit log event names with their id