command

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: GPL-3.0 Imports: 2 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
	DefaultPermissions *int64
	Options            []*discordgo.ApplicationCommandOption
	Handler            func(s *discordgo.Session, i *discordgo.InteractionCreate) (*discordgo.InteractionResponse, error)
}

func (*Command) ApplicationCommand

func (c *Command) ApplicationCommand() *discordgo.ApplicationCommand

type CommandHandler

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

func NewCommandHandler

func NewCommandHandler(session *discordgo.Session, guild *discordgo.Guild) (*CommandHandler, error)

func (*CommandHandler) Deinit

func (c *CommandHandler) Deinit() error

func (*CommandHandler) Init

func (c *CommandHandler) Init() error

func (*CommandHandler) Register

func (c *CommandHandler) Register(commands ...*Command)

Register registers commands Make sure to register commands before starting the service

Jump to

Keyboard shortcuts

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