Crux v2020-03-17 17:55:51Z Crux.Structs.AuditLogEntry View Source

Represents a Discord Audit Log Object

Link to this section Summary

Types

Union type of audit log event name atoms.

t()

Functions

Creates a 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

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
  | :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.

Link to this type

t() View Source (since 0.1.6)
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

Link to this function

create(data) View Source (since 0.1.6)
create(data :: map()) :: t()

Creates a Crux.Structs.AuditLogEntry.t/0 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() :: %{required(event_name()) => non_neg_integer()}

Returns a map of all audit log event names with their id