helpers

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddReaction

func AddReaction(api slack.Client, channel, plugin, reaction, timestamp string)

AddReaction adds a reaction to a message and logs any error using zerolog with consistent structured fields.

func FindChannelByName added in v0.8.0

func FindChannelByName(api slack.Client, name string) (slack.Channel, error)

FindChannelByName searches all conversations for a channel whose NameNormalized matches name, handling pagination internally. Returns the matching channel or an error if not found or if any API call fails.

func GetJoinedChannels added in v0.8.0

func GetJoinedChannels(api slack.Client) ([]slack.Channel, error)

GetJoinedChannels returns all conversations the bot is currently a member of. Pagination is handled internally.

func JoinChannelByName added in v0.8.0

func JoinChannelByName(api slack.Client, name string) error

JoinChannelByName finds the channel with the given name and joins it. Pagination is handled internally. Returns an error if the channel is not found or if any API call fails.

func PostMessage

func PostMessage(api slack.Client, channel, plugin string, options ...slack.MsgOption) (string, string)

PostMessage sends a Slack message to the given channel and logs any error using zerolog with consistent structured fields.

func ThreadReplyOption

func ThreadReplyOption(threadTS string) slack.MsgOption

ThreadReplyOption returns a slack.MsgOptionTS for threading replies when the given threadTS is non-empty. When threadTS is empty (i.e. the triggering message was not in a thread), a no-op MsgOption is returned so callers can include it unconditionally.

Types

This section is empty.

Jump to

Keyboard shortcuts

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