class

Autobot::Channels::SlackChannel

Inherits Autobot::Channels::Channel < Reference < Object

Slack channel using Socket Mode (WebSocket).

Features:

  • Socket Mode (no webhook/public IP needed)
  • DM handling with configurable policies
  • App mention handling in channels
  • Thread support (replies in threads for channel messages)
  • Group/channel policies (open, mention, allowlist)
  • Bot mention stripping
  • Emoji reactions on received messages

Constants

DEFAULT_REACTION_EMOJI = "eyes"
Log = ::Log.for("channels.slack")
RECONNECT_DELAY = 5.seconds
REPLY_CONTEXT_TIMEOUT = 10.seconds
SLACK_API_BASE = "https://slack.com/api"

Constructors

new(bus : Bus::MessageBus, bot_token : String, app_token : String, allow_from : Array(String) = [] of String, group_policy : String = "mention", group_allow_from : Array(String) = [] of String, dm_config : Config::SlackDMConfig = Config::SlackDMConfig.new)
Source

Instance methods

send_message(message : Bus::OutboundMessage) : Nil

Send an outbound message through this channel.

Source
start

Start the channel and begin listening for messages.

Source
stop

Stop the channel and clean up resources.

Source