Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrCommandAlreadyExists = errors.New("command already exists")
)
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
Name() string
Create() discord.ApplicationCommandCreate
Execute(event *events.ApplicationCommandInteractionCreate) error
}
type Manager ¶
type Manager interface {
Register(command Command) error
Deploy(client bot.Client) error
// OnCommandInteractionCreate should be called when ApplicationCommandInteractionCreate event is received
// This is used to handle the command interaction
OnCommandInteractionCreate(event *events.ApplicationCommandInteractionCreate)
}
func NewManager ¶
func NewManager() Manager
Click to show internal directories.
Click to hide internal directories.