Complement GuildParams
struct to comply with Discord's API (#1255)
* complement `GuildParams` struct [fix #994] * fix: naming and spelling * fix: gofmt * refactor: use Locale type for PreferredLocale Co-authored-by: zekro <private@zekro.de> Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
This commit is contained in:
parent
9effc92908
commit
e741fc2790
1 changed files with 14 additions and 2 deletions
16
structs.go
16
structs.go
|
@ -1063,8 +1063,10 @@ type SystemChannelFlag int
|
||||||
|
|
||||||
// Block containing known SystemChannelFlag values
|
// Block containing known SystemChannelFlag values
|
||||||
const (
|
const (
|
||||||
SystemChannelFlagsSuppressJoin SystemChannelFlag = 1 << 0
|
SystemChannelFlagsSuppressJoinNotifications SystemChannelFlag = 1 << 0
|
||||||
SystemChannelFlagsSuppressPremium SystemChannelFlag = 1 << 1
|
SystemChannelFlagsSuppressPremium SystemChannelFlag = 1 << 1
|
||||||
|
SystemChannelFlagsSupressGuildReminderNotifications SystemChannelFlag = 1 << 2
|
||||||
|
SystemChannelFlagsSupressJoinNotificationReplies SystemChannelFlag = 1 << 3
|
||||||
)
|
)
|
||||||
|
|
||||||
// IconURL returns a URL to the guild's icon.
|
// IconURL returns a URL to the guild's icon.
|
||||||
|
@ -1132,12 +1134,22 @@ type GuildParams struct {
|
||||||
Region string `json:"region,omitempty"`
|
Region string `json:"region,omitempty"`
|
||||||
VerificationLevel *VerificationLevel `json:"verification_level,omitempty"`
|
VerificationLevel *VerificationLevel `json:"verification_level,omitempty"`
|
||||||
DefaultMessageNotifications int `json:"default_message_notifications,omitempty"` // TODO: Separate type?
|
DefaultMessageNotifications int `json:"default_message_notifications,omitempty"` // TODO: Separate type?
|
||||||
|
ExplicitContentFilter int `json:"explicit_content_filter,omitempty"`
|
||||||
AfkChannelID string `json:"afk_channel_id,omitempty"`
|
AfkChannelID string `json:"afk_channel_id,omitempty"`
|
||||||
AfkTimeout int `json:"afk_timeout,omitempty"`
|
AfkTimeout int `json:"afk_timeout,omitempty"`
|
||||||
Icon string `json:"icon,omitempty"`
|
Icon string `json:"icon,omitempty"`
|
||||||
OwnerID string `json:"owner_id,omitempty"`
|
OwnerID string `json:"owner_id,omitempty"`
|
||||||
Splash string `json:"splash,omitempty"`
|
Splash string `json:"splash,omitempty"`
|
||||||
|
DiscoverySplash string `json:"discovery_splash,omitempty"`
|
||||||
Banner string `json:"banner,omitempty"`
|
Banner string `json:"banner,omitempty"`
|
||||||
|
SystemChannelID string `json:"system_channel_id,omitempty"`
|
||||||
|
SystemChannelFlags SystemChannelFlag `json:"system_channel_flags,omitempty"`
|
||||||
|
RulesChannelID string `json:"rules_channel_id,omitempty"`
|
||||||
|
PublicUpdatesChannelID string `json:"public_updates_channel_id,omitempty"`
|
||||||
|
PreferredLocale Locale `json:"preferred_locale,omitempty"`
|
||||||
|
Features []GuildFeature `json:"features,omitempty"`
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
|
PremiumProgressBarEnabled bool `json:"premium_progress_bar_enabled,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// A Role stores information about Discord guild member roles.
|
// A Role stores information about Discord guild member roles.
|
||||||
|
|
Loading…
Reference in a new issue