command

package
v0.0.0-...-27a7cf5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: AGPL-3.0 Imports: 1 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
	Description string
}

Command is a struct of a bot command

type Interface

type Interface interface {
	Register(registry Registry)
	InstallSlashCommands(session *discordgo.Session) error
}

Interface defines how a command should be structured

type Registry

type Registry interface {
	RegisterInteractionCreate(command string, fn func(*discordgo.Session, *discordgo.InteractionCreate))
}

Registry is the interface of a command registry

Jump to

Keyboard shortcuts

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