command

package
v0.0.0-...-8fd61c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name        string
	Aliases     []string
	Handler     func(CommandContext)
	SubCommands []Command
}

func NewCommand

func NewCommand(name string, aliases []string, handler func(CommandContext)) Command

func (*Command) RegisterSubCommand

func (c *Command) RegisterSubCommand(sub Command)

type CommandContext

type CommandContext struct {
	*events.MessageCreate
	Shard *gateway.Shard
	Args  []string
}

type CommandHandler

type CommandHandler struct {
	// contains filtered or unexported fields
}

func NewCommandHandler

func NewCommandHandler(sm *gateway.ShardManager, prefixes ...string) *CommandHandler

func (*CommandHandler) RegisterCommand

func (h *CommandHandler) RegisterCommand(cmd Command)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL