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

API Documentation for Stage Channels. #2751

Merged
merged 6 commits into from
Apr 7, 2021
Merged

API Documentation for Stage Channels. #2751

merged 6 commits into from
Apr 7, 2021

Conversation

tpcstld
Copy link
Contributor

@tpcstld tpcstld commented Mar 31, 2021

Summary

This PR adds documentation for stage channels. Go wild!

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. Nevertheless, we are confident that everything documented in this PR should be "pretty stable", with the exception of the REQUEST_TO_SPEAK permission, which we may (but there is no current plan) remove for alternative options of selective gating.

Comment on lines +974 to +991
###### Caveats

There are currently several caveats for this endpoint:

- `channel_id` must currently point to a stage channel.
- current user must already have joined `channel_id`.
- You must have the `MUTE_MEMBERS` permission to unsuppress yourself. You can always suppress yourself.
- You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak.
- You are able to set `request_to_speak_timestamp` to any present or future time.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not too happy with how I effectively listed a bunch of product behaviour here and below. Things that are mostly in flux too and probably improved in the future. Perhaps I should move this to another section/page? Not sure how we do things in other sections.

Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly, we don't have much consistency around this. If it's in flux, you can put a

> warn
> This logic is still in testing and could be changed

@ven
Copy link

ven commented Mar 31, 2021

nice

@alii
Copy link

alii commented Mar 31, 2021

Nice, would love to see this.

- `channel_id` must currently point to a stage channel.
- User must already have joined `channel_id`.
- You must have the `MUTE_MEMBERS` permission. (Since suppression is the only thing that is available currently.)
- When unsuppressed, non-bot users will have their `request_to_speak_timestamp` set to the current time. Bot users will not.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We chose to not set request_to_speak_timestamp, so that bots would effectively "auto speak" when they were invited. The advantage is that most bots (once they are able to join the stage channel), wouldn't have to do anything to support going "onto the stage".

The disadvantage is that maybe there is some unique usecase where a bot would like to accept when they got voluntold up to the stage. But we haven't been able to come up with anything substainally useful. Please note that bots are still able to "raise their hand" regardless of this behaviour.

| MANAGE_ROLES \* | `0x010000000` | Allows management and editing of roles | T, V, S |
| MANAGE_WEBHOOKS \* | `0x020000000` | Allows management and editing of webhooks | T |
| MANAGE_EMOJIS \* | `0x040000000` | Allows management and editing of emojis | |
| REQUEST_TO_SPEAK | `0x100000000` | Allows for requesting to speak in stage channels. (_This permission is under active development and may be changed or removed._) | S |

Choose a reason for hiding this comment

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

This causes 32-bit int overflow. Even unsigned.

Copy link
Contributor

Choose a reason for hiding this comment

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

which is why they are sent as strings, you should parse them with your language's BigInt (or similar) functionality, or a library for it. permissions should be stored as bigints, read the docs: https://discord.com/developers/docs/topics/permissions

@amishshah
Copy link
Contributor

Users with the MANAGE_CHANNELS permission are able to bypass the user limit on voice channels - does this also apply to stage channels?

@tpcstld
Copy link
Contributor Author

tpcstld commented Apr 2, 2021

Users with the MANAGE_CHANNELS permission are able to bypass the user limit on voice channels - does this also apply to stage channels?

I think the permission is MOVE_MEMBERS actually. Nevertheless, yes, this bypass works right now, but this is more of an implementation detail and may change in the future.

Copy link
Contributor

@msciotti msciotti left a comment

Choose a reason for hiding this comment

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

Small naming nits

| shield | shield style widget with Discord icon and guild members online count | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=shield) |
| banner1 | large image with guild icon, name and online count. "POWERED BY DISCORD" as the footer of the widget | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner1) |
| banner2 | smaller widget style with guild icon, name and online count. Split on the right with Discord logo | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner2) |
| banner3 | large image with guild icon, name and online count. In the footer, Discord logo on the left and "Chat Now" on the right | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner3) |
| banner4 | large Discord logo at the top of the widget. Guild icon, name and online count in the middle portion of the widget and a "JOIN MY SERVER" button at the bottom | [Example](https://discord.com/api/guilds/81384788765712384/widget.png?style=banner4) |

## Update Self Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/@me
Copy link
Contributor

Choose a reason for hiding this comment

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

"Update Current User Voice State"

- You must have the `REQUEST_TO_SPEAK` permission to request to speak. You can always clear your own request to speak.
- You are able to set `request_to_speak_timestamp` to any present or future time.

## Update Others Voice State % PATCH /guilds/{guild.id#DOCS_RESOURCES_GUILD/guild-object}/voice-states/{user.id#DOCS_RESOURCES_USER/user-object}
Copy link
Contributor

Choose a reason for hiding this comment

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

"Update User Voice State"

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.

7 participants