command

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommands

func GetCommands(slackClient client.SlackClient, cfg config.Config, logger *logrus.Logger) *bot.Commands

GetCommands returns the list of default command which are available

func NewAddButtonCommand added in v1.3.0

func NewAddButtonCommand(slackClient client.SlackClient, cfg config.Server) bot.Command

NewAddButtonCommand is more or less internal command to add a link button to the posted message

func NewAddLinkCommand

func NewAddLinkCommand(slackClient client.SlackClient) bot.Command

NewAddLinkCommand is more or less internal command to add a link button to the posted message

func NewDelayCommand

func NewDelayCommand(slackClient client.SlackClient) bot.Command

NewDelayCommand delays the command execution by the given time

func NewHelpCommand

func NewHelpCommand(slackClient client.SlackClient, commands *bot.Commands) bot.Command

NewHelpCommand provides information about all registered commands with description and examples

func NewMacroCommand

func NewMacroCommand(slackClient client.SlackClient, macros []config.Macro, logger *logrus.Logger) bot.Command

NewMacroCommand defines custom commands by defining a trigger (regexp) and a list of commands which should be executed it also supports placeholders by {{ .param }} using the regexp group name

func NewRandomCommand

func NewRandomCommand(slackClient client.SlackClient) bot.Command

NewRandomCommand will reply a random entry

func NewReactionCommand

func NewReactionCommand(slackClient client.SlackClient) bot.Command

NewReactionCommand simply adds a reaction to the current message...used in "macros" and other internal commands

func NewReplyCommand

func NewReplyCommand(slackClient client.SlackClient) bot.Command

NewReplyCommand is a command to reply a message in current thread/channel

func NewRetryCommand

func NewRetryCommand(slackClient client.SlackClient) bot.Command

NewRetryCommand store the history of the commands of the user sent to the bot in a local storage With "retry" the most recent command of the channel will be repeated

func NewSendMessageCommand

func NewSendMessageCommand(slackClient client.SlackClient) bot.Command

NewSendMessageCommand is able to send a message to any user/channel

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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