Skip to main content

🏞 Media group

Telegram media groups is not one update, it's separated messages with field media_group_id. This makes it difficult to work with them, since you need to get all these messages in order to process the media group. This plugin allows you to easily handle and copy media groups.

The plugin works with video, audio, photo, document and their combinations.

Installing a plugin​

npm install @opengram/media-group

How to use​

Configuration​

Accepted fields:

PropertyDescriptionRequiredDefault value
timeoutTimeout after which the media group is considered processedNo100
storeMap-compatible store used for temporary storing media group messagesNoMap
allowedUpdatesList of allowed updatesNo['video', 'audio', 'photo', 'document']

Result object​

You can get plugin result in ctx.mediaGroup, that object contains media group messages array.

Usage example​

Loading...

Flowchart

Click to expand

Additional Information​