slash_commands

package
v0.0.0-...-2e419a0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesCommandPath

func MatchesCommandPath(commandData discordgo.ApplicationCommandInteractionData, path []string) bool

Types

type InteractionResponder

type InteractionResponder interface {
	InteractionRespond(interaction *discordgo.Interaction, resp *discordgo.InteractionResponse) error
}

type SlashCommandHandler

type SlashCommandHandler = SlashCommandMiddleware

type SlashCommandRegistry

type SlashCommandRegistry struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

func NewSlashCommandRegistry

func NewSlashCommandRegistry() *SlashCommandRegistry

func (*SlashCommandRegistry) AttachToDiscord

func (r *SlashCommandRegistry) AttachToDiscord(discord *discordgo.Session) (removeHandler func())

func (*SlashCommandRegistry) OnInteraction

func (r *SlashCommandRegistry) OnInteraction(responder InteractionResponder, i *discordgo.InteractionCreate)

func (*SlashCommandRegistry) RegisterCommand

func (r *SlashCommandRegistry) RegisterCommand(path []string, handler SlashCommandHandler)

func (*SlashCommandRegistry) RegisterMidleware

func (r *SlashCommandRegistry) RegisterMidleware(middleware SlashCommandMiddleware)

Directories

Path Synopsis
Package mock_slash_commands is a generated GoMock package.
Package mock_slash_commands is a generated GoMock package.

Jump to

Keyboard shortcuts

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