MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / forward_to

Method forward_to

src/telegram/_chat.py:2730–2779  ·  view source on GitHub ↗

Shortcut for:: await bot.forward_message(from_chat_id=update.effective_chat.id, *args, **kwargs) For the documentation of the arguments, please see :meth:`telegram.Bot.forward_message`. .. seealso:: :meth:`forward_from`, :meth:`forward_messages_from`, :met

(
        self,
        chat_id: int | str,
        message_id: int,
        disable_notification: ODVInput[bool] = DEFAULT_NONE,
        protect_content: ODVInput[bool] = DEFAULT_NONE,
        message_thread_id: int | None = None,
        video_start_timestamp: int | None = None,
        direct_messages_topic_id: int | None = None,
        suggested_post_parameters: "SuggestedPostParameters | None" = None,
        message_effect_id: str | 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,
    )

Source from the content-addressed store, hash-verified

2728 )
2729
2730 async def forward_to(
2731 self,
2732 chat_id: int | str,
2733 message_id: int,
2734 disable_notification: ODVInput[bool] = DEFAULT_NONE,
2735 protect_content: ODVInput[bool] = DEFAULT_NONE,
2736 message_thread_id: int | None = None,
2737 video_start_timestamp: int | None = None,
2738 direct_messages_topic_id: int | None = None,
2739 suggested_post_parameters: "SuggestedPostParameters | None" = None,
2740 message_effect_id: str | None = None,
2741 *,
2742 read_timeout: ODVInput[float] = DEFAULT_NONE,
2743 write_timeout: ODVInput[float] = DEFAULT_NONE,
2744 connect_timeout: ODVInput[float] = DEFAULT_NONE,
2745 pool_timeout: ODVInput[float] = DEFAULT_NONE,
2746 api_kwargs: JSONDict | None = None,
2747 ) -> "Message":
2748 """Shortcut for::
2749
2750 await bot.forward_message(from_chat_id=update.effective_chat.id, *args, **kwargs)
2751
2752 For the documentation of the arguments, please see :meth:`telegram.Bot.forward_message`.
2753
2754 .. seealso:: :meth:`forward_from`, :meth:`forward_messages_from`,
2755 :meth:`forward_messages_to`
2756
2757 .. versionadded:: 20.0
2758
2759 Returns:
2760 :class:`telegram.Message`: On success, instance representing the message posted.
2761
2762 """
2763 return await self.get_bot().forward_message(
2764 from_chat_id=self.id,
2765 chat_id=chat_id,
2766 message_id=message_id,
2767 video_start_timestamp=video_start_timestamp,
2768 disable_notification=disable_notification,
2769 read_timeout=read_timeout,
2770 write_timeout=write_timeout,
2771 connect_timeout=connect_timeout,
2772 pool_timeout=pool_timeout,
2773 api_kwargs=api_kwargs,
2774 protect_content=protect_content,
2775 message_thread_id=message_thread_id,
2776 direct_messages_topic_id=direct_messages_topic_id,
2777 suggested_post_parameters=suggested_post_parameters,
2778 message_effect_id=message_effect_id,
2779 )
2780
2781 async def forward_messages_from(
2782 self,

Callers

nothing calls this directly

Calls 2

get_botMethod · 0.80
forward_messageMethod · 0.45

Tested by

no test coverage detected