Skip to main content

Function: downloadMediaMessage()

downloadMediaMessage<Type>(message, type, options, ctx?): Promise<Type extends "buffer" ? Buffer<ArrayBufferLike> : Transform>

Defined in: src/Utils/messages.ts:857

Downloads the given message. Throws an error if it's not a media message

Type Parameters

Type extends "stream" | "buffer"

Parameters

message

IWebMessageInfo

type

Type

options

MediaDownloadOptions

ctx?

DownloadMediaMessageContext

Returns

Promise<Type extends "buffer" ? Buffer<ArrayBufferLike> : Transform>