Botlead.Client.Behaviour behaviour (botlead v0.2.4)
Callback which require implementation by custom bot clients.
Link to this section Summary
Callbacks
Default state for client session.
Name generator for client session servers.
Callback for handling message delivery, replaces the current state.
Transform new message from bot into connection object. The place to put routing business logic.
Module for message routing.
Link to this section Types
Link to this type
delivery_action()
Specs
delivery_action() :: :sent | :edited | :deleted
Link to this type
message()
Specs
message() :: map()
Link to this type
state()
Specs
state() :: map()
Link to this section Callbacks
Link to this callback
get_initial_state(t, t)
Specs
Default state for client session.
Link to this callback
instance(t)
Specs
Name generator for client session servers.
Link to this callback
message_delivered(delivery_action, message, state)
Specs
message_delivered(delivery_action(), message(), state()) :: state()
Callback for handling message delivery, replaces the current state.
Link to this callback
message_to_conn(message, state, t)
Specs
message_to_conn(message(), state(), Keyword.t()) :: GenRouter.Conn.t()
Transform new message from bot into connection object. The place to put routing business logic.
Link to this callback
router()
Specs
router() :: module()
Module for message routing.