fix(components): renamed TextInputStyleType to TextInputStyle and fixed example

This commit is contained in:
nitroflap 2022-02-09 14:12:31 +03:00
parent 21ba398898
commit e6b33f37b7
No known key found for this signature in database
GPG key ID: 810F53DB0E0F81A8
2 changed files with 13 additions and 13 deletions

View file

@ -229,11 +229,11 @@ func (m TextInput) MarshalJSON() ([]byte, error) {
}) })
} }
// TextInputStyleType is style of text in TextInput component. // TextInputStyle is style of text in TextInput component.
type TextInputStyleType uint type TextInputStyle uint
// Text styles // Text styles
const ( const (
TextInputShort TextStyleType = 1 TextInputShort TextInputStyle = 1
TextInputParagraph TextStyleType = 2 TextInputParagraph TextInputStyle = 2
) )

View file

@ -54,7 +54,7 @@ var (
discordgo.TextInput{ discordgo.TextInput{
CustomID: "opinion", CustomID: "opinion",
Label: "What is your opinion on them?", Label: "What is your opinion on them?",
Style: discordgo.TextStyleShort, Style: discordgo.TextInputShort,
Placeholder: "Don't be shy, share your opinion with us", Placeholder: "Don't be shy, share your opinion with us",
Required: true, Required: true,
MaxLength: 300, MaxLength: 300,
@ -67,7 +67,7 @@ var (
discordgo.TextInput{ discordgo.TextInput{
CustomID: "suggestions", CustomID: "suggestions",
Label: "What would you suggest to improve them?", Label: "What would you suggest to improve them?",
Style: discordgo.TextStyleParagraph, Style: discordgo.TextInputParagraph,
Required: false, Required: false,
MaxLength: 2000, MaxLength: 2000,
}, },