Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CommandsMetadata is a map containing metadata of every taalabc command. CommandsMetadata map[string]*bot.CommandMeta )
Functions ¶
This section is empty.
Types ¶
type ExecutableCommand ¶
type ExecutableCommand interface { // Metadata returns command metadata: name, description, etc. Metadata() *bot.CommandMeta // Execute executes the command, and returns a result action. Execute(ctx context.Context, args []string, guild *bot.AttachedGuild) (*bot.CommandExecutionResult, error) // Help gives users an explanatory notice on how to use the command. Help(invokedAs string, guild *bot.AttachedGuild) *bot.CommandExecutionResult }
ExecutableCommand is an interface that makes a bot command executable.
func NewArticlesCommand ¶
func NewArticlesCommand() ExecutableCommand
NewArticlesCommand creates and returns a new instance of the articles command.
func NewHelpCommand ¶
func NewHelpCommand(commands map[string]ExecutableCommand) ExecutableCommand
NewHelpCommand creates and returns a new instance of the help command.
Click to show internal directories.
Click to hide internal directories.