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

Add support for sending voice messages #963

Closed
marczeugs opened this issue Jul 30, 2024 · 7 comments
Closed

Add support for sending voice messages #963

marczeugs opened this issue Jul 30, 2024 · 7 comments

Comments

@marczeugs
Copy link

As documented in the documentation bots can send voice messages by using the IS_VOICE_MESSAGE flag and setting duration_secs and waveform on audio attachments.

The voice message flag is available, but the AttachmentBuilder/AttachmentRequest classes are missing the necessary duration_secs and waveform fields.

@DRSchlaubi
Copy link
Member

To me that documentation doesn't say that bots can send voice message, did I mess something

  • The last time I checked requests failed with this error
  • The waveform field is required, however it is not documented what it actually contains

@DRSchlaubi DRSchlaubi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 30, 2024
@gdude2002
Copy link
Contributor

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.

@gdude2002
Copy link
Contributor

Oh, and as for what the waveform data actually is - it's one byte per point, so it's probably just volume?

@DRSchlaubi
Copy link
Member

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

@marczeugs
Copy link
Author

What counts as officially supporting it? I assumed that because the documentation explains the necessary fields, it is more or less supported?

@gdude2002
Copy link
Contributor

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.

@DRSchlaubi
Copy link
Member

It is in fact not documented, what is documented is receiving voice messages, as mentioned in discord/discord-api-docs#6082 and as in the documentation you linked being part of the "get channel message" section

Sending voice messages is documented nowhere

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

No branches or pull requests

3 participants