Skip to content

Commit

Permalink
Docs and Channel Additions (#637)
Browse files Browse the repository at this point in the history
* Update Message type typedoc from latest API docs

* Update buttons guide image from API docs

* Update `Struct.Channel` with default_sort_order and default_forum_layout

Update guild_forum_channel type spec accordingly

* Remove id callout to match rest of typedocs
  • Loading branch information
kyleboe authored Nov 1, 2024
1 parent 51cb924 commit b35b99b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
Binary file modified guides/assets/buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions lib/nostrum/struct/channel.ex
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ defmodule Nostrum.Struct.Channel do
:available_tags,
:applied_tags,
:default_reaction_emoji,
:default_thread_rate_limit_per_user
:default_thread_rate_limit_per_user,
:default_sort_order,
:default_forum_layout
]

@typedoc """
Expand Down Expand Up @@ -219,6 +221,18 @@ defmodule Nostrum.Struct.Channel do
@typedoc since: "0.7.0"
@type default_thread_rate_limit_per_user :: integer() | nil

@typedoc """
The default sort order for posts in a `GUILD_FORUM` channel.
"""
@typedoc since: "0.11.0"
@type default_sort_order :: integer() | nil

@typedoc """
The default layout for posts in a `GUILD_FORUM` channel.
"""
@typedoc since: "0.11.0"
@type default_forum_layout :: integer() | nil

@typedoc """
The user limit of a voice channel.
"""
Expand Down Expand Up @@ -620,7 +634,9 @@ defmodule Nostrum.Struct.Channel do
available_tags: [forum_tag],
rate_limit_per_user: rate_limit_per_user,
default_reaction_emoji: default_reaction_emoji,
default_thread_rate_limit_per_user: default_thread_rate_limit_per_user
default_thread_rate_limit_per_user: default_thread_rate_limit_per_user,
default_sort_order: default_sort_order,
default_forum_layout: default_forum_layout
}

@typedoc """
Expand Down
25 changes: 20 additions & 5 deletions lib/nostrum/struct/message.ex
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,35 @@ defmodule Nostrum.Struct.Message do
- `5` - `CHANNEL_ICON_CHANGE`
- `6` - `CHANNEL_PINNED_MESSAGE`
- `7` - `GUILD_MEMBER_JOIN`
- `8` - `USER_PREMIUM_GUILD_SUBSCRIPTION`
- `9` - `USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1`
- `10` - `USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_2`
- `11` - `USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_3`
- `8` - `GUILD_BOOST`
- `9` - `GUILD_BOOST_TIER_1`
- `10` - `GUILD_BOOST_TIER_2`
- `11` - `GUILD_BOOST_TIER_3`
- `12` - `CHANNEL_FOLLOW_ADD`
- `14` - `GUILD_DISCOVERY_DISQUALIFIED`
- `15` - `GUILD_DISCOVERY_REQUALIFIED`
- `16` - `GUILD_DISCOVERY_GRACE_PERIOD_INITIAL_WARNING`
- `17` - `GUILD_DISCOVERY_GRACE_PERIOD_FINAL_WARNING`
- `18` - `THREAD_CREATED`
- `19` - `REPLY`
- `20` - `APPLICATION_COMMAND`
- `20` - `CHAT_INPUT_COMMAND`
- `21` - `THREAD_STARTER_MESSAGE`
- `22` - `GUILD_INVITE_REMINDER`
- `23` - `CONTEXT_MENU_COMMAND`
- `24` - `AUTO_MODERATION_ACTION`
- `25` - `ROLE_SUBSCRIPTION_PURCHASE`
- `26` - `INTERACTION_PREMIUM_UPSELL`
- `27` - `STAGE_START`
- `28` - `STAGE_END`
- `29` - `STAGE_SPEAKER`
- `31` - `STAGE_TOPIC`
- `32` - `GUILD_APPLICATION_PREMIUM_SUBSCRIPTION`
- `36` - `GUILD_INCIDENT_ALERT_MODE_ENABLED`
- `37` - `GUILD_INCIDENT_ALERT_MODE_DISABLED`
- `38` - `GUILD_INCIDENT_REPORT_RAID`
- `39` - `GUILD_INCIDENT_REPORT_FALSE_ALARM`
- `44` - `PURCHASE_NOTIFICATION`
- `46` - `POLL_RESULT`
"""
@type type :: integer()

Expand Down

0 comments on commit b35b99b

Please sign in to comment.