Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions objects/interaction/component/component_checkbox_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package component
import "encoding/json"

type CheckboxGroup struct {
CustomId string `json:"custom_id"`
Options []CheckboxGroupOption `json:"options"`
MinValues *int `json:"min_values,omitempty"`
MaxValues *int `json:"max_values,omitempty"`
Required *bool `json:"required,omitempty"`
CustomId string `json:"custom_id"`
Options []CheckboxGroupOption `json:"options"`
MinValues *int `json:"min_values,omitempty"`
MaxValues *int `json:"max_values,omitempty"`
Required *bool `json:"required,omitempty"`
}

type CheckboxGroupOption struct {
Expand Down
2 changes: 1 addition & 1 deletion objects/interaction/component/componentactionrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (a ActionRow) MarshalJSON() ([]byte, error) {

func BuildActionRow(components ...Component) Component {
return Component{
Type: ComponentActionRow,
Type: ComponentActionRow,
ComponentData: ActionRow{
Components: components,
},
Expand Down
4 changes: 4 additions & 0 deletions rest/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ type EditMessageData struct {
Embeds []*embed.Embed `json:"embeds"`
Flags uint `json:"flags"` // https://discord.com/developers/docs/resources/channel#message-object-message-flags TODO: Helper function
Components []component.Component `json:"components"`

// AllowedMentions is omitted when nil. Discord re-parses mentions with default
// allowances on an edit that does not send it.
AllowedMentions *message.AllowedMention `json:"allowed_mentions,omitempty"`
}

func EditMessage(ctx context.Context, token string, rateLimiter *ratelimit.Ratelimiter, channelId, messageId uint64, data EditMessageData) (message.Message, error) {
Expand Down
Loading