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

Did you find this page helpful?