Documentation
¶
Overview ¶
Package command is an interface for defining bot commands.
Index ¶
- Variables
- type Command
- func Deregister(ctx *cli.Context) Command
- func Echo(ctx *cli.Context) Command
- func Get(ctx *cli.Context) Command
- func Health(ctx *cli.Context) Command
- func Hello(ctx *cli.Context) Command
- func List(ctx *cli.Context) Command
- func NewCommand(name, usage, description string, exec func(args ...string) ([]byte, error)) Command
- func Ping(ctx *cli.Context) Command
- func Query(ctx *cli.Context) Command
- func Register(ctx *cli.Context) Command
- func ThreeLaws(ctx *cli.Context) Command
- func Time(ctx *cli.Context) Command
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Commmands keyed by golang/regexp patterns // regexp.Match(key, input) is used to match Commands = map[string]Command{} )
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
// Executes the command with args passed in
Exec(args ...string) ([]byte, error)
// Usage of the command
Usage() string
// Description of the command
Description() string
// Name of the command
String() string
}
Command is the interface for specific named commands executed via plugins or the bot.
func NewCommand ¶
NewCommand helps quickly create a new command
Click to show internal directories.
Click to hide internal directories.