sendLocation

Send a location.

PARAMETERS
chatId: ID

The chat to send the location to.

latitude: number

The location’s latitude.

longitude: number

The location’s longitude.

horizontalAccuracy?: number

The accuracy radius of the location in meters. Must be in the range of 0-1500.

livePeriod?: number

The duration in which the location can be updated in seconds. Must be in the range of 80-864,000.

heading?: number

The direction which the user is moving towards. Must be in the range of 1-350.

proximityAlertRadius?: number

The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000.

disableNotification?: boolean

Whether to send the message in a silent way without making a sound on the recipients’ clients.

protectContent?: boolean

Whether to protect the contents of the message from copying and forwarding.

replyToMessageId?: number

The identifier of a message to reply to.

replyQuote?: ReplyQuote

A specific part of the replying message’s text to quote.

messageThreadId?: number

The identifier of a thread to send the message to.

sendAs?: ID

The identifier of a chat to send the message on behalf of. User-only.

replyMarkup?: ReplyMarkup

The reply markup of the message. Bot-only.

businessConnectionId?: string
RESULT

The sent location.

SYNTAX
// Required parameters only.
await client.sendLocation(chatId, latitude, longitude);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.sendLocation(chatId, latitude, longitude, {
    horizontalAccuracy,
    livePeriod,
    heading,
    proximityAlertRadius,
    disableNotification,
    protectContent,
    replyToMessageId,
    replyQuote,
    messageThreadId,
    sendAs,
    replyMarkup,
    businessConnectionId,
});