Skip to content

Commit

Permalink
Application commands: attachment option (bwmarrin#1088)
Browse files Browse the repository at this point in the history
* feat(interactions): application command attachment option

* fix(interactions): corrected application command attachment option type
  • Loading branch information
FedorLap2006 authored and SmoothieNoIce committed Feb 17, 2022
1 parent 4044188 commit ece8951
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions interactions.go
Expand Up @@ -55,6 +55,7 @@ const (
ApplicationCommandOptionChannel ApplicationCommandOptionType = 7
ApplicationCommandOptionRole ApplicationCommandOptionType = 8
ApplicationCommandOptionMentionable ApplicationCommandOptionType = 9
ApplicationCommandOptionAttachment ApplicationCommandOptionType = 11
)

func (t ApplicationCommandOptionType) String() string {
Expand All @@ -77,6 +78,8 @@ func (t ApplicationCommandOptionType) String() string {
return "Role"
case ApplicationCommandOptionMentionable:
return "Mentionable"
case ApplicationCommandOptionAttachment:
return "Attachment"
}
return fmt.Sprintf("ApplicationCommandOptionType(%d)", t)
}
Expand Down Expand Up @@ -255,11 +258,12 @@ type ApplicationCommandInteractionData struct {
// 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"`
Messages map[string]*Message `json:"messages"`
Users map[string]*User `json:"users"`
Members map[string]*Member `json:"members"`
Roles map[string]*Role `json:"roles"`
Channels map[string]*Channel `json:"channels"`
Messages map[string]*Message `json:"messages"`
Attachments map[string]*MessageAttachment `json:"attachments"`
}

// Type returns the type of interaction data.
Expand Down

0 comments on commit ece8951

Please sign in to comment.