> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# toBuffer

> Function toBuffer in the Baileys API.

> **toBuffer**(`stream`): `Promise`\<`Buffer`\<`ArrayBuffer`>>

Defined in: [src/Utils/messages-media.ts:294](https://github.com/WhiskeySockets/Baileys/blob/master/src/Utils/messages-media.ts#L294)

## Parameters

### stream

`Readable`

## Returns

`Promise`\<`Buffer`\<`ArrayBuffer`>>
