1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-03 23:29:33 +00:00

update live/static locations

This commit is contained in:
2024-07-15 02:19:50 +06:00
parent f767362c41
commit 8a6e06bbf0
13 changed files with 240 additions and 121 deletions

View File

@@ -17,6 +17,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.location.LiveLocation
import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
import dev.inmo.tgbotapi.types.message.content.LocationContent
import kotlinx.coroutines.CoroutineStart
import kotlinx.coroutines.currentCoroutineContext
@@ -54,9 +55,9 @@ public suspend fun TelegramBot.handleLiveLocation(
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
sentMessageFlow: FlowCollector<ContentMessage<LocationContent>>? = null
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
) {
var currentLiveLocationMessage: ContentMessage<LocationContent>? = null
var currentLiveLocationMessage: ContentMessage<LiveLocationContent>? = null
val updateMessageJob = if (liveTimeMillis == indefiniteLivePeriodDelayMillis) { // do not launch refreshing of message for indefinite live locations
null
} else {
@@ -127,7 +128,7 @@ public suspend fun TelegramBot.handleLiveLocation(
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
sentMessageFlow: FlowCollector<ContentMessage<LocationContent>>? = null
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
) {
handleLiveLocation(
chatId = chatId,
@@ -168,7 +169,7 @@ public suspend fun TelegramBot.handleLiveLocation(
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
sentMessageFlow: FlowCollector<ContentMessage<LocationContent>>? = null
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
) {
handleLiveLocation(
chatId = chatId,

View File

@@ -66,7 +66,7 @@ public suspend fun TelegramBot.edit(
proximityAlertRadius: Meters? = null,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(chatId, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(chatId, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -83,7 +83,7 @@ public suspend fun TelegramBot.edit(
proximityAlertRadius: Meters? = null,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(chat, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(chat, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -99,7 +99,7 @@ public suspend fun TelegramBot.edit(
proximityAlertRadius: Meters? = null,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(message, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(message, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -111,7 +111,7 @@ public suspend fun TelegramBot.edit(
location: LiveLocation,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(
): ContentMessage<LiveLocationContent> = editLiveLocation(
chatId, messageId, location, businessConnectionId, replyMarkup
)
@@ -125,7 +125,7 @@ public suspend fun TelegramBot.edit(
location: LiveLocation,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(chat, messageId, location, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(chat, messageId, location, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -136,7 +136,7 @@ public suspend fun TelegramBot.edit(
location: LiveLocation,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(message, location, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(message, location, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]

View File

@@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.LiveLocation
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
import dev.inmo.tgbotapi.types.message.content.LocationContent
/**
@@ -25,7 +26,7 @@ public suspend fun TelegramBot.editLiveLocation(
proximityAlertRadius: Meters? = null,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = execute(
): ContentMessage<LiveLocationContent> = execute(
EditChatMessageLiveLocation(
chatId, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup
)
@@ -46,7 +47,7 @@ public suspend fun TelegramBot.editLiveLocation(
proximityAlertRadius: Meters? = null,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(chat.id, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(chat.id, messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -62,7 +63,7 @@ public suspend fun TelegramBot.editLiveLocation(
proximityAlertRadius: Meters? = null,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(message.chat, message.messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(message.chat, message.messageId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -74,7 +75,7 @@ public suspend fun TelegramBot.editLiveLocation(
location: LiveLocation,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = execute(
): ContentMessage<LiveLocationContent> = execute(
EditChatMessageLiveLocation(
chatId, messageId, location.latitude, location.longitude, location.livePeriod, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, businessConnectionId, replyMarkup
)
@@ -90,7 +91,7 @@ public suspend fun TelegramBot.editLiveLocation(
location: LiveLocation,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, location.livePeriod, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, location.livePeriod, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -101,4 +102,4 @@ public suspend fun TelegramBot.editLiveLocation(
location: LiveLocation,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = editLiveLocation(message.chat, message.messageId, location.latitude, location.longitude, location.livePeriod, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, businessConnectionId, replyMarkup)
): ContentMessage<LiveLocationContent> = editLiveLocation(message.chat, message.messageId, location.latitude, location.longitude, location.livePeriod, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, businessConnectionId, replyMarkup)

View File

@@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LocationContent
import dev.inmo.tgbotapi.types.message.content.StaticLocationContent
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -20,7 +21,7 @@ public suspend fun TelegramBot.stopLiveLocation(
messageId: MessageId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = execute(
): ContentMessage<StaticLocationContent> = execute(
StopChatMessageLiveLocation(
chatId, messageId, businessConnectionId, replyMarkup
)
@@ -35,7 +36,7 @@ public suspend fun TelegramBot.stopLiveLocation(
messageId: MessageId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = stopLiveLocation(chat.id, messageId, businessConnectionId, replyMarkup)
): ContentMessage<StaticLocationContent> = stopLiveLocation(chat.id, messageId, businessConnectionId, replyMarkup)
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
@@ -45,4 +46,4 @@ public suspend fun TelegramBot.stopLiveLocation(
message: ContentMessage<LocationContent>,
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<LocationContent> = stopLiveLocation(message.chat, message.messageId, businessConnectionId, replyMarkup)
): ContentMessage<StaticLocationContent> = stopLiveLocation(message.chat, message.messageId, businessConnectionId, replyMarkup)

View File

@@ -153,7 +153,7 @@ public suspend inline fun TelegramBot.reply(
effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
replyInChatId,
latitude,
longitude,
@@ -181,7 +181,7 @@ public suspend inline fun TelegramBot.reply(
effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
replyInChatId,
location,
replyInThreadId,

View File

@@ -161,7 +161,7 @@ public suspend inline fun TelegramBot.reply(
effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
replyInChatId,
latitude,
longitude,
@@ -190,7 +190,7 @@ public suspend inline fun TelegramBot.reply(
effectId: EffectId? = null,
allowSendingWithoutReply: Boolean? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
replyInChatId,
location,
replyInThreadId,

View File

@@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
import dev.inmo.tgbotapi.types.message.content.LocationContent
/**
@@ -29,7 +30,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = execute(
): ContentMessage<LiveLocationContent> = execute(
SendLiveLocation(
chatId,
latitude,
@@ -66,7 +67,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<LiveLocationContent> = sendLocation(
chatId,
location.latitude,
location.longitude,
@@ -102,7 +103,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<LiveLocationContent> = sendLocation(
chat.id,
latitude,
longitude,
@@ -137,7 +138,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chat.id,
latitude = location.latitude,
longitude = location.longitude,
@@ -173,7 +174,7 @@ public suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<LiveLocationContent> = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -193,7 +194,7 @@ public suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<LiveLocationContent> = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -214,7 +215,7 @@ public suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<LiveLocationContent> = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -234,4 +235,4 @@ public suspend fun TelegramBot.sendLiveLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<LiveLocationContent> = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LocationContent
import dev.inmo.tgbotapi.types.message.content.StaticLocationContent
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -25,7 +26,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = execute(
): ContentMessage<StaticLocationContent> = execute(
SendStaticLocation(
chatId,
latitude,
@@ -54,7 +55,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
chatId,
location.latitude,
location.longitude,
@@ -82,7 +83,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
chat.id,
latitude,
longitude,
@@ -109,7 +110,7 @@ public suspend fun TelegramBot.sendLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(
): ContentMessage<StaticLocationContent> = sendLocation(
chat.id,
location.latitude,
location.longitude,
@@ -137,7 +138,7 @@ public suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -153,7 +154,7 @@ public suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -170,7 +171,7 @@ public suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
@@ -186,4 +187,4 @@ public suspend fun TelegramBot.sendStaticLocation(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)

View File

@@ -517,7 +517,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendStaticLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendStaticLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* Will execute [sendStaticLocation] request
@@ -534,7 +534,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendStaticLocation(chatId, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendStaticLocation(chatId, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* Will execute [sendStaticLocation] request
@@ -552,7 +552,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendStaticLocation(chat, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendStaticLocation(chat, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* Will execute [sendStaticLocation] request
@@ -569,7 +569,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendStaticLocation(chat, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
): ContentMessage<StaticLocationContent> = sendStaticLocation(chat, location, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
/**
* Will execute [sendTextMessage] request
@@ -1581,7 +1581,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLiveLocation(
): ContentMessage<LiveLocationContent> = sendLiveLocation(
chatId = chatId,
latitude = latitude,
longitude = longitude,
@@ -1617,7 +1617,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLiveLocation(
): ContentMessage<LiveLocationContent> = sendLiveLocation(
chatId, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
)
@@ -1641,7 +1641,7 @@ public suspend fun TelegramBot.send(
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLiveLocation(
): ContentMessage<LiveLocationContent> = sendLiveLocation(
chat, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
)
@@ -1662,9 +1662,9 @@ public suspend fun TelegramBot.send(
disableNotification: Boolean = false,
protectContent: Boolean = false,
effectId: EffectId? = null,
replyParameters: ReplyParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<LocationContent> = sendLiveLocation(
): ContentMessage<LiveLocationContent> = sendLiveLocation(
chat, location, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
)