Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 4074561

Browse files
authored
Add MessageComponentInteractionDataResolved struct (bwmarrin#1302)
1 parent 8a5201a commit 4074561

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

interactions.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,22 @@ func (ApplicationCommandInteractionData) Type() InteractionType {
343343

344344
// MessageComponentInteractionData contains the data of message component interaction.
345345
type MessageComponentInteractionData struct {
346-
CustomID string `json:"custom_id"`
347-
ComponentType ComponentType `json:"component_type"`
346+
CustomID string `json:"custom_id"`
347+
ComponentType ComponentType `json:"component_type"`
348+
Resolved MessageComponentInteractionDataResolved `json:"resolved"`
348349

349350
// NOTE: Only filled when ComponentType is SelectMenuComponent (3). Otherwise is nil.
350351
Values []string `json:"values"`
351352
}
352353

354+
// MessageComponentInteractionDataResolved contains the resolved data of selected option.
355+
type MessageComponentInteractionDataResolved struct {
356+
Users map[string]*User `json:"users"`
357+
Members map[string]*Member `json:"members"`
358+
Roles map[string]*Role `json:"roles"`
359+
Channels map[string]*Channel `json:"channels"`
360+
}
361+
353362
// Type returns the type of interaction data.
354363
func (MessageComponentInteractionData) Type() InteractionType {
355364
return InteractionMessageComponent

0 commit comments

Comments
 (0)