send_location
Use this method to send point on the map. On success, the sent Message is returned.
Parameters
chat_id
(int
orstr
): Unique identifier for the target chat or username of the target channel (in the format @channelusername)latitude
(float
): Latitude of the locationlongitude
(float
): Longitude of the locationbusiness_connection_id
(str
) (optional
): Identifier of a business connection, in which the message will be sentmessage_thread_id
(int
) (optional
): Identifier of a message thread, in which the message will be senthorizontal_accuracy
(float
) (optional
): The radius of uncertainty for the location, measured in meters; 0-1500live_period
(int
) (optional
): Period in seconds during which the location will be updated (see Live Locations, should be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely.heading
(int
) (optional
): For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.proximity_alert_radius
(int
) (optional
): For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.disable_notification
(bool
) (optional
): Sends the message silently. Users will receive a notification with no sound.protect_content
(bool
) (optional
): Protects the contents of the sent message from forwarding and savingmessage_effect_id
(str
) (optional
): Unique identifier of the message effectreply_parameters
(ReplyParameters) (optional
): Reply parameters.reply_markup
(InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReply) (optional
): Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.allow_paid_broadcast
(bool
) (optional
): Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
Returns
Message
Examples
- Required Parameters
await bot.send_location(
chat_id=your_chat_id_here,
latitude=your_latitude_here,
longitude=your_longitude_here
)
- All Parameters
await bot.send_location(
chat_id=your_chat_id_here,
latitude=your_latitude_here,
longitude=your_longitude_here,
business_connection_id=your_business_connection_id_here,
message_thread_id=your_message_thread_id_here,
horizontal_accuracy=your_horizontal_accuracy_here,
live_period=your_live_period_here,
heading=your_heading_here,
proximity_alert_radius=your_proximity_alert_radius_here,
disable_notification=your_disable_notification_here,
protect_content=your_protect_content_here,
message_effect_id=your_message_effect_id_here,
reply_parameters=your_reply_parameters_here,
reply_markup=your_reply_markup_here,
allow_paid_broadcast=your_allow_paid_broadcast_here
)