Documentation ¶
Index ¶
- Variables
- type Command
- type CommandGroup
- func (c *CommandGroup[User]) CanHandle(args []string) bool
- func (c *CommandGroup[User]) GetHelp(args []string) (string, error)
- func (c *CommandGroup[User]) Handle(ctx context.Context, user User, args []string) error
- func (c *CommandGroup[User]) Help() string
- func (c *CommandGroup[User]) Name() string
- func (c *CommandGroup[User]) Prefix(message string) string
- func (c *CommandGroup[User]) Register(commands ...Command) error
- type Commandable
Constants ¶
This section is empty.
Variables ¶
View Source
var FALSY = []string{
"false",
"no",
"0",
"off",
}
View Source
var NIL = reflect.ValueOf(nil)
View Source
var TRUTHY = []string{
"true",
"yes",
"1",
"on",
}
Functions ¶
This section is empty.
Types ¶
type Command ¶
type CommandGroup ¶
type CommandGroup[User any] struct { // contains filtered or unexported fields }
func NewCommandGroup ¶
func NewCommandGroup[User any](namespace string, color game.TextColor) *CommandGroup[User]
func (*CommandGroup[User]) CanHandle ¶
func (c *CommandGroup[User]) CanHandle(args []string) bool
Whether or not this command group can respond to this command.
func (*CommandGroup[User]) GetHelp ¶
func (c *CommandGroup[User]) GetHelp(args []string) (string, error)
func (*CommandGroup[User]) Handle ¶
func (c *CommandGroup[User]) Handle(ctx context.Context, user User, args []string) error
func (*CommandGroup[User]) Help ¶
func (c *CommandGroup[User]) Help() string
func (*CommandGroup[User]) Name ¶
func (c *CommandGroup[User]) Name() string
func (*CommandGroup[User]) Prefix ¶
func (c *CommandGroup[User]) Prefix(message string) string
func (*CommandGroup[User]) Register ¶
func (c *CommandGroup[User]) Register(commands ...Command) error
Click to show internal directories.
Click to hide internal directories.