Skip to content

Commit

Permalink
Revert "add default sort order to forums"
Browse files Browse the repository at this point in the history
  • Loading branch information
caneleex committed Sep 20, 2022
1 parent d5b5254 commit 1e34b93
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 13 deletions.
10 changes: 0 additions & 10 deletions discord/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,6 @@ type GuildForumChannel struct {
AvailableTags []ForumTag
DefaultReactionEmoji *DefaultReactionEmoji
DefaultThreadRateLimitPerUser int
DefaultSortOrder DefaultSortOrder
}

func (c *GuildForumChannel) UnmarshalJSON(data []byte) error {
Expand All @@ -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
}

Expand All @@ -1098,7 +1096,6 @@ func (c GuildForumChannel) MarshalJSON() ([]byte, error) {
AvailableTags: c.AvailableTags,
DefaultReactionEmoji: c.DefaultReactionEmoji,
DefaultThreadRateLimitPerUser: c.DefaultThreadRateLimitPerUser,
DefaultSortOrder: c.DefaultSortOrder,
})
}

Expand Down Expand Up @@ -1184,13 +1181,6 @@ type DefaultReactionEmoji struct {
EmojiName *string `json:"emoji_name"`
}

type DefaultSortOrder int

const (
LatestActivity DefaultSortOrder = iota
CreationDate
)

type AutoArchiveDuration int

const (
Expand Down
1 change: 0 additions & 1 deletion discord/channel_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion discord/channel_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down
1 change: 0 additions & 1 deletion discord/channels_raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 1e34b93

Please sign in to comment.