Shortcut for:: await bot.send_message( update.effective_message.chat_id, message_thread_id=update.effective_message.message_thread_id, parse_mode=ParseMode.HTML, direct_messages_topic_id=self.direct_messages_topic.topic_id,
(
self,
text: str,
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,
)
| 2470 | ) |
| 2471 | |
| 2472 | async def reply_html( |
| 2473 | self, |
| 2474 | text: str, |
| 2475 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 2476 | reply_markup: "ReplyMarkup | None" = None, |
| 2477 | entities: Sequence["MessageEntity"] | None = None, |
| 2478 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 2479 | message_thread_id: ODVInput[int] = DEFAULT_NONE, |
| 2480 | link_preview_options: ODVInput["LinkPreviewOptions"] = DEFAULT_NONE, |
| 2481 | reply_parameters: "ReplyParameters | None" = None, |
| 2482 | message_effect_id: str | None = None, |
| 2483 | allow_paid_broadcast: bool | None = None, |
| 2484 | suggested_post_parameters: "SuggestedPostParameters | None" = None, |
| 2485 | *, |
| 2486 | reply_to_message_id: int | None = None, |
| 2487 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 2488 | disable_web_page_preview: bool | None = None, |
| 2489 | do_quote: bool | (_ReplyKwargs | None) = None, |
| 2490 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2491 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2492 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2493 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 2494 | api_kwargs: JSONDict | None = None, |
| 2495 | ) -> "Message": |
| 2496 | """Shortcut for:: |
| 2497 | |
| 2498 | await bot.send_message( |
| 2499 | update.effective_message.chat_id, |
| 2500 | message_thread_id=update.effective_message.message_thread_id, |
| 2501 | parse_mode=ParseMode.HTML, |
| 2502 | direct_messages_topic_id=self.direct_messages_topic.topic_id, |
| 2503 | business_connection_id=self.business_connection_id, |
| 2504 | *args, |
| 2505 | **kwargs, |
| 2506 | ) |
| 2507 | |
| 2508 | Sends a message with HTML formatting. |
| 2509 | |
| 2510 | For the documentation of the arguments, please see :meth:`telegram.Bot.send_message`. |
| 2511 | |
| 2512 | .. versionchanged:: 21.1 |
| 2513 | |reply_same_thread| |
| 2514 | |
| 2515 | .. versionchanged:: 22.0 |
| 2516 | |quote_removed| |
| 2517 | |
| 2518 | Keyword Args: |
| 2519 | do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote| |
| 2520 | |
| 2521 | .. versionadded:: 20.8 |
| 2522 | |
| 2523 | Returns: |
| 2524 | :class:`telegram.Message`: On success, instance representing the message posted. |
| 2525 | """ |
| 2526 | chat_id, effective_reply_parameters = await self._parse_quote_arguments( |
| 2527 | do_quote, reply_to_message_id, reply_parameters, allow_sending_without_reply |
| 2528 | ) |
| 2529 | message_thread_id = self._parse_message_thread_id(chat_id, message_thread_id) |