From 1e34b937094aa9e936818b17bf8bdcfb996761cb Mon Sep 17 00:00:00 2001 From: caneleex Date: Tue, 20 Sep 2022 18:45:12 +0200 Subject: [PATCH] Revert "add default sort order to forums" lol https://github.com/discord/discord-api-docs/pull/5480 --- discord/channel.go | 10 ---------- discord/channel_create.go | 1 - discord/channel_update.go | 1 - discord/channels_raw.go | 1 - 4 files changed, 13 deletions(-) diff --git a/discord/channel.go b/discord/channel.go index df9b7903..229e73e3 100644 --- a/discord/channel.go +++ b/discord/channel.go @@ -1054,7 +1054,6 @@ type GuildForumChannel struct { AvailableTags []ForumTag DefaultReactionEmoji *DefaultReactionEmoji DefaultThreadRateLimitPerUser int - DefaultSortOrder DefaultSortOrder } func (c *GuildForumChannel) UnmarshalJSON(data []byte) error { @@ -1077,7 +1076,6 @@ func (c *GuildForumChannel) UnmarshalJSON(data []byte) error { c.AvailableTags = v.AvailableTags c.DefaultReactionEmoji = v.DefaultReactionEmoji c.DefaultThreadRateLimitPerUser = v.DefaultThreadRateLimitPerUser - c.DefaultSortOrder = v.DefaultSortOrder return nil } @@ -1098,7 +1096,6 @@ func (c GuildForumChannel) MarshalJSON() ([]byte, error) { AvailableTags: c.AvailableTags, DefaultReactionEmoji: c.DefaultReactionEmoji, DefaultThreadRateLimitPerUser: c.DefaultThreadRateLimitPerUser, - DefaultSortOrder: c.DefaultSortOrder, }) } @@ -1184,13 +1181,6 @@ type DefaultReactionEmoji struct { EmojiName *string `json:"emoji_name"` } -type DefaultSortOrder int - -const ( - LatestActivity DefaultSortOrder = iota - CreationDate -) - type AutoArchiveDuration int const ( diff --git a/discord/channel_create.go b/discord/channel_create.go index 4e0f9264..9c409672 100644 --- a/discord/channel_create.go +++ b/discord/channel_create.go @@ -189,7 +189,6 @@ type GuildForumChannelCreate struct { RateLimitPerUser int `json:"rate_limit_per_user"` DefaultReactionEmoji DefaultReactionEmoji `json:"default_reaction_emoji"` AvailableTags []ForumTag `json:"available_tags"` - DefaultSortOrder DefaultSortOrder `json:"default_sort_order"` } func (c GuildForumChannelCreate) Type() ChannelType { diff --git a/discord/channel_update.go b/discord/channel_update.go index 5de25d95..65e4c1c6 100644 --- a/discord/channel_update.go +++ b/discord/channel_update.go @@ -105,7 +105,6 @@ type GuildForumChannelUpdate struct { AvailableTags *[]ForumTag `json:"available_tags,omitempty"` DefaultReactionEmoji *json.Nullable[DefaultReactionEmoji] `json:"default_reaction_emoji,omitempty"` DefaultThreadRateLimitPerUser *int `json:"default_thread_rate_limit_per_user,omitempty"` - DefaultSortOrder *DefaultSortOrder `json:"default_sort_order"` } func (GuildForumChannelUpdate) channelUpdate() {} diff --git a/discord/channels_raw.go b/discord/channels_raw.go index aea2052e..0b3f69de 100644 --- a/discord/channels_raw.go +++ b/discord/channels_raw.go @@ -191,7 +191,6 @@ type guildForumChannel struct { AvailableTags []ForumTag `json:"available_tags"` DefaultReactionEmoji *DefaultReactionEmoji `json:"default_reaction_emoji"` DefaultThreadRateLimitPerUser int `json:"default_thread_rate_limit_per_user"` - DefaultSortOrder DefaultSortOrder `json:"default_sort_order"` // idk discord name your shit correctly LastThreadID *snowflake.ID `json:"last_message_id"`