mirror of
https://github.com/Xevion/r2park.git
synced 2025-12-09 20:08:07 -06:00
Setup proper modal interaction handlers using CustomID string slice
This commit is contained in:
21
submit.go
Normal file
21
submit.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
func RegisterModalHandler(session *discordgo.Session, interaction *discordgo.InteractionCreate) {
|
||||
err := session.InteractionRespond(interaction.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
Content: "Registration data received. Please wait while your vehicle is registered.",
|
||||
Flags: discordgo.MessageFlagsEphemeral,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
data := interaction.ModalSubmitData()
|
||||
spew.Dump(data)
|
||||
}
|
||||
Reference in New Issue
Block a user