27 lines
1.0 KiB
Kotlin
27 lines
1.0 KiB
Kotlin
package com.github.insanusmokrassar.TelegramBotAPI.types.message.content
|
|
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
|
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendLocation
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
|
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent
|
|
|
|
data class LocationContent(
|
|
val location: Location
|
|
) : MessageContent {
|
|
override fun createResend(
|
|
chatId: ChatIdentifier,
|
|
disableNotification: Boolean,
|
|
replyToMessageId: MessageIdentifier?,
|
|
replyMarkup: KeyboardMarkup?
|
|
): Request<ContentMessage<LocationContent>> = SendLocation(
|
|
chatId,
|
|
location.latitude,
|
|
location.longitude,
|
|
null,
|
|
disableNotification,
|
|
replyToMessageId,
|
|
replyMarkup
|
|
)
|
|
} |