crux_structs v0.2.3 Crux.Structs.AuditLogChange View Source

Represents a Discord Audit Log Change Object.

Link to this section Summary

Types

Represents a value before or after a change.

t()

Functions

Creates a t:Crux.Structs.AuditLogChange.t/0 struct from raw data.

Link to this section Types

Link to this type

audit_log_change_value()

View Source (since 0.1.6)

Specs

audit_log_change_value() ::
  String.t()
  | Crux.Structs.Snowflake.t()
  | integer()
  | boolean()
  | [Crux.Structs.Role.t()]
  | [Crux.Structs.Overwrite.t()]

Represents a value before or after a change.

Note that the Role object returned by Discord in audit logs is a partial role that only contains id and name.

Specs

t() :: %Crux.Structs.AuditLogChange{
  key: String.t(),
  new_value: audit_log_change_value() | nil,
  old_value: audit_log_change_value() | nil
}

Link to this section Functions

Link to this function

create(data)

View Source (since 0.1.6)

Specs

create(data :: map()) :: t()

Creates a t:Crux.Structs.AuditLogChange.t/0 struct from raw data.

Automatically invoked by Crux.Structs.create/2.