Shortcut for:: await bot.send_location( 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.
(
self,
latitude: float | None = None,
longitude: float | None = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: "ReplyMarkup | None" = None,
live_period: TimePeriod | None = None,
horizontal_accuracy: float | None = None,
heading: int | None = None,
proximity_alert_radius: int | None = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: ODVInput[int] = 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,
location: "Location | 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,
)
| 3402 | ) |
| 3403 | |
| 3404 | async def reply_location( |
| 3405 | self, |
| 3406 | latitude: float | None = None, |
| 3407 | longitude: float | None = None, |
| 3408 | disable_notification: ODVInput[bool] = DEFAULT_NONE, |
| 3409 | reply_markup: "ReplyMarkup | None" = None, |
| 3410 | live_period: TimePeriod | None = None, |
| 3411 | horizontal_accuracy: float | None = None, |
| 3412 | heading: int | None = None, |
| 3413 | proximity_alert_radius: int | None = None, |
| 3414 | protect_content: ODVInput[bool] = DEFAULT_NONE, |
| 3415 | message_thread_id: ODVInput[int] = DEFAULT_NONE, |
| 3416 | reply_parameters: "ReplyParameters | None" = None, |
| 3417 | message_effect_id: str | None = None, |
| 3418 | allow_paid_broadcast: bool | None = None, |
| 3419 | suggested_post_parameters: "SuggestedPostParameters | None" = None, |
| 3420 | *, |
| 3421 | reply_to_message_id: int | None = None, |
| 3422 | allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE, |
| 3423 | location: "Location | None" = None, |
| 3424 | do_quote: bool | (_ReplyKwargs | None) = None, |
| 3425 | read_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3426 | write_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3427 | connect_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3428 | pool_timeout: ODVInput[float] = DEFAULT_NONE, |
| 3429 | api_kwargs: JSONDict | None = None, |
| 3430 | ) -> "Message": |
| 3431 | """Shortcut for:: |
| 3432 | |
| 3433 | await bot.send_location( |
| 3434 | update.effective_message.chat_id, |
| 3435 | message_thread_id=update.effective_message.message_thread_id, |
| 3436 | business_connection_id=self.business_connection_id, |
| 3437 | direct_messages_topic_id=self.direct_messages_topic.topic_id, |
| 3438 | *args, |
| 3439 | **kwargs, |
| 3440 | ) |
| 3441 | |
| 3442 | For the documentation of the arguments, please see :meth:`telegram.Bot.send_location`. |
| 3443 | |
| 3444 | .. versionchanged:: 21.1 |
| 3445 | |reply_same_thread| |
| 3446 | |
| 3447 | .. versionchanged:: 22.0 |
| 3448 | |quote_removed| |
| 3449 | |
| 3450 | Keyword Args: |
| 3451 | do_quote (:obj:`bool` | :obj:`dict`, optional): |do_quote| |
| 3452 | |
| 3453 | .. versionadded:: 20.8 |
| 3454 | |
| 3455 | Returns: |
| 3456 | :class:`telegram.Message`: On success, instance representing the message posted. |
| 3457 | |
| 3458 | """ |
| 3459 | chat_id, effective_reply_parameters = await self._parse_quote_arguments( |
| 3460 | do_quote, reply_to_message_id, reply_parameters, allow_sending_without_reply |
| 3461 | ) |