Closed Icebluewolf closed 1 month ago
Would you mind providing a channel ID and message ID for the interaction response? Would help us out a little. :)
Of the message in the screenshot?
If so:
Channel: 977181204916867163
Message: 1285682504149242000
If you are going to provide the content type, you need to provide the correct content type.
Content-Type: application/octet-stream
is a generic octet stream but doesn't tell us anything about what is coming over the wire.
For voice messages, you will need to provide the audio/---
content type, like audio/ogg
or audio/wav
, otherwise duration_secs
and waveform
will be stripped.
This looks like a gap in the docs; We'd be happy to accept clarifying contributions to the docs to address these holes.
Description
When responding to an interaction by sending a message that contains a audio file and is marked as a Voice Message the
waveform
andduration_sec
are ignored.This only seems to happen on interaction responses. When discord returns the message object with attachment information these fields are excluded from the response.
Steps to Reproduce
Create a slash command that send a audio file. Ensure that you use the message flag for voice messages (8192). Provide a waveform and duraction_sec for the audio file.
The raw response should look similar to this
Expected Behavior
The audio file is a voice message with the provided
waveform
andduraction_sec
Current Behavior
The audio file IS a voice message but does not use the provided
waveform
orduration_sec
. Rather it acts as if they were not provided. This is what the bot receives from the gateway when the message is sent. Note thatwaveform
andduration_sec
are not included.Screenshots/Videos
The bottom was sent to the channel directly.
Client and System Information
Edition Windows 11 Home Version 23H2 Installed on 6/23/2024 OS build 22631.4169 Experience Windows Feature Experience Pack 1000.22700.1034.0
Using py-cord library in Python
Discord Info: canary 327592 (452e031) Host 1.0.449 x64 (52522) Build Override: N/A Windows 11 64-bit (10.0.22631)