handler package - github.com/floriansw/go-discordgo-utils/handler - Go Packages

handler

package
v0.0.0-...-73a604a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logger *slog.Logger, session *discordgo.Session, guildId string, commands map[string]interface{}) *discordApp

Types

type Autocomplete

type Autocomplete interface {
	OnAutocomplete(s *discordgo.Session, i *discordgo.InteractionCreate)
}

type Command

type Command interface {
	Definition(cmd string) *discordgo.ApplicationCommand
	OnCommand(s *discordgo.Session, i *discordgo.InteractionCreate)
}

type MessageComponent

type MessageComponent interface {
	CanHandle(customId string) bool
	OnMessageComponent(s *discordgo.Session, i *discordgo.InteractionCreate)
}

type ModalSubmit

type ModalSubmit interface {
	CanHandle(customId string) bool
	OnModalSubmit(s *discordgo.Session, i *discordgo.InteractionCreate)
}

Jump to

Keyboard shortcuts

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