Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Attach Media Group to Message #663

Unanswered
AlexanderFalkenberg asked this question in Q&A
Discussion options

First of all, thank you for implementing the mediaGroup method! @MarioGattolla.

Is it possible to attach a Media Group to a message? Are there any plans to implement it?

You must be logged in to vote

Replies: 2 comments

Comment options

Hi @AlexanderFalkenberg , unfortunately sendMediaGroup method doesn't support the "caption" attribute (https://core.telegram.org/bots/api#sendmediagroup) like other attachments. You can try with the "reply_parameters" attribute, this will link the MediaGroup to a message like this :

$last_message_id = $telegraphChat->message('message')->send()->telegraphMessageId();

$telegraphChat->mediaGroup([
 [
 'type' => 'photo',
 'media' => 'https://test.jpg',
 ],
 [
 'type' => 'photo',
 'media' => 'https://test.jpg',
 ],
])->withData('reply_parameters', ['message_id' => $last_message_id])->send();
You must be logged in to vote
0 replies
Comment options

Actually it is possible, just add caption key to the first only attachment.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #601 on November 19, 2024 10:24.

AltStyle によって変換されたページ (->オリジナル) /