Skip to content

Add guild_media channel type (16)#727

Open
Sim-hu wants to merge 1 commit into
Kraigie:masterfrom
Sim-hu:add-guild-media-channel-type
Open

Add guild_media channel type (16)#727
Sim-hu wants to merge 1 commit into
Kraigie:masterfrom
Sim-hu:add-guild-media-channel-type

Conversation

@Sim-hu

@Sim-hu Sim-hu commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add GUILD_MEDIA (type 16) to Nostrum.Constants.ChannelType
  • Add guild_media_channel typespec to Nostrum.Struct.Channel
  • Add documentation entry for the new channel type

Motivation

Discord introduced the GUILD_MEDIA channel type (16) for media-heavy content channels. It behaves similarly to forum channels but is optimized for visual media. nostrum currently defines types up to guild_forum (15) but is missing this type, which means media channels received from the gateway will have an unrecognized type value.

Reference: https://discord.com/developers/docs/resources/channel#channel-object-channel-types

Changes

  • lib/nostrum/constants.ex — add guild_media/0 returning 16
  • lib/nostrum/struct/channel.ex — add typespec, documentation table entry, and include in union type t

Testing

  • mix compile passes
  • mix test — 212 tests, 0 failures

Add the GUILD_MEDIA channel type introduced by Discord for
media-heavy content channels. This includes the constant,
typespec, and documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant