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

Method reply_audio

src/telegram/_message.py:2799–2886  ·  view source on GitHub ↗

Shortcut for:: await bot.send_audio( 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,
        audio: "FileInput | Audio",
        duration: TimePeriod | None = None,
        performer: str | None = None,
        title: str | None = None,
        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,
        thumbnail: "FileInput | None" = None,
        reply_parameters: "ReplyParameters | None" = None,
        message_effect_id: str | None = None,
        allow_paid_broadcast: 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,
    )

Source from the content-addressed store, hash-verified

2797 )
2798
2799 async def reply_audio(
2800 self,
2801 audio: "FileInput | Audio",
2802 duration: TimePeriod | None = None,
2803 performer: str | None = None,
2804 title: str | None = None,
2805 caption: str | None = None,
2806 disable_notification: ODVInput[bool] = DEFAULT_NONE,
2807 reply_markup: "ReplyMarkup | None" = None,
2808 parse_mode: ODVInput[str] = DEFAULT_NONE,
2809 caption_entities: Sequence["MessageEntity"] | None = None,
2810 protect_content: ODVInput[bool] = DEFAULT_NONE,
2811 message_thread_id: ODVInput[int] = DEFAULT_NONE,
2812 thumbnail: "FileInput | None" = None,
2813 reply_parameters: "ReplyParameters | None" = None,
2814 message_effect_id: str | None = None,
2815 allow_paid_broadcast: bool | None = None,
2816 suggested_post_parameters: "SuggestedPostParameters | None" = None,
2817 *,
2818 reply_to_message_id: int | None = None,
2819 allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
2820 filename: str | None = None,
2821 do_quote: bool | (_ReplyKwargs | None) = None,
2822 read_timeout: ODVInput[float] = DEFAULT_NONE,
2823 write_timeout: ODVInput[float] = DEFAULT_NONE,
2824 connect_timeout: ODVInput[float] = DEFAULT_NONE,
2825 pool_timeout: ODVInput[float] = DEFAULT_NONE,
2826 api_kwargs: JSONDict | None = None,
2827 ) -> "Message":
2828 """Shortcut for::
2829
2830 await bot.send_audio(
2831 update.effective_message.chat_id,
2832 message_thread_id=update.effective_message.message_thread_id,
2833 business_connection_id=self.business_connection_id,
2834 direct_messages_topic_id=self.direct_messages_topic.topic_id,
2835 *args,
2836 **kwargs,
2837 )
2838
2839 For the documentation of the arguments, please see :meth:`telegram.Bot.send_audio`.
2840
2841 .. versionchanged:: 21.1
2842 |reply_same_thread|
2843
2844 .. versionchanged:: 22.0
2845 |quote_removed|
2846
2847 Keyword Args:
2848 do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote|
2849
2850 .. versionadded:: 20.8
2851
2852 Returns:
2853 :class:`telegram.Message`: On success, instance representing the message posted.
2854
2855 """
2856 chat_id, effective_reply_parameters = await self._parse_quote_arguments(

Callers 1

test_reply_audioMethod · 0.80

Calls 5

get_botMethod · 0.80
send_audioMethod · 0.45

Tested by 1

test_reply_audioMethod · 0.64