Skip to content

Commit

Permalink
Update subscription objects to match the docs (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Oct 14, 2023
1 parent 44dfd8e commit 5a9ed66
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
22 changes: 9 additions & 13 deletions discord/entitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ import (
)

type Entitlement struct {
ID snowflake.ID `json:"id"`
SkuID snowflake.ID `json:"sku_id"`
UserID *snowflake.ID `json:"user_id"`
GuildID *snowflake.ID `json:"guild_id"`
ApplicationID snowflake.ID `json:"application_id"`
Type EntitlementType `json:"type"`
Consumed bool `json:"consumed"`
StartsAt *time.Time `json:"starts_at"`
EndsAt *time.Time `json:"ends_at"`
PromotionID *snowflake.ID `json:"promotion_id"`
Deleted bool `json:"deleted"`
GiftCodeFlags int `json:"gift_code_flags"`
SubscriptionID *snowflake.ID `json:"subscription_id"`
ID snowflake.ID `json:"id"`
SkuID snowflake.ID `json:"sku_id"`
ApplicationID snowflake.ID `json:"application_id"`
UserID *snowflake.ID `json:"user_id"`
Type EntitlementType `json:"type"`
Deleted bool `json:"deleted"`
StartsAt *time.Time `json:"starts_at"`
EndsAt *time.Time `json:"ends_at"`
GuildID *snowflake.ID `json:"guild_id"`
}

type EntitlementType int
Expand Down
7 changes: 6 additions & 1 deletion discord/sku.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ const (
type SKUFlags int

const (
SKUFlagGuildSubscription SKUFlags = 1 << (iota + 7)
SKUFlagAvailable SKUFlags = 1 << (iota + 2)
_
_
_
_
SKUFlagGuildSubscription
SKUFlagUserSubscription
)

0 comments on commit 5a9ed66

Please sign in to comment.