Skip to content

Commit ece8951

Browse files
FedorLap2006SmoothieNoIce
authored andcommitted
Application commands: attachment option (bwmarrin#1088)
* feat(interactions): application command attachment option * fix(interactions): corrected application command attachment option type
1 parent 4044188 commit ece8951

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

interactions.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const (
5555
ApplicationCommandOptionChannel ApplicationCommandOptionType = 7
5656
ApplicationCommandOptionRole ApplicationCommandOptionType = 8
5757
ApplicationCommandOptionMentionable ApplicationCommandOptionType = 9
58+
ApplicationCommandOptionAttachment ApplicationCommandOptionType = 11
5859
)
5960

6061
func (t ApplicationCommandOptionType) String() string {
@@ -77,6 +78,8 @@ func (t ApplicationCommandOptionType) String() string {
7778
return "Role"
7879
case ApplicationCommandOptionMentionable:
7980
return "Mentionable"
81+
case ApplicationCommandOptionAttachment:
82+
return "Attachment"
8083
}
8184
return fmt.Sprintf("ApplicationCommandOptionType(%d)", t)
8285
}
@@ -255,11 +258,12 @@ type ApplicationCommandInteractionData struct {
255258
// Partial Member objects are missing user, deaf and mute fields.
256259
// Partial Channel objects only have id, name, type and permissions fields.
257260
type ApplicationCommandInteractionDataResolved struct {
258-
Users map[string]*User `json:"users"`
259-
Members map[string]*Member `json:"members"`
260-
Roles map[string]*Role `json:"roles"`
261-
Channels map[string]*Channel `json:"channels"`
262-
Messages map[string]*Message `json:"messages"`
261+
Users map[string]*User `json:"users"`
262+
Members map[string]*Member `json:"members"`
263+
Roles map[string]*Role `json:"roles"`
264+
Channels map[string]*Channel `json:"channels"`
265+
Messages map[string]*Message `json:"messages"`
266+
Attachments map[string]*MessageAttachment `json:"attachments"`
263267
}
264268

265269
// Type returns the type of interaction data.

0 commit comments

Comments
 (0)