fix id type and add messageflags prefix to IS_COMPONENTS_V2 flag
This commit is contained in:
parent
4d660d08b9
commit
49980810d5
2 changed files with 6 additions and 6 deletions
|
@ -80,7 +80,7 @@ type ActionsRow struct {
|
|||
// NOTE: maximum of 5.
|
||||
Components []MessageComponent `json:"components"`
|
||||
// Unique identifier for the component; auto populated through increment if not provided.
|
||||
ID string `json:"id,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is a method for marshaling ActionsRow to a JSON object.
|
||||
|
@ -157,7 +157,7 @@ type Button struct {
|
|||
// Identifier for a purchasable SKU. Only available when using premium-style buttons.
|
||||
SKUID string `json:"sku_id,omitempty"`
|
||||
// Unique identifier for the component; auto populated through increment if not provided.
|
||||
ID string `json:"id,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// MarshalJSON is a method for marshaling Button to a JSON object.
|
||||
|
@ -246,7 +246,7 @@ type SelectMenu struct {
|
|||
ChannelTypes []ChannelType `json:"channel_types,omitempty"`
|
||||
|
||||
// Unique identifier for the component; auto populated through increment if not provided.
|
||||
ID string `json:"id,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// Type is a method to get the type of a component.
|
||||
|
@ -282,7 +282,7 @@ type TextInput struct {
|
|||
MaxLength int `json:"max_length,omitempty"`
|
||||
|
||||
// Unique identifier for the component; auto populated through increment if not provided.
|
||||
ID string `json:"id,omitempty"`
|
||||
ID int `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
// Type is a method to get the type of a component.
|
||||
|
|
|
@ -230,8 +230,8 @@ const (
|
|||
MessageFlagsSuppressNotifications MessageFlags = 1 << 12
|
||||
// MessageFlagsIsVoiceMessage this message is a voice message.
|
||||
MessageFlagsIsVoiceMessage MessageFlags = 1 << 13
|
||||
// MessageComponentsV2 this message uses the new components system. Disables the ability of sending `content` & `embeds`
|
||||
MessageComponentsV2 MessageFlags = 1 << 15
|
||||
// MessageFlagsComponentsV2 this message uses the new components system. Disables the ability of sending `content` & `embeds`
|
||||
MessageFlagsComponentsV2 MessageFlags = 1 << 15
|
||||
)
|
||||
|
||||
// File stores info about files you e.g. send in messages.
|
||||
|
|
Loading…
Reference in a new issue