appcmdmanager

package module
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Application Command Manager

Go Reference Golang Version Discordgo Version License

discordgo application command manager

Getting Started

Installing
go get github.com/blue0moon02/appcmdmanager
Usage
import "github.com/blue0moon02/appcmdmanager"

Collaborators

BlueMoon2
(blue0moon02)

Numberer
(ybs1164)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterApplicationCommands

func RegisterApplicationCommands(cmds []AppCmdInterface, s *discordgo.Session, guildID string) (appCmds []*discordgo.ApplicationCommand)

func RegisterHandler

func RegisterHandler(apps []AppCmdInterface) func(s *discordgo.Session, i *discordgo.InteractionCreate)

Types

type AppCmdInterface

type AppCmdInterface interface {
	ApplicationCommandStruct() *discordgo.ApplicationCommand
	ApplicationCommandHandler(s *discordgo.Session, i *discordgo.InteractionCreate)
	MessageComponentHandler() map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate)
	ModalSubmitHandler() map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate)
}

Jump to

Keyboard shortcuts

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