Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stage channels #5456

Merged
merged 70 commits into from
Apr 14, 2021
Merged

Conversation

amishshah
Copy link
Member

@amishshah amishshah commented Mar 31, 2021

Please describe the changes this PR makes and why it should be merged:

Adds support for stage channels, and fixes voice states that use stage channels. Tracks discord/discord-api-docs#2751.

Also adds the rtc_region property to voice channels and stage channels.

I believe that this PR meets the current draft for the feature given by Discord. I think the following need to be considered before deeming this feature stable:

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

@amishshah amishshah changed the title feat: add stage channels feat: stage channels Mar 31, 2021
@advaith1
Copy link
Contributor

API docs PR: discord/discord-api-docs#2751

@ThaTiemsz
Copy link
Contributor

ThaTiemsz commented Mar 31, 2021

Could add the new video_quality_mode channel property for voice and stage channels too (not for stage; discord/discord-api-docs#2754 (comment)):

image

Property is not present in the channel object unless you manually change the setting. Then it's one of two values:

enum VideoQualityMode {
    AUTO = 1,
    FULL = 2
}
{
  id: '209719953706844162',
  type: 2,
  name: 'General',
  position: 0,
  parent_id: '355904666480934913',
  bitrate: 63691,
  user_limit: 0,
  rtc_region: null,
  video_quality_mode: 2,
  guild_id: '209719953706844161',
  permission_overwrites: [Array],
  nsfw: false
}

@amishshah
Copy link
Member Author

@NotSugden @BannerBomb I opted to create a BaseGuildVoiceChannel class that both StageChannel and VoiceChannel now extend from. StageChannel and VoiceChannel have quite a few more differences than TextChannel and NewsChannel, so proper inheritance was easier in this case

src/structures/StageChannel.js Outdated Show resolved Hide resolved
src/structures/VoiceChannel.js Outdated Show resolved Hide resolved
src/structures/VoiceState.js Outdated Show resolved Hide resolved
src/structures/VoiceState.js Outdated Show resolved Hide resolved
src/structures/StageChannel.js Outdated Show resolved Hide resolved
src/structures/VoiceChannel.js Show resolved Hide resolved
@amishshah amishshah requested a review from SpaceEEC April 7, 2021 10:41
typings/index.d.ts Outdated Show resolved Hide resolved
src/structures/GuildChannel.js Outdated Show resolved Hide resolved
src/index.js Show resolved Hide resolved
src/structures/StageChannel.js Outdated Show resolved Hide resolved
src/structures/VoiceChannel.js Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
typings/index.d.ts Outdated Show resolved Hide resolved
typings/index.d.ts Show resolved Hide resolved
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Jan <66554238+vaporox@users.noreply.github.com>
esm/discord.mjs Outdated Show resolved Hide resolved
@juni37

This comment has been minimized.

src/structures/StageChannel.js Show resolved Hide resolved
src/structures/VoiceChannel.js Show resolved Hide resolved
src/structures/VoiceState.js Outdated Show resolved Hide resolved
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
@amishshah amishshah merged commit eec7cf7 into discordjs:master Apr 14, 2021
@amishshah amishshah deleted the feat/stage-channels branch April 14, 2021 12:36
@iCrawl iCrawl added this to the Version 13 milestone Jun 27, 2021
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.