modal

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modal struct {
	Id         string
	Title      string
	Components []discordgo.MessageComponent
	Handler    ModalHandlerFunc
}

func NewModal

func NewModal(id, title string, components []discordgo.MessageComponent, handler ModalHandlerFunc) *Modal

func NewTextModal

func NewTextModal(id, title string, inputs []discordgo.TextInput, handler ModalHandlerFunc) *Modal

func (*Modal) Clone

func (m *Modal) Clone() *Modal

Clone returns a copy of the modal. This is useful for creating static modals that can be reused but have different data.

func (*Modal) ModalData

func (m *Modal) ModalData(suffix string) *discordgo.InteractionResponseData

type ModalHandler

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

func NewModalHandler

func NewModalHandler(session *discordgo.Session, guild *discordgo.Guild) *ModalHandler

func (*ModalHandler) Handle

func (*ModalHandler) Send

Send is used to send a modal to a user based on an interaction This will return an interaction response that can be used to send the modal

Jump to

Keyboard shortcuts

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