diff options
author | Wim <wim@42.be> | 2022-04-25 23:50:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 23:50:10 +0200 |
commit | 67adad3e08fe17d5f7e87468ea47aa76e1662255 (patch) | |
tree | 91314fac90d39254e66ae794decfcd21c10a7b20 /vendor/github.com/bwmarrin/discordgo/interactions.go | |
parent | 2fca3c756373577eab4e0120ccce62eecc1f5ad8 (diff) | |
download | matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.tar.gz matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.tar.bz2 matterbridge-msglm-67adad3e08fe17d5f7e87468ea47aa76e1662255.zip |
Update dependencies (#1813)
Diffstat (limited to 'vendor/github.com/bwmarrin/discordgo/interactions.go')
-rw-r--r-- | vendor/github.com/bwmarrin/discordgo/interactions.go | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/vendor/github.com/bwmarrin/discordgo/interactions.go b/vendor/github.com/bwmarrin/discordgo/interactions.go index 0e5ae3c4..7164f65e 100644 --- a/vendor/github.com/bwmarrin/discordgo/interactions.go +++ b/vendor/github.com/bwmarrin/discordgo/interactions.go @@ -35,12 +35,14 @@ type ApplicationCommand struct { Version string `json:"version,omitempty"` Type ApplicationCommandType `json:"type,omitempty"` Name string `json:"name"` + NameLocalizations *map[Locale]string `json:"name_localizations,omitempty"` DefaultPermission *bool `json:"default_permission,omitempty"` // NOTE: Chat commands only. Otherwise it mustn't be set. - Description string `json:"description,omitempty"` - Options []*ApplicationCommandOption `json:"options"` + Description string `json:"description,omitempty"` + DescriptionLocalizations *map[Locale]string `json:"description_localizations,omitempty"` + Options []*ApplicationCommandOption `json:"options"` } // ApplicationCommandOptionType indicates the type of a slash command's option. @@ -91,9 +93,11 @@ func (t ApplicationCommandOptionType) String() string { // ApplicationCommandOption represents an option/subcommand/subcommands group. type ApplicationCommandOption struct { - Type ApplicationCommandOptionType `json:"type"` - Name string `json:"name"` - Description string `json:"description,omitempty"` + Type ApplicationCommandOptionType `json:"type"` + Name string `json:"name"` + NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` + Description string `json:"description,omitempty"` + DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` // NOTE: This feature was on the API, but at some point developers decided to remove it. // So I commented it, until it will be officially on the docs. // Default bool `json:"default"` @@ -113,8 +117,9 @@ type ApplicationCommandOption struct { // ApplicationCommandOptionChoice represents a slash command option choice. type ApplicationCommandOptionChoice struct { - Name string `json:"name"` - Value interface{} `json:"value"` + Name string `json:"name"` + NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` + Value interface{} `json:"value"` } // ApplicationCommandPermissions represents a single user or role permission for a command. @@ -175,6 +180,7 @@ func (t InteractionType) String() string { // Interaction represents data of an interaction. type Interaction struct { ID string `json:"id"` + AppID string `json:"application_id"` Type InteractionType `json:"type"` Data InteractionData `json:"data"` GuildID string `json:"guild_id"` @@ -509,7 +515,7 @@ type InteractionResponseData struct { TTS bool `json:"tts"` Content string `json:"content"` Components []MessageComponent `json:"components"` - Embeds []*MessageEmbed `json:"embeds,omitempty"` + Embeds []*MessageEmbed `json:"embeds"` AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"` Flags uint64 `json:"flags,omitempty"` Files []*File `json:"-"` |