GuildFeatures added to UserGuild (#1223)
* GuildFeatures added to UserGuild * Better comment phrasing * Added GuildFeature type to Guild
This commit is contained in:
parent
7c87035a71
commit
73ebf67335
1 changed files with 35 additions and 6 deletions
41
structs.go
41
structs.go
|
@ -699,7 +699,7 @@ type Guild struct {
|
||||||
NSFWLevel GuildNSFWLevel `json:"nsfw_level"`
|
NSFWLevel GuildNSFWLevel `json:"nsfw_level"`
|
||||||
|
|
||||||
// The list of enabled guild features
|
// The list of enabled guild features
|
||||||
Features []string `json:"features"`
|
Features []GuildFeature `json:"features"`
|
||||||
|
|
||||||
// Required MFA level for the guild
|
// Required MFA level for the guild
|
||||||
MfaLevel MfaLevel `json:"mfa_level"`
|
MfaLevel MfaLevel `json:"mfa_level"`
|
||||||
|
@ -1030,13 +1030,42 @@ func (g *Guild) BannerURL() string {
|
||||||
|
|
||||||
// A UserGuild holds a brief version of a Guild
|
// A UserGuild holds a brief version of a Guild
|
||||||
type UserGuild struct {
|
type UserGuild struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Icon string `json:"icon"`
|
Icon string `json:"icon"`
|
||||||
Owner bool `json:"owner"`
|
Owner bool `json:"owner"`
|
||||||
Permissions int64 `json:"permissions,string"`
|
Permissions int64 `json:"permissions,string"`
|
||||||
|
Features []GuildFeature `json:"features"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GuildFeature indicates the presence of a feature in a guild
|
||||||
|
type GuildFeature string
|
||||||
|
|
||||||
|
// Constants for GuildFeature
|
||||||
|
const (
|
||||||
|
GuildFeatureAnimatedBanner GuildFeature = "ANIMATED_BANNER"
|
||||||
|
GuildFeatureAnimatedIcon GuildFeature = "ANIMATED_ICON"
|
||||||
|
GuildFeatureAutoModeration GuildFeature = "AUTO_MODERATION"
|
||||||
|
GuildFeatureBanner GuildFeature = "BANNER"
|
||||||
|
GuildFeatureCommunity GuildFeature = "COMMUNITY"
|
||||||
|
GuildFeatureDiscoverable GuildFeature = "DISCOVERABLE"
|
||||||
|
GuildFeatureFeaturable GuildFeature = "FEATURABLE"
|
||||||
|
GuildFeatureInviteSplash GuildFeature = "INVITE_SPLASH"
|
||||||
|
GuildFeatureMemberVerificationGateEnabled GuildFeature = "MEMBER_VERIFICATION_GATE_ENABLED"
|
||||||
|
GuildFeatureMonetizationEnabled GuildFeature = "MONETIZATION_ENABLED"
|
||||||
|
GuildFeatureMoreStickers GuildFeature = "MORE_STICKERS"
|
||||||
|
GuildFeatureNews GuildFeature = "NEWS"
|
||||||
|
GuildFeaturePartnered GuildFeature = "PARTNERED"
|
||||||
|
GuildFeaturePreviewEnabled GuildFeature = "PREVIEW_ENABLED"
|
||||||
|
GuildFeaturePrivateThreads GuildFeature = "PRIVATE_THREADS"
|
||||||
|
GuildFeatureRoleIcons GuildFeature = "ROLE_ICONS"
|
||||||
|
GuildFeatureTicketedEventsEnabled GuildFeature = "TICKETED_EVENTS_ENABLED"
|
||||||
|
GuildFeatureVanityURL GuildFeature = "VANITY_URL"
|
||||||
|
GuildFeatureVerified GuildFeature = "VERIFIED"
|
||||||
|
GuildFeatureVipRegions GuildFeature = "VIP_REGIONS"
|
||||||
|
GuildFeatureWelcomeScreenEnabled GuildFeature = "WELCOME_SCREEN_ENABLED"
|
||||||
|
)
|
||||||
|
|
||||||
// A GuildParams stores all the data needed to update discord guild settings
|
// A GuildParams stores all the data needed to update discord guild settings
|
||||||
type GuildParams struct {
|
type GuildParams struct {
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
|
Loading…
Reference in a new issue