Closed marczeugs closed 3 months ago
To me that documentation doesn't say that bots can send voice message, did I mess something
As discussed on Discord, sending voice notes works just fine once you get the data figured out.
The only tricky part is calculating the waveform, but that's based on the audio data - Kord probably shouldn't be responsible for calculating it.
Oh, and as for what the waveform data actually is - it's one byte per point, so it's probably just volume?
I don't think we should add this before Discord officially supports it
Oh, and as for what the waveform data actually is - it's one byte per point, so it's probably just volume?
Always assumed it's something with volume yes
What counts as officially supporting it? I assumed that because the documentation explains the necessary fields, it is more or less supported?
I don't see why Kord shouldn't expose this API, seems pretty easy to implement from a library perspective and it's already fully documented.
If Kord decides against this, I'll look into supporting it in KordEx.
It is in fact not documented, what is documented is receiving voice messages, as mentioned in https://github.com/discord/discord-api-docs/pull/6082 and as in the documentation you linked being part of the "get channel message" section
Sending voice messages is documented nowhere
As documented in the documentation bots can send voice messages by using the
IS_VOICE_MESSAGE
flag and settingduration_secs
andwaveform
on audio attachments.The voice message flag is available, but the
AttachmentBuilder
/AttachmentRequest
classes are missing the necessaryduration_secs
andwaveform
fields.