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

Document voice messages. #6082

Merged
merged 3 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
More updates.
  • Loading branch information
tpcstld committed Apr 19, 2023
commit 260270603376e4b2ad0d3bd006e8c449e4ef75b7
5 changes: 4 additions & 1 deletion docs/resources/Channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,8 +521,11 @@ Voice messages are messages with the `IS_VOICE_MESSAGE` flag. They have the foll
- Only a single audio attachment is allowed. No content, stickers, etc...
- The [attachment](#DOCS_RESOURCES_CHANNEL/attachment-object) has additional fields: `duration_secs` and `waveform`.

The `waveform` is intended to be a preview of the entire voice message, with 1 byte per datapoint encoded in base64. Clients sample the recording at most
once per 100 milliseconds, but will downsample so that no more than 256 datapoints are in the waveform.

As of 2023-04-14, clients upload a 1 channel, 48000 Hz, 32kbps Opus stream in an OGG container.
This is an implementation detail and may change without warning or documentation.
The encoding, and the waveform details, are an implementation detail and may change without warning or documentation.

### Followed Channel Object

Expand Down
5 changes: 5 additions & 0 deletions docs/topics/Opcodes_and_Status_Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,11 @@ Along with the HTTP error code, our API can also return more detailed error code
| 50145 | Cannot convert between premium emoji and normal emoji |
| 50146 | Uploaded file not found. |
| 50163 | Cannot delete guild subscription integration |
| 50159 | Voice messages do not support additional content. |
| 50160 | Voice messages must have a single audio attachment. |
| 50161 | Voice messages must have supporting metadata. |
| 50162 | Voice messages cannot be edited. |
| 50173 | You cannot send voice messages in this channel. |
| 50600 | You do not have permission to send this sticker. |
| 60003 | Two factor is required for this operation |
| 80004 | No users with DiscordTag exist |
Expand Down