View Source Slack.Bot behaviour (Slack Elixir v1.0.1)

The Slack Bot.

Summary

Callbacks

Handle the event from Slack. Return value is ignored.

Functions

Send a message to a channel.

Types

@type t() :: %Slack.Bot{
  bot_id: String.t(),
  bot_module: module(),
  team_id: String.t(),
  user_id: String.t()
}

Callbacks

Link to this callback

handle_event(type, payload)

View Source
@callback handle_event(type :: String.t(), payload :: map()) :: any()

Handle the event from Slack. Return value is ignored.

Functions

Link to this macro

send_message(channel, message)

View Source (macro)
@spec send_message(String.t(), String.t() | map()) :: Macro.t()

Send a message to a channel.

The message can be just the message text, or a map/0 of properties that are accepted by Slack's chat.postMessage API endpoint.