|
@@ -2,6 +2,27 @@ package discordgo
|
|
|
|
|
|
import "strings"
|
|
|
|
|
|
+// UserFlags is the flags of "user" (see UserFlags* consts)
|
|
|
+// https://discord.com/developers/docs/resources/user#user-object-user-flags
|
|
|
+type UserFlags int
|
|
|
+
|
|
|
+// Valid UserFlags values
|
|
|
+const (
|
|
|
+ UserFlagDiscordEmployee UserFlags = 1 << 0
|
|
|
+ UserFlagDiscordPartner = 1 << 1
|
|
|
+ UserFlagHypeSquadEvents = 1 << 2
|
|
|
+ UserFlagBugHunterLevel1 = 1 << 3
|
|
|
+ UserFlagHouseBravery = 1 << 6
|
|
|
+ UserFlagHouseBrilliance = 1 << 7
|
|
|
+ UserFlagHouseBalance = 1 << 8
|
|
|
+ UserFlagEarlySupporter = 1 << 9
|
|
|
+ UserFlagTeamUser = 1 << 10
|
|
|
+ UserFlagSystem = 1 << 12
|
|
|
+ UserFlagBugHunterLevel2 = 1 << 14
|
|
|
+ UserFlagVerifiedBot = 1 << 16
|
|
|
+ UserFlagVerifiedBotDeveloper = 1 << 17
|
|
|
+)
|
|
|
+
|
|
|
// A User stores all data for an individual Discord user.
|
|
|
type User struct {
|
|
|
// The ID of the user.
|
|
@@ -36,6 +57,11 @@ type User struct {
|
|
|
|
|
|
// Whether the user is a bot.
|
|
|
Bot bool `json:"bot"`
|
|
|
+
|
|
|
+ // The public flags on a user's account.
|
|
|
+ // This is a combination of bit masks; the presence of a certain flag can
|
|
|
+ // be checked by performing a bitwise AND between this int and the flag.
|
|
|
+ PublicFlags UserFlags `json:"public_flags"`
|
|
|
}
|
|
|
|
|
|
// String returns a unique identifier of the form username#discriminator
|