aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/bwmarrin/discordgo/interactions.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/bwmarrin/discordgo/interactions.go')
-rw-r--r--vendor/github.com/bwmarrin/discordgo/interactions.go16
1 files changed, 13 insertions, 3 deletions
diff --git a/vendor/github.com/bwmarrin/discordgo/interactions.go b/vendor/github.com/bwmarrin/discordgo/interactions.go
index 61a4e99..627e0c3 100644
--- a/vendor/github.com/bwmarrin/discordgo/interactions.go
+++ b/vendor/github.com/bwmarrin/discordgo/interactions.go
@@ -42,6 +42,7 @@ type ApplicationCommand struct {
DefaultPermission *bool `json:"default_permission,omitempty"`
DefaultMemberPermissions *int64 `json:"default_member_permissions,string,omitempty"`
DMPermission *bool `json:"dm_permission,omitempty"`
+ NSFW *bool `json:"nsfw,omitempty"`
// NOTE: Chat commands only. Otherwise it mustn't be set.
@@ -343,13 +344,22 @@ func (ApplicationCommandInteractionData) Type() InteractionType {
// MessageComponentInteractionData contains the data of message component interaction.
type MessageComponentInteractionData struct {
- CustomID string `json:"custom_id"`
- ComponentType ComponentType `json:"component_type"`
+ CustomID string `json:"custom_id"`
+ ComponentType ComponentType `json:"component_type"`
+ Resolved MessageComponentInteractionDataResolved `json:"resolved"`
// NOTE: Only filled when ComponentType is SelectMenuComponent (3). Otherwise is nil.
Values []string `json:"values"`
}
+// MessageComponentInteractionDataResolved contains the resolved data of selected option.
+type MessageComponentInteractionDataResolved 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"`
+}
+
// Type returns the type of interaction data.
func (MessageComponentInteractionData) Type() InteractionType {
return InteractionMessageComponent
@@ -472,7 +482,7 @@ func (o ApplicationCommandInteractionDataOption) RoleValue(s *Session, gID strin
return &Role{ID: roleID}
}
- r, err := s.State.Role(roleID, gID)
+ r, err := s.State.Role(gID, roleID)
if err != nil {
roles, err := s.GuildRoles(gID)
if err == nil {