Skip to content

GramIO API Reference / @gramio/files/dist / MediaInput

Class: MediaInput ​

Defined in: files/index.d.ts:50

Class-helper with static methods that represents the content of a media message to be sent.

Documentation

Constructors ​

Constructor ​

new MediaInput(): MediaInput

Returns ​

MediaInput

Methods ​

animation() ​

static animation(media, options?): TelegramInputMediaAnimation

Defined in: files/index.d.ts:56

Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

Documentation

Parameters ​

ParameterType
mediastring | Blob
options?Omit<TelegramInputMediaAnimation, "media" | "type">

Returns ​

TelegramInputMediaAnimation


audio() ​

static audio(media, options?): TelegramInputMediaAudio

Defined in: files/index.d.ts:68

Represents an audio file to be treated as music to be sent.

Documentation

Parameters ​

ParameterType
mediastring | Blob
options?Omit<TelegramInputMediaAudio, "media" | "type">

Returns ​

TelegramInputMediaAudio


document() ​

static document(media, options?): TelegramInputMediaDocument

Defined in: files/index.d.ts:62

Represents a general file to be sent.

Documentation

Parameters ​

ParameterType
mediastring | Blob
options?Omit<TelegramInputMediaDocument, "media" | "type">

Returns ​

TelegramInputMediaDocument


photo() ​

static photo(media, options?): TelegramInputMediaPhoto

Defined in: files/index.d.ts:74

Represents a photo to be sent.

Documentation

Parameters ​

ParameterType
mediastring | Blob
options?Omit<TelegramInputMediaPhoto, "media" | "type">

Returns ​

TelegramInputMediaPhoto


video() ​

static video(media, options?): TelegramInputMediaVideo

Defined in: files/index.d.ts:80

Represents a video to be sent.

Documentation

Parameters ​

ParameterType
mediastring | Blob
options?Omit<TelegramInputMediaVideo, "media" | "type">

Returns ​

TelegramInputMediaVideo