-
Is there any way to have the selfbot recieve audio from the users in the voice channel? I know theres a way to do this with discordjs/voice but im not sure how to implement that while also using the streaming function from this library. Does anyone know how i can do this? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's not currently coded but it would be done like this: This portion of the code is what is listening for incoming UDP media packets: The message would be an RTP packet with Opus payload. Looks something like this: [ 12 byte header ] [ (RTP extension) (Opus payload) ] [ 4 bytes of nonce ] Bolded part is the encrypted portion. You would have to decrypt this and that's how you get your Opus audio |
Beta Was this translation helpful? Give feedback.
It's not currently coded but it would be done like this:
This portion of the code is what is listening for incoming UDP media packets:
Discord-video-stream/src/client/voice/MediaUdp.ts
Line 89 in 6229124
The message would be an RTP packet with Opus payload. Looks something like this:
[ 12 byte header ] [ (RTP extension) (Opus payload) ] [ 4 bytes of nonce ]
Bolded part is the encrypted portion. You would have to decrypt this and that's how you get your Opus audio