Documentation
¶
Overview ¶
Package slack exposes the Slack (Socket Mode) constructor and the raw-event and client accessors for botbooter. Import it for a Slack bot; a Slack-only binary pulls in slack-go but never discordgo or go-telegram.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingConfig = slackint.ErrMissingConfig
ErrMissingConfig is returned by New when a required Config field is empty.
Functions ¶
func New ¶
New creates a Slack bot that connects via Socket Mode. It returns ErrMissingConfig if a required config field is missing.
func RawEvent ¶
func RawEvent(m *botbooter.Message) (*slackevents.MessageEvent, bool)
RawEvent returns the raw Slack message event carried on m, reporting whether m originated from Slack.
func SocketClient ¶
func SocketClient(b *botbooter.Bot) *socketmode.Client
SocketClient returns the Socket Mode client backing b, or nil if b is not a Slack bot.
Types ¶
Click to show internal directories.
Click to hide internal directories.