From 21ba398898a50ec5c426225981c4ef9371c44293 Mon Sep 17 00:00:00 2001 From: Fedor Lapshin Date: Wed, 9 Feb 2022 14:07:36 +0300 Subject: [PATCH] feat(components): add omitempty and use TextInputStyle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ToπSenpai <15636011+TopiSenpai@users.noreply.github.com> --- components.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components.go b/components.go index b2943c5..1f4ba58 100644 --- a/components.go +++ b/components.go @@ -201,13 +201,13 @@ func (m SelectMenu) MarshalJSON() ([]byte, error) { // TextInput represents text input component. type TextInput struct { - CustomID string `json:"custom_id,omitempty"` + CustomID string `json:"custom_id"` Label string `json:"label"` - Style TextStyleType `json:"style"` + Style TextInputStyle `json:"style"` Placeholder string `json:"placeholder,omitempty"` Value string `json:"value,omitempty"` - Required bool `json:"required"` - MinLength int `json:"min_length"` + Required bool `json:"required,omitempty"` + MinLength int `json:"min_length,omitempty"` MaxLength int `json:"max_length,omitempty"` }