Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionRow ¶
type ActionRow struct { RowType ComponentType `json:"type"` Components []MessageComponent `json:"components"` }
func (ActionRow) MarshalJSON ¶ added in v0.1.12
func (ActionRow) Type ¶
func (a ActionRow) Type() ComponentType
func (ActionRow) UnmarshalJSON ¶ added in v0.1.19
type Button ¶
type Button struct { Style ButtonStyle `json:"style"` Label *string `json:"label,omitempty"` Emoji *discord.Emoji `json:"emoji,omitempty"` CustomId *string `json:"custom_id,omitempty"` Url *string `json:"url,omitempty"` Disabled *bool `json:"disabled,omitempty"` ButtonType ComponentType `json:"type"` }
func (Button) MarshalJSON ¶ added in v0.1.18
func (Button) Type ¶
func (button Button) Type() ComponentType
type ButtonStyle ¶
type ButtonStyle uint8
const ( PrimaryButtonStyle ButtonStyle = iota + 1 SecondaryButtonStyle SuccessButtonStyle DangerButtonStyle LinkButtonStyle )
type ComponentType ¶
type ComponentType uint8
const ( ActionRowType ComponentType = iota + 1 ButtonType StringSelectType TextInputType UserSelectType RoleSelectType MentionableSelectType ChannelSelectType )
type MessageComponent ¶
type MessageComponent interface {
Type() ComponentType
}
MessageComponent can be made of any variables, so it's a map until we parse it into a specific component.
type MessageComponentData ¶
type MessageComponentData struct { CustomId string `json:"custom_id"` Type ComponentType `json:"component_type"` Values []string `json:"values"` Resolved *discord.ResolvedData `json:"resolved,omitempty"` }
type MessageComponentWrapper ¶
type MessageComponentWrapper struct {
// contains filtered or unexported fields
}
func (*MessageComponentWrapper) MarshalJSON ¶
func (m *MessageComponentWrapper) MarshalJSON() ([]byte, error)
func (*MessageComponentWrapper) UnmarshalJSON ¶
func (m *MessageComponentWrapper) UnmarshalJSON(data []byte) error
type ModalSubmitData ¶
type ModalSubmitData struct { CustomId string `json:"custom_id"` Components []MessageComponent `json:"components"` }
func (ModalSubmitData) UnmarshalJSON ¶ added in v0.1.19
func (m ModalSubmitData) UnmarshalJSON(data []byte) error
type SelectMenu ¶
type SelectMenu struct { MenuType ComponentType `json:"type"` CustomId string `json:"custom_id"` Options []SelectOption `json:"options,omitempty"` ChannelTypes []discord.ChannelType `json:"channel_types,omitempty"` Placeholder *string `json:"placeholder,omitempty"` MinValues *uint8 `json:"min_values,omitempty"` MaxValues *uint8 `json:"max_values,omitempty"` Disabled *bool `json:"disabled,omitempty"` }
func (SelectMenu) Type ¶
func (selectMenu SelectMenu) Type() ComponentType
type SelectOption ¶
type TextInput ¶ added in v0.1.19
type TextInput struct { TextInputType ComponentType `json:"type"` CustomId string `json:"custom_id"` Style TextInputStyle `json:"style"` Label string `json:"label"` MinLength int `json:"min_length"` MaxLength int `json:"max_length"` Required bool `json:"required"` Value string `json:"value"` Placeholder string `json:"placeholder"` }
func (TextInput) MarshalJSON ¶ added in v0.1.19
func (TextInput) Type ¶ added in v0.1.19
func (t TextInput) Type() ComponentType
type TextInputStyle ¶ added in v0.1.19
type TextInputStyle uint8
const ( ShortTextInputStyle TextInputStyle = iota + 1 LongTextInputStyle )
Click to show internal directories.
Click to hide internal directories.