slack

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package slack implements Slack handlers for github.com/go-chat-bot/bot This is a fork of github.com/go-chat-bot/bot/slack

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindUserBySlackID

func FindUserBySlackID(userID string) *bot.User

FindUserBySlackID converts a slack.User into a bot.User struct

func Run

func Run(token string)

Run connects to slack RTM API using the provided token

func RunWithFilter

func RunWithFilter(token string, customMessageFilter MessageFilter)

RunWithFilter executes the bot and sets up a message filter which will receive all the messages before they are sent to slack

Types

type MessageFilter

type MessageFilter func(string, *bot.User) []slack.MsgOption

MessageFilter allows implementing a filter function to transform the messages before sending to the channel, it is run before the bot sends the message to slack

Jump to

Keyboard shortcuts

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