tgbotapi/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/edit/LiveLocation/StopChatMessageLiveLocation.kt

44 lines
1.6 KiB
Kotlin
Raw Normal View History

package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
2020-02-15 09:33:04 +00:00
2020-10-04 11:06:30 +00:00
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.edit.LiveLocation.StopChatMessageLiveLocation
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LocationContent
2020-02-15 09:33:04 +00:00
2021-10-01 13:38:22 +00:00
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
suspend fun TelegramBot.stopLiveLocation(
2020-02-15 09:33:04 +00:00
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopChatMessageLiveLocation(
chatId, messageId, replyMarkup
)
)
2021-10-01 13:38:22 +00:00
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
suspend fun TelegramBot.stopLiveLocation(
2020-02-15 09:33:04 +00:00
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = stopLiveLocation(chat.id, messageId, replyMarkup)
2021-10-01 13:38:22 +00:00
/**
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
* as a builder for that
*/
suspend fun TelegramBot.stopLiveLocation(
2020-02-15 09:33:04 +00:00
message: ContentMessage<LocationContent>,
replyMarkup: InlineKeyboardMarkup? = null
) = stopLiveLocation(message.chat, message.messageId, replyMarkup)