aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/bwmarrin/discordgo/interactions.go
diff options
context:
space:
mode:
authorJordan <me@jordan.im>2023-08-18 00:08:21 -0700
committerJordan <me@jordan.im>2023-08-18 00:08:21 -0700
commit61553158764c6801578076c72d8bffb423e343cc (patch)
tree5d45cf4b6699eebf01e9f2b6ac9ff0000819ebd2 /vendor/github.com/bwmarrin/discordgo/interactions.go
parent001a042ccba1c3faf340d8217ee8d15efa60dc05 (diff)
downloadkeep-61553158764c6801578076c72d8bffb423e343cc.tar.gz
keep-61553158764c6801578076c72d8bffb423e343cc.zip
misc: go get -u; go mod tidy; go mod vendor
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 {