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 User16mo ago
Message Not Public
Sign In & Join Server To View
monbrey
monbrey16mo ago
The AttachmentBuilder accepts a Stream or BufferResolvable as the content
LEON
LEON16mo 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 docs16mo ago
class AttachmentBuilder Represents an attachment builder
LEON
LEON16mo ago
thanks