Documentation ¶
Index ¶
- func GetCommands(slackClient client.SlackClient, cfg config.Config) *bot.Commands
- func NewAddButtonCommand(base bot.BaseCommand) bot.Command
- func NewAddLinkCommand(base bot.BaseCommand) bot.Command
- func NewCommands(base bot.BaseCommand, macros []config.Command) bot.Command
- func NewDelayCommand(base bot.BaseCommand) bot.Command
- func NewHelpCommand(base bot.BaseCommand, commands *bot.Commands) bot.Command
- func NewRandomCommand(base bot.BaseCommand) bot.Command
- func NewReactionCommand(base bot.BaseCommand) bot.Command
- func NewReplyCommand(base bot.BaseCommand) bot.Command
- func NewRetryCommand(base bot.BaseCommand, cfg *config.Config) bot.Command
- func NewSendMessageCommand(base bot.BaseCommand) bot.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCommands ¶
GetCommands returns the list of default command which are available
func NewAddButtonCommand ¶
func NewAddButtonCommand(base bot.BaseCommand) bot.Command
NewAddButtonCommand is more or less internal command to add a link button to the posted message
func NewAddLinkCommand ¶
func NewAddLinkCommand(base bot.BaseCommand) bot.Command
NewAddLinkCommand is more or less internal command to add a link button to the posted message
func NewCommands ¶
NewCommands defines custom commands by defining a trigger (regexp) and a list of commands which should be executed they are defined in the yaml config under "commands:" it also supports placeholders by {{ .param }} using the regexp group name
func NewDelayCommand ¶
func NewDelayCommand(base bot.BaseCommand) 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 NewRandomCommand ¶
func NewRandomCommand(base bot.BaseCommand) bot.Command
NewRandomCommand will reply a random entry
func NewReactionCommand ¶
func NewReactionCommand(base bot.BaseCommand) bot.Command
NewReactionCommand simply adds a reaction to the current message...used in "commands" and other internal commands
func NewReplyCommand ¶
func NewReplyCommand(base bot.BaseCommand) bot.Command
NewReplyCommand is a command to reply a message in current thread/channel
func NewRetryCommand ¶
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(base bot.BaseCommand) bot.Command
NewSendMessageCommand is able to send a message to any user/channel
Types ¶
This section is empty.