Slug v0.1.1 Slug.Bot behaviour
This module can be use
-d into a module in order to define a Slack bot.
It also includes functions for sending messages and events from a bot to
a slack channel.
Link to this section Summary
Functions
Sends an arbitrary JSON payload to Slack from a bot
Sends a message from a bot to a channel, identified by id
Sends a message from a bot to a channel, identified by name
Link to this section Types
Link to this section Functions
Sends an arbitrary JSON payload to Slack from a bot.
Example
Slug.Bot.send_event(MyBot, %{type: "message", channel: "C0G9QF9GW", text: "Hello world"})
Link to this function
send_text(bot, channel_id, text)
Sends a message from a bot to a channel, identified by id.
Example
Slug.Bot.send_text(MyBot, "C0G9QF9GW", "Hello world")
Link to this function
send_to_channel(bot, channel_name, msg)
Sends a message from a bot to a channel, identified by name.
Example
Slug.Bot.send_to_channel(MyBot, "general", "Hello world")