π 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
- Yarn
- pnpm
npm install @opengram/media-group
yarn add @opengram/media-group
pnpm add @opengram/media-group
How to useβ
Configurationβ
Accepted fields:
Property | Description | Required | Default value |
---|---|---|---|
timeout | Timeout after which the media group is considered processed | No | 100 |
store | Map-compatible store used for temporary storing media group messages | No | Map |
allowedUpdates | List of allowed updates | No | ['video', 'audio', 'photo', 'document'] |
Result objectβ
You can get plugin result in ctx.mediaGroup
, that object contains media group messages array.
Usage exampleβ
- Basic
- With external store
Loading...
Loading...