The Slack Bot.
Handle the event from Slack. Return value is ignored.
Send a message to a channel.
@type t() :: %Slack.Bot{ id: String.t(), module: module(), team_id: String.t(), token: String.t(), user_id: String.t() }
@callback handle_event(type :: String.t(), payload :: map(), t()) :: any()
@spec send_message(String.t(), String.t() | map()) :: Macro.t()
The message can be just the message text, or a map/0 of properties that are accepted by Slack's chat.postMessage API endpoint.
message
map/0
chat.postMessage