Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Modal ¶
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
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 (h *ModalHandler) Handle(i *discordgo.InteractionCreate) (*discordgo.InteractionResponse, error)
func (*ModalHandler) Send ¶
func (h *ModalHandler) Send(i *discordgo.InteractionCreate, m *Modal) (*discordgo.InteractionResponse, error)
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
type ModalHandlerFunc ¶
type ModalHandlerFunc func(s *discordgo.Session, i *discordgo.InteractionCreate) (*discordgo.InteractionResponse, error)
Click to show internal directories.
Click to hide internal directories.