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

Method reply_text_draft

src/telegram/_message.py:2252–2302  ·  view source on GitHub ↗

Shortcut for:: await bot.send_message_draft( update.effective_message.chat_id, message_thread_id=update.effective_message.message_thread_id, *args, **kwargs, ) For the documentation of the argumen

(
        self,
        draft_id: int,
        text: str | None = None,
        parse_mode: ODVInput[str] = DEFAULT_NONE,
        entities: Sequence["MessageEntity"] | None = None,
        message_thread_id: ODVInput[int] = DEFAULT_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

2250 )
2251
2252 async def reply_text_draft(
2253 self,
2254 draft_id: int,
2255 text: str | None = None,
2256 parse_mode: ODVInput[str] = DEFAULT_NONE,
2257 entities: Sequence["MessageEntity"] | None = None,
2258 message_thread_id: ODVInput[int] = DEFAULT_NONE,
2259 *,
2260 read_timeout: ODVInput[float] = DEFAULT_NONE,
2261 write_timeout: ODVInput[float] = DEFAULT_NONE,
2262 connect_timeout: ODVInput[float] = DEFAULT_NONE,
2263 pool_timeout: ODVInput[float] = DEFAULT_NONE,
2264 api_kwargs: JSONDict | None = None,
2265 ) -> bool:
2266 """Shortcut for::
2267
2268 await bot.send_message_draft(
2269 update.effective_message.chat_id,
2270 message_thread_id=update.effective_message.message_thread_id,
2271 *args,
2272 **kwargs,
2273 )
2274
2275 For the documentation of the arguments, please see :meth:`telegram.Bot.send_message_draft`.
2276
2277 Note:
2278 |reply_same_thread|
2279
2280 .. versionadded:: 22.6
2281
2282 .. versionchanged:: 22.8
2283 Bot API 10.0 makes the ``text`` argument optional.
2284
2285 Returns:
2286 :obj:`bool`: On success, :obj:`True` is returned.
2287
2288 """
2289 message_thread_id = self._parse_message_thread_id(self.chat_id, message_thread_id)
2290 return await self.get_bot().send_message_draft(
2291 chat_id=self.chat_id,
2292 draft_id=draft_id,
2293 text=text,
2294 parse_mode=parse_mode,
2295 entities=entities,
2296 message_thread_id=message_thread_id,
2297 read_timeout=read_timeout,
2298 write_timeout=write_timeout,
2299 connect_timeout=connect_timeout,
2300 pool_timeout=pool_timeout,
2301 api_kwargs=api_kwargs,
2302 )
2303
2304 async def reply_markdown(
2305 self,

Callers 1

test_reply_text_draftMethod · 0.80

Calls 3

get_botMethod · 0.80
send_message_draftMethod · 0.45

Tested by 1

test_reply_text_draftMethod · 0.64