Application commands: attachment option (#1088)
* feat(interactions): application command attachment option * fix(interactions): corrected application command attachment option type
This commit is contained in:
parent
0494cdf33c
commit
0a0955c5f9
1 changed files with 9 additions and 5 deletions
|
@ -55,6 +55,7 @@ const (
|
||||||
ApplicationCommandOptionChannel ApplicationCommandOptionType = 7
|
ApplicationCommandOptionChannel ApplicationCommandOptionType = 7
|
||||||
ApplicationCommandOptionRole ApplicationCommandOptionType = 8
|
ApplicationCommandOptionRole ApplicationCommandOptionType = 8
|
||||||
ApplicationCommandOptionMentionable ApplicationCommandOptionType = 9
|
ApplicationCommandOptionMentionable ApplicationCommandOptionType = 9
|
||||||
|
ApplicationCommandOptionAttachment ApplicationCommandOptionType = 11
|
||||||
)
|
)
|
||||||
|
|
||||||
func (t ApplicationCommandOptionType) String() string {
|
func (t ApplicationCommandOptionType) String() string {
|
||||||
|
@ -77,6 +78,8 @@ func (t ApplicationCommandOptionType) String() string {
|
||||||
return "Role"
|
return "Role"
|
||||||
case ApplicationCommandOptionMentionable:
|
case ApplicationCommandOptionMentionable:
|
||||||
return "Mentionable"
|
return "Mentionable"
|
||||||
|
case ApplicationCommandOptionAttachment:
|
||||||
|
return "Attachment"
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("ApplicationCommandOptionType(%d)", t)
|
return fmt.Sprintf("ApplicationCommandOptionType(%d)", t)
|
||||||
}
|
}
|
||||||
|
@ -260,6 +263,7 @@ type ApplicationCommandInteractionDataResolved struct {
|
||||||
Roles map[string]*Role `json:"roles"`
|
Roles map[string]*Role `json:"roles"`
|
||||||
Channels map[string]*Channel `json:"channels"`
|
Channels map[string]*Channel `json:"channels"`
|
||||||
Messages map[string]*Message `json:"messages"`
|
Messages map[string]*Message `json:"messages"`
|
||||||
|
Attachments map[string]*MessageAttachment `json:"attachments"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type returns the type of interaction data.
|
// Type returns the type of interaction data.
|
||||||
|
|
Loading…
Reference in a new issue