summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/matterbridge/discordgo/oauth2.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-09-04 23:29:13 +0200
committerGitHub <noreply@github.com>2020-09-04 23:29:13 +0200
commit2f59abdda7a1072036ea1fdb4c859cccbb56efa6 (patch)
treee35393f23d12783ae92f0469085efc7dec953f82 /vendor/github.com/matterbridge/discordgo/oauth2.go
parent17747a5c8893fd47ba8eb61dd10477170640caf6 (diff)
downloadmatterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.gz
matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.bz2
matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.zip
Update vendor (#1228)
Diffstat (limited to 'vendor/github.com/matterbridge/discordgo/oauth2.go')
-rw-r--r--vendor/github.com/matterbridge/discordgo/oauth2.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/github.com/matterbridge/discordgo/oauth2.go b/vendor/github.com/matterbridge/discordgo/oauth2.go
index 4a52120b..289eca94 100644
--- a/vendor/github.com/matterbridge/discordgo/oauth2.go
+++ b/vendor/github.com/matterbridge/discordgo/oauth2.go
@@ -13,6 +13,33 @@ package discordgo
// Code specific to Discord OAuth2 Applications
// ------------------------------------------------------------------------------------------------
+// The MembershipState represents whether the user is in the team or has been invited into it
+type MembershipState int
+
+// Constants for the different stages of the MembershipState
+const (
+ MembershipStateInvited MembershipState = iota + 1
+ MembershipStateAccepted
+)
+
+// A TeamMember struct stores values for a single Team Member, extending the normal User data - note that the user field is partial
+type TeamMember struct {
+ User *User `json:"user"`
+ TeamID string `json:"team_id"`
+ MembershipState MembershipState `json:"membership_state"`
+ Permissions []string `json:"permissions"`
+}
+
+// A Team struct stores the members of a Discord Developer Team as well as some metadata about it
+type Team struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Icon string `json:"icon"`
+ OwnerID string `json:"owner_user_id"`
+ Members []*TeamMember `json:"members"`
+}
+
// An Application struct stores values for a Discord OAuth2 Application
type Application struct {
ID string `json:"id,omitempty"`
@@ -27,6 +54,7 @@ type Application struct {
Flags int `json:"flags,omitempty"`
Owner *User `json:"owner"`
Bot *User `json:"bot"`
+ Team *Team `json:"team"`
}
// Application returns an Application structure of a specific Application