added placeholders back (forgot them lol)

This commit is contained in:
2024-03-08 19:26:42 +01:00
parent 1ea34f11b6
commit 044eeddb64

16
tool.go
View File

@@ -16,6 +16,7 @@ type ModalJsonField struct {
IsParagraph bool `json:"is_paragraph"` IsParagraph bool `json:"is_paragraph"`
Value string `json:"value"` Value string `json:"value"`
Required bool `json:"required"` Required bool `json:"required"`
Placeholder string `json:"placeholder"`
MinLength int `json:"min_length"` MinLength int `json:"min_length"`
MaxLength int `json:"max_length"` MaxLength int `json:"max_length"`
} }
@@ -37,13 +38,14 @@ func jsonStringShowModal(interaction *discordgo.Interaction, manageID string, fo
components = append(components, discordgo.ActionsRow{ components = append(components, discordgo.ActionsRow{
Components: []discordgo.MessageComponent{ Components: []discordgo.MessageComponent{
discordgo.TextInput{ discordgo.TextInput{
CustomID: fmt.Sprint(index), CustomID: fmt.Sprint(index),
Label: component.Label, Label: component.Label,
Style: style, Style: style,
Required: component.Required, Placeholder: component.Placeholder,
MaxLength: component.MaxLength, Required: component.Required,
MinLength: component.MinLength, MaxLength: component.MaxLength,
Value: component.Value, MinLength: component.MinLength,
Value: component.Value,
}, },
}, },
}) })