slack

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 5 Imported by: 0

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 Client

func Client(b *botbooter.Bot) *slackapi.Client

Client returns the Slack Web API client backing b, or nil if b is not a Slack bot.

func New

func New(cfg Config) (*botbooter.Bot, error)

New creates a Slack bot that connects via Socket Mode. It returns ErrMissingConfig if a required config field is missing.

func RawEvent

RawEvent returns the raw Slack message event carried on m, reporting whether m originated from Slack.

func RawReaction added in v0.4.0

RawReaction returns the raw Slack reaction event carried on r, reporting whether r originated from Slack. Its Reaction field is the platform's original bare shortname ("thumbsup") behind r.Emoji's colon-wrapped ":thumbsup:".

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

type Config

type Config = slackint.Config

Config configures a Slack (Socket Mode) bot.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL