Loads the generated WAM event and global definitions derived from Baileys rc9.
Summary
Functions
Fetch all loaded WAM definitions.
Fetch one event definition by name.
Fetch one event definition by name, raising on unknown names.
Fetch one global definition by name.
Fetch one global definition by name, raising on unknown names.
Types
@type event_definition() :: %{ id: non_neg_integer(), weight: integer(), wam_channel: String.t(), private_stats_id_int: integer() | nil, props: %{optional(String.t()) => prop_definition()} }
@type global_definition() :: %{ id: non_neg_integer(), type: term(), validator: String.t() | nil, channels: [String.t()] }
@type prop_definition() :: %{id: non_neg_integer(), type: term()}
Functions
@spec all() :: %{ events: %{required(String.t()) => event_definition()}, globals: %{required(String.t()) => global_definition()} }
Fetch all loaded WAM definitions.
@spec event(String.t() | atom()) :: {:ok, event_definition()} | {:error, :unknown_event}
Fetch one event definition by name.
@spec event!(String.t() | atom()) :: event_definition()
Fetch one event definition by name, raising on unknown names.
@spec global(String.t() | atom()) :: {:ok, global_definition()} | {:error, :unknown_global}
Fetch one global definition by name.
@spec global!(String.t() | atom()) :: global_definition()
Fetch one global definition by name, raising on unknown names.