Skip to content

Commit

Permalink
add ApplicationCommandInteractionDataResolved struct (#919)
Browse files Browse the repository at this point in the history
* add ApplicationCommandInteractionDataResolved struct

* add comment to ApplicationCommandInteractionDataResolved

* change wording of comment for ApplicationCommandInteractionDataResolved
  • Loading branch information
plally committed May 26, 2021
1 parent df74d8b commit ccf3b37
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions interactions.go
Expand Up @@ -92,9 +92,20 @@ type Interaction struct {

// ApplicationCommandInteractionData contains data received in an interaction event.
type ApplicationCommandInteractionData struct {
ID string `json:"id"`
Name string `json:"name"`
Options []*ApplicationCommandInteractionDataOption `json:"options"`
ID string `json:"id"`
Name string `json:"name"`
Resolved *ApplicationCommandInteractionDataResolved `json:"resolved"`
Options []*ApplicationCommandInteractionDataOption `json:"options"`
}

// ApplicationCommandInteractionDataResolved contains resolved data for command arguments.
// Partial Member objects are missing user, deaf and mute fields.
// Partial Channel objects only have id, name, type and permissions fields.
type ApplicationCommandInteractionDataResolved struct {
Users map[string]*User `json:"users"`
Members map[string]*Member `json:"members"`
Roles map[string]*Role `json:"roles"`
Channels map[string]*Channel `json:"channels"`
}

// ApplicationCommandInteractionDataOption represents an option of a slash command.
Expand Down

0 comments on commit ccf3b37

Please sign in to comment.