feat(user): add UserPremiumType type (#1467)
* feat(user): Add UserPremiumType type * chore(UserPremiumType): fix type name in comment * style: periods Add periods at the end of the documentation comments. * chore(UserPremiumType): reword documentation comment --------- Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
This commit is contained in:
parent
1f0b57f110
commit
e8b8ad326b
1 changed files with 13 additions and 1 deletions
14
user.go
14
user.go
|
@ -26,6 +26,18 @@ const (
|
|||
UserFlagDiscordCertifiedModerator UserFlags = 1 << 18
|
||||
)
|
||||
|
||||
// UserPremiumType is the type of premium (nitro) subscription a user has (see UserPremiumType* consts).
|
||||
// https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||
type UserPremiumType int
|
||||
|
||||
// Valid UserPremiumType values.
|
||||
const (
|
||||
UserPremiumTypeNone UserPremiumType = 0
|
||||
UserPremiumTypeNitroClassic UserPremiumType = 1
|
||||
UserPremiumTypeNitro UserPremiumType = 2
|
||||
UserPremiumTypeNitroBasic UserPremiumType = 3
|
||||
)
|
||||
|
||||
// A User stores all data for an individual Discord user.
|
||||
type User struct {
|
||||
// The ID of the user.
|
||||
|
@ -78,7 +90,7 @@ type User struct {
|
|||
|
||||
// The type of Nitro subscription on a user's account.
|
||||
// Only available when the request is authorized via a Bearer token.
|
||||
PremiumType int `json:"premium_type"`
|
||||
PremiumType UserPremiumType `json:"premium_type"`
|
||||
|
||||
// Whether the user is an Official Discord System user (part of the urgent message system).
|
||||
System bool `json:"system"`
|
||||
|
|
Loading…
Reference in a new issue