# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
nolint:misspell.
Package mocks is a generated GoMock package.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AddCommand adds a command to the default registry.
AddPattern adds a pattern command to the default registry.
AddReactionHandler adds a reaction command to the default registry.
FormatTime formats a given time.Time instance as UTC in a simple format.
MustAddCommand adds a command to the default registry or panics.
MustAddPattern adds a pattern command to the default registry or panics.
AddReactionHandler adds a reaction command to the default registry or panics.
NewRegistry constructs a new CommandRegistry.
parseFlags tries to parse the given text with the given flagset.
# Variables
DefaultRegistry is the global registry instance used by default.
No description provided by the author
# Structs
BasicCommand describes a basic bot command that can be invoked on demand with "!<cmd name>".
CommandRegistry describes a collection of basic commands, pattern commands and reaction handlers.
PatternCommand describes a pattern handler and its associated pattern.
ReactionCommand describes a named reacton handler that is run when reactions are added/removed.
RunContext binds together all of the contextual information a botcmd's Run function might need.
RunResult is returned by a botcmd's Run function and can be used as a simple way to post a reply message and/or add reactions to the message that caused the botcmd to be run.
# Interfaces
CommandHandler describes a configurable that expects to be run with some text when the associated basic command is invoked.go:generate mockgen -destination=mocks/mock_command_handler.go -package=mocks .
Configurable is a common interface for anything (cmd, pattern cmd, reaction handler, etc) that can be configured with a logger and config instance.
PatternHandler describes a configurable that expects to be run with all submatches of a regex pattern.go:generate mockgen -destination=mocks/mock_pattern_handler.go -package=mocks .
ReactionHandler describes a configurable that has its Run function called when reactions are added/removed.go:generate mockgen -destination=mocks/mock_pattern_handler.go -package=mocks .