How to attachment in message stream.pipe?

I have a stream received via ffmpeg, how do I attach it as a file in a message without creating the file via fs?
5 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey2y ago
The AttachmentBuilder accepts a Stream or BufferResolvable as the content
LEON
LEONOP2y ago
can you show an example please? my code:
const ffmpeg = require('fluent-ffmpeg');
const mp3Stream = ffmpeg(pcmStream).inputOption('...').outputFormat('mp3')
const ffmpeg = require('fluent-ffmpeg');
const mp3Stream = ffmpeg(pcmStream).inputOption('...').outputFormat('mp3')
I want to send this mp3Stream as a file without creating a file with fs
d.js docs
d.js docs2y ago
class AttachmentBuilder Represents an attachment builder
LEON
LEONOP2y ago
thanks
Want results from more Discord servers?
Add your server