Clover v0.1.0 Clover.Robot behaviour View Source

A Robot.

Link to this section Summary

Link to this section Types

Link to this type actions() View Source
actions() :: [action()]
Link to this type message_action() View Source
message_action() :: :send | :reply | :emote
Link to this type message_handler() View Source
message_handler() :: Clover.MessageHandler.t()
Link to this type state() View Source
state() :: :normal

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor in Elixir v1.6+.

Link to this function connected(robot_name, connection_state) View Source
Link to this function handle_in(robot_name, message) View Source
Link to this function send(robot_name, message) View Source
send(atom() | pid() | {atom(), any()} | {:via, atom(), any()}, any()) :: :ok
Link to this function start_link(mod, name, opts \\ []) View Source

Link to this section Callbacks

Link to this callback handle_connected(connection_state, data) View Source
handle_connected(connection_state :: map(), data :: data()) ::
  {:ok, data()} | {:error, Clover.Error}
Link to this callback message_handlers() View Source (optional)
message_handlers() :: [message_handler()]