Shortcut for:: await bot.send_media_group( update.effective_message.chat_id, message_thread_id=update.effective_message.message_thread_id, business_connection_id=self.business_connection_id, direct_messages_topic_id=se
(
self,
media: Sequence[
"InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo | InputMediaLivePhoto" # noqa: E501 # pylint: disable=line-too-long
],
disable_notification: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: ODVInput[int] = DEFAULT_NONE,
reply_parameters: "ReplyParameters | None" = None,
message_effect_id: str | None = None,
allow_paid_broadcast: bool | None = None,
*,
reply_to_message_id: int | None = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
do_quote: bool | (_ReplyKwargs | None) = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
connect_timeout: ODVInput[float] = DEFAULT_NONE,
pool_timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict | None = None,
caption: str | None = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Sequence["MessageEntity"] | None = None,
)
| 2552 | ) |
| 2553 | |
| 2554 | async def reply_media_group( |
| 2555 | self, |
| 2556 | media: Sequence[ |
| 2557 | "InputMediaAudio | InputMediaDocument | InputMediaPhoto | InputMediaVideo | InputMediaLivePhoto" # noqa: E501 # pylint: disable=line-too-long |
| 2558 | ], |
| 2559 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 2560 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 2561 | message_thread_id: ODVInput[int] = DEFAULT_NONE, |
| 2562 | reply_parameters: "ReplyParameters | None" = None, |
| 2563 | message_effect_id: str | None = None, |
| 2564 | allow_paid_broadcast: bool | None = None, |
| 2565 | *, |
| 2566 | reply_to_message_id: int | None = None, |
| 2567 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 2568 | do_quote: bool | (_ReplyKwargs | None) = None, |
| 2569 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2570 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2571 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2572 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2573 | api_kwargs: JSONDict | None = None, |
| 2574 | caption: str | None = None, |
| 2575 | parse_mode: ODVInput[str] = DEFAULT_NONE, |
| 2576 | caption_entities: Sequence["MessageEntity"] | None = None, |
| 2577 | ) -> tuple["Message", ...]: |
| 2578 | """Shortcut for:: |
| 2579 | |
| 2580 | await bot.send_media_group( |
| 2581 | update.effective_message.chat_id, |
| 2582 | message_thread_id=update.effective_message.message_thread_id, |
| 2583 | business_connection_id=self.business_connection_id, |
| 2584 | direct_messages_topic_id=self.direct_messages_topic.topic_id, |
| 2585 | *args, |
| 2586 | **kwargs, |
| 2587 | ) |
| 2588 | |
| 2589 | For the documentation of the arguments, please see :meth:`telegram.Bot.send_media_group`. |
| 2590 | |
| 2591 | .. versionchanged:: 21.1 |
| 2592 | |reply_same_thread| |
| 2593 | |
| 2594 | .. versionchanged:: 22.0 |
| 2595 | |quote_removed| |
| 2596 | |
| 2597 | Keyword Args: |
| 2598 | do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote| |
| 2599 | |
| 2600 | .. versionadded:: 20.8 |
| 2601 | |
| 2602 | Returns: |
| 2603 | tuple[:class:`telegram.Message`]: An array of the sent Messages. |
| 2604 | |
| 2605 | Raises: |
| 2606 | :class:`telegram.error.TelegramError` |
| 2607 | """ |
| 2608 | chat_id, effective_reply_parameters = await self._parse_quote_arguments( |
| 2609 | do_quote, reply_to_message_id, reply_parameters, allow_sending_without_reply |
| 2610 | ) |
| 2611 | message_thread_id = self._parse_message_thread_id(chat_id, message_thread_id) |