discord.py icon indicating copy to clipboard operation
discord.py copied to clipboard

Voice message support

Open mechanira opened this issue 8 months ago • 5 comments

Summary

Add support for sending audio as voice messages

What is the feature request for?

The core library

The Problem

I've been thinking of a way of sending audio as voice messages for my bots. Turns out it's technically possible to do that with the API currently, and the specifics of it are documented here: https://gist.github.com/HDR/7d5d4ce8bbe4b715d788a9bc9f99e02d

The Ideal Solution

To send a voice message you need to set the message flag to 8192 in the message data, have an audio file (only .ogg is supported) attachment with waveform data that's essentially just a base64 encoded byte array. Basically what I'm thinking is the message send methods could have a voice message parameter for passing a voice attachment object with all the data mentioned above.

The Current Solution

No response

Additional Context

No response

mechanira avatar Apr 18 '25 20:04 mechanira

i agree

GDOlivercoding avatar Apr 23 '25 07:04 GDOlivercoding

this is already possible by sending a message with a .ogg file using await channel.send(file=file)

K1ngzx20 avatar May 19 '25 00:05 K1ngzx20

this is already possible by sending a message with a .ogg file using await channel.send(file=file)

Doesn't look the same, so might be worth looking into

This is just me attaching a file called voice-message.ogg and doing nothing else

Image

blord0 avatar Jul 15 '25 12:07 blord0

Doesn't look the same, so might be worth looking into

This is just me attaching a file called voice-message.ogg and doing nothing else

Image

Yeah I looked at it myself and realized what they were talking about. We should definitely look at it to see if it's possible.

K1ngzx20 avatar Jul 15 '25 21:07 K1ngzx20

Started work for this in https://github.com/Rapptz/discord.py/pull/10230

blord0 avatar Jul 16 '25 19:07 blord0