command

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: MIT Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

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