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

Method reply_text

src/telegram/_message.py:2171–2250  ·  view source on GitHub ↗

Shortcut for:: await bot.send_message( 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.d

(
        self,
        text: str,
        parse_mode: ODVInput[str] = DEFAULT_NONE,
        disable_notification: ODVInput[bool] = DEFAULT_NONE,
        reply_markup: "ReplyMarkup | None" = None,
        entities: Sequence["MessageEntity"] | None = None,
        protect_content: ODVInput[bool] = DEFAULT_NONE,
        message_thread_id: ODVInput[int] = DEFAULT_NONE,
        link_preview_options: ODVInput["LinkPreviewOptions"] = DEFAULT_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,
        disable_web_page_preview: bool | 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

2169 return self.direct_messages_topic.topic_id if self.direct_messages_topic else None
2170
2171 async def reply_text(
2172 self,
2173 text: str,
2174 parse_mode: ODVInput[str] = DEFAULT_NONE,
2175 disable_notification: ODVInput[bool] = DEFAULT_NONE,
2176 reply_markup: "ReplyMarkup | None" = None,
2177 entities: Sequence["MessageEntity"] | None = None,
2178 protect_content: ODVInput[bool] = DEFAULT_NONE,
2179 message_thread_id: ODVInput[int] = DEFAULT_NONE,
2180 link_preview_options: ODVInput["LinkPreviewOptions"] = DEFAULT_NONE,
2181 reply_parameters: "ReplyParameters | None" = None,
2182 message_effect_id: str | None = None,
2183 allow_paid_broadcast: bool | None = None,
2184 suggested_post_parameters: "SuggestedPostParameters | None" = None,
2185 *,
2186 reply_to_message_id: int | None = None,
2187 allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
2188 disable_web_page_preview: bool | None = None,
2189 do_quote: bool | (_ReplyKwargs | None) = None,
2190 read_timeout: ODVInput[float] = DEFAULT_NONE,
2191 write_timeout: ODVInput[float] = DEFAULT_NONE,
2192 connect_timeout: ODVInput[float] = DEFAULT_NONE,
2193 pool_timeout: ODVInput[float] = DEFAULT_NONE,
2194 api_kwargs: JSONDict | None = None,
2195 ) -> "Message":
2196 """Shortcut for::
2197
2198 await bot.send_message(
2199 update.effective_message.chat_id,
2200 message_thread_id=update.effective_message.message_thread_id,
2201 business_connection_id=self.business_connection_id,
2202 direct_messages_topic_id=self.direct_messages_topic.topic_id,
2203 *args,
2204 **kwargs,
2205 )
2206
2207 For the documentation of the arguments, please see :meth:`telegram.Bot.send_message`.
2208
2209 .. versionchanged:: 21.1
2210 |reply_same_thread|
2211
2212 .. versionchanged:: 22.0
2213 |quote_removed|
2214
2215 Keyword Args:
2216 do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote|
2217
2218 .. versionadded:: 20.8
2219
2220 Returns:
2221 :class:`telegram.Message`: On success, instance representing the message posted.
2222
2223 """
2224 chat_id, effective_reply_parameters = await self._parse_quote_arguments(
2225 do_quote, reply_to_message_id, reply_parameters, allow_sending_without_reply
2226 )
2227 message_thread_id = self._parse_message_thread_id(chat_id, message_thread_id)
2228 return await self.get_bot().send_message(

Callers 15

test_reply_textMethod · 0.80
test_default_do_quoteMethod · 0.80
startFunction · 0.80
help_commandFunction · 0.80
startFunction · 0.80
deep_linked_level_1Function · 0.80
deep_linked_level_2Function · 0.80
deep_linked_level_3Function · 0.80
deep_linked_level_4Function · 0.80
startFunction · 0.80
regular_choiceFunction · 0.80

Calls 5

get_botMethod · 0.80
send_messageMethod · 0.45