Shortcut for:: await bot.send_photo( 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=self.dir
(
self,
photo: "FileInput | PhotoSize",
caption: str | None = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: "ReplyMarkup | None" = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Sequence["MessageEntity"] | None = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: ODVInput[int] = DEFAULT_NONE,
has_spoiler: bool | None = None,
reply_parameters: "ReplyParameters | None" = None,
message_effect_id: str | None = None,
allow_paid_broadcast: bool | None = None,
show_caption_above_media: bool | None = None,
suggested_post_parameters: "SuggestedPostParameters | None" = None,
*,
reply_to_message_id: int | None = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
filename: str | None = 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,
)
| 2631 | ) |
| 2632 | |
| 2633 | async def reply_photo( |
| 2634 | self, |
| 2635 | photo: "FileInput | PhotoSize", |
| 2636 | caption: str | None = None, |
| 2637 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 2638 | reply_markup: "ReplyMarkup | None" = None, |
| 2639 | parse_mode: ODVInput[str] = DEFAULT_NONE, |
| 2640 | caption_entities: Sequence["MessageEntity"] | None = None, |
| 2641 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 2642 | message_thread_id: ODVInput[int] = DEFAULT_NONE, |
| 2643 | has_spoiler: bool | None = None, |
| 2644 | reply_parameters: "ReplyParameters | None" = None, |
| 2645 | message_effect_id: str | None = None, |
| 2646 | allow_paid_broadcast: bool | None = None, |
| 2647 | show_caption_above_media: bool | None = None, |
| 2648 | suggested_post_parameters: "SuggestedPostParameters | None" = None, |
| 2649 | *, |
| 2650 | reply_to_message_id: int | None = None, |
| 2651 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 2652 | filename: str | None = None, |
| 2653 | do_quote: bool | (_ReplyKwargs | None) = None, |
| 2654 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2655 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2656 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2657 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2658 | api_kwargs: JSONDict | None = None, |
| 2659 | ) -> "Message": |
| 2660 | """Shortcut for:: |
| 2661 | |
| 2662 | await bot.send_photo( |
| 2663 | update.effective_message.chat_id, |
| 2664 | message_thread_id=update.effective_message.message_thread_id, |
| 2665 | business_connection_id=self.business_connection_id, |
| 2666 | direct_messages_topic_id=self.direct_messages_topic.topic_id, |
| 2667 | *args, |
| 2668 | **kwargs, |
| 2669 | ) |
| 2670 | |
| 2671 | For the documentation of the arguments, please see :meth:`telegram.Bot.send_photo`. |
| 2672 | |
| 2673 | .. versionchanged:: 21.1 |
| 2674 | |reply_same_thread| |
| 2675 | |
| 2676 | .. versionchanged:: 22.0 |
| 2677 | |quote_removed| |
| 2678 | |
| 2679 | Keyword Args: |
| 2680 | do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote| |
| 2681 | |
| 2682 | .. versionadded:: 20.8 |
| 2683 | |
| 2684 | Returns: |
| 2685 | :class:`telegram.Message`: On success, instance representing the message posted. |
| 2686 | |
| 2687 | """ |
| 2688 | chat_id, effective_reply_parameters = await self._parse_quote_arguments( |
| 2689 | do_quote, reply_to_message_id, reply_parameters, allow_sending_without_reply |
| 2690 | ) |