Slacks v0.0.1 Slack.Bot behaviour View Source
Options
token
(required), the bot Slack token.
Link to this section Summary
Functions
Options
token
(required), the bot Slack token.
Connect to the API rtm with the given token.
Link to this section Functions
Link to this macro
__using__(opts \\ []) View Source (macro)
Options
token
(required), the bot Slack token.
Link to this function
connect(token)
View Source
connect(token)
View Source
connect(String.t()) :: {:ok, Slack.Bot.Credentials.t()} | {:error, atom()}
connect(String.t()) :: {:ok, Slack.Bot.Credentials.t()} | {:error, atom()}
Connect to the API rtm with the given token.
Returns bot credentials.
Link to this function
start_link(opts \\ []) View Source
Link to this section Callbacks
Link to this callback
handle_event(event, conn, state)
View Source
handle_event(event, conn, state)
View Source
handle_event(event :: map(), conn :: Slack.Bot.Conn.t(), state :: any()) ::
:ok | {:ok, new_state :: any()}
handle_event(event :: map(), conn :: Slack.Bot.Conn.t(), state :: any()) :: :ok | {:ok, new_state :: any()}
Link to this callback
handle_info(message, conn, state)
View Source
handle_info(message, conn, state)
View Source
handle_info(message :: term(), conn :: Slack.Bot.Conn.t(), state :: any()) ::
:ok | {:ok, new_state :: any()}
handle_info(message :: term(), conn :: Slack.Bot.Conn.t(), state :: any()) :: :ok | {:ok, new_state :: any()}
Link to this callback