Documentation ¶
Index ¶
- func GetCommands(slackClient client.SlackClient, cfg config.Config, logger *logrus.Logger) *bot.Commands
- func NewAddButtonCommand(slackClient client.SlackClient, cfg config.Server) bot.Command
- func NewAddLinkCommand(slackClient client.SlackClient) bot.Command
- func NewDelayCommand(slackClient client.SlackClient) bot.Command
- func NewHelpCommand(slackClient client.SlackClient, commands *bot.Commands) bot.Command
- func NewMacroCommand(slackClient client.SlackClient, macros []config.Macro, logger *logrus.Logger) bot.Command
- func NewRandomCommand(slackClient client.SlackClient) bot.Command
- func NewReactionCommand(slackClient client.SlackClient) bot.Command
- func NewReplyCommand(slackClient client.SlackClient) bot.Command
- func NewRetryCommand(slackClient client.SlackClient) bot.Command
- func NewSendMessageCommand(slackClient client.SlackClient) bot.Command
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
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 ¶
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.