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

First pass on stage channels #1575

Merged
merged 47 commits into from
Jun 29, 2021
Merged

Conversation

MinnDevelopment
Copy link
Member

@MinnDevelopment MinnDevelopment commented Apr 2, 2021

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: #1572

Description

This adds support for stage channels, which are basically just voice channels with topics.

@MinnDevelopment MinnDevelopment added this to the v4.3.0 milestone Apr 2, 2021
@MinnDevelopment MinnDevelopment linked an issue Apr 2, 2021 that may be closed by this pull request
3 tasks
/**
* A {@link StageChannel StageChannel}, Guild-Only.
*/
STAGE(13, 1, true),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: we have to update all usages of channel type in the library for this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this was handled?

@MinnDevelopment MinnDevelopment added the status: freezer this is currently put on hold label Apr 2, 2021
@MinnDevelopment
Copy link
Member Author

Freezing this for now due to discord/discord-api-docs#2751

Please note that this feature is still under active development (even though it is launched), and thus there is higher than normal risk of things possibly changing.

@MinnDevelopment MinnDevelopment added size: small type: feature status: documentation needed lacks documentation, either partially or completely and removed status: freezer this is currently put on hold labels Apr 7, 2021
@MinnDevelopment
Copy link
Member Author

The API for stage channels is kinda weird. I did some digging and found out a few issues that will be annoying to deal with:

  • The request to speak endpoint seems to be REST-only (so you can't join and immediately speak)
  • The endpoint also requires you to specify which channel you are currently in (which requires caching, not a problem for us)
  • They expect an ISO timestamp for the request to speak (i can't understand why but ok)
  • You can suppress yourself? I have no idea why this is a thing
  • Apparently, bots can also approve requests to speak, this is limited through MUTE_MEMBERS permission
  • The request to speak timestamp is also part of voice states, so we can derive an event there

@TheChilliPL

This comment has been minimized.

@shelomito12

This comment has been minimized.

@DV8FromTheWorld
Copy link
Member

It will be ready when it is ready. Stage channels are still in flux behind the scenes in the Discord API.

@Andre601 Andre601 mentioned this pull request May 28, 2021
6 tasks
@MinnDevelopment MinnDevelopment removed the status: documentation needed lacks documentation, either partially or completely label Jun 20, 2021
@MinnDevelopment MinnDevelopment requested review from DV8FromTheWorld and removed request for DV8FromTheWorld June 20, 2021 13:49
src/main/java/net/dv8tion/jda/api/audit/AuditLogKey.java Outdated Show resolved Hide resolved
/**
* A {@link StageChannel StageChannel}, Guild-Only.
*/
STAGE(13, 1, true),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this was handled?

/**
* Create a new {@link StageInstance} for this stage channel.
*
* <p>If there already is an active {@link StageInstance} for this channel, this will fail with {@link net.dv8tion.jda.api.requests.ErrorResponse#STAGE_ALREADY_OPEN ErrorResponse.STAGE_ALREADY_OPEN}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to do pre-checks to see if the stage is active?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to avoid doing pre-checks to avoid race-conditions when recreating a stage instance.

src/main/java/net/dv8tion/jda/internal/requests/Route.java Outdated Show resolved Hide resolved
@MinnDevelopment MinnDevelopment merged commit 1f4ca92 into development Jun 29, 2021
@MinnDevelopment MinnDevelopment deleted the feature/stage-channels branch June 29, 2021 13:55
Tais993 pushed a commit to Tais993/JDA that referenced this pull request Sep 13, 2021
* Add support for speaker moderation
* Add GuildVoiceState#inviteSpeaker/approveSpeaker/declineSpeaker
* Add check for missing members in voice states
* Add support for stage instances
* Add check for missing member in voice state update
* Properly remove lurkers from cache
* Add audit log enum constants
Tais993 pushed a commit to Tais993/JDA that referenced this pull request Sep 19, 2021
* Add support for speaker moderation
* Add GuildVoiceState#inviteSpeaker/approveSpeaker/declineSpeaker
* Add check for missing members in voice states
* Add support for stage instances
* Add check for missing member in voice state update
* Properly remove lurkers from cache
* Add audit log enum constants
Tais993 pushed a commit to Tais993/JDA that referenced this pull request Sep 19, 2021
* Add support for speaker moderation
* Add GuildVoiceState#inviteSpeaker/approveSpeaker/declineSpeaker
* Add check for missing members in voice states
* Add support for stage instances
* Add check for missing member in voice state update
* Properly remove lurkers from cache
* Add audit log enum constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for stage channels
5 participants