SendLocationRequest

data class SendLocationRequest(chatId: Int, latitude: Float, longitude: Float, horizontalAccuracy: Float?, livePeriod: Int?, heading: Int?, proximityAlertRadius: Int?, disableNotification: Boolean, replyToMessageId: Int?, allowSendingWithoutReply: Boolean, replyMarkup: ReplyMarkup?)

Request body for sendLocation

Parameters

chatId

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

latitude

Latitude of the location

longitude

Longitude of the location

horizontalAccuracy

The radius of uncertainty for the location, measured in meters; 0-1500

livePeriod

Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.

heading

For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.

proximityAlertRadius

For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.

disableNotification

Sends the message silently. Users will receive a notification with no sound.

replyToMessageId

If the message is a reply, ID of the original message

allowSendingWithoutReply

Pass True, if the message should be sent even if the specified replied-to message is not found

replyMarkup

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.

Constructors

SendLocationRequest
Link copied to clipboard
common
fun SendLocationRequest(chatId: Int, latitude: Float, longitude: Float, horizontalAccuracy: Float? = null, livePeriod: Int? = null, heading: Int? = null, proximityAlertRadius: Int? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null)
Unique identifier for the target chat or username of the target channel (in the format @channelusername)

Functions

component1
Link copied to clipboard
common
operator fun component1(): Int
component10
Link copied to clipboard
common
operator fun component10(): Boolean
component11
Link copied to clipboard
common
operator fun component11(): ReplyMarkup?
component2
Link copied to clipboard
common
operator fun component2(): Float
component3
Link copied to clipboard
common
operator fun component3(): Float
component4
Link copied to clipboard
common
operator fun component4(): Float?
component5
Link copied to clipboard
common
operator fun component5(): Int?
component6
Link copied to clipboard
common
operator fun component6(): Int?
component7
Link copied to clipboard
common
operator fun component7(): Int?
component8
Link copied to clipboard
common
operator fun component8(): Boolean
component9
Link copied to clipboard
common
operator fun component9(): Int?
copy
Link copied to clipboard
common
fun copy(chatId: Int, latitude: Float, longitude: Float, horizontalAccuracy: Float? = null, livePeriod: Int? = null, heading: Int? = null, proximityAlertRadius: Int? = null, disableNotification: Boolean = false, replyToMessageId: Int? = null, allowSendingWithoutReply: Boolean = false, replyMarkup: ReplyMarkup? = null): SendLocationRequest
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

allowSendingWithoutReply
Link copied to clipboard
common
val allowSendingWithoutReply: Boolean = false
Pass True, if the message should be sent even if the specified replied-to message is not found
chatId
Link copied to clipboard
common
val chatId: Int
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
disableNotification
Link copied to clipboard
common
val disableNotification: Boolean = false
Sends the message silently.
heading
Link copied to clipboard
common
val heading: Int? = null
For live locations, a direction in which the user is moving, in degrees.
horizontalAccuracy
Link copied to clipboard
common
val horizontalAccuracy: Float? = null
The radius of uncertainty for the location, measured in meters; 0-1500
latitude
Link copied to clipboard
common
val latitude: Float
Latitude of the location
livePeriod
Link copied to clipboard
common
val livePeriod: Int? = null
Period in seconds for which the location will be updated (see Live Locations, should be between 60 and 86400.
longitude
Link copied to clipboard
common
val longitude: Float
Longitude of the location
proximityAlertRadius
Link copied to clipboard
common
val proximityAlertRadius: Int? = null
For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters.
replyMarkup
Link copied to clipboard
common
val replyMarkup: ReplyMarkup? = null
Additional interface options.
replyToMessageId
Link copied to clipboard
common
val replyToMessageId: Int? = null
If the message is a reply, ID of the original message