sendVenue with Location

This commit is contained in:
InsanusMokrassar 2020-07-02 15:55:14 +06:00
parent ff0b7faa48
commit cba0e30710
2 changed files with 30 additions and 0 deletions

View File

@ -69,6 +69,8 @@
* Operator function `unaryPlus` was added to `RowBuilder`. Now it is possible to write `row { +button }`
* Function `flatMatrix` was added for single-row columns
* Operator extension `RowBuilder#plus` was added to be able to write things like `row { this + button }`
* `TelegramBotAPI-extensions-api`:
* Extensions `RequestsExecutor#sendVenue` with `Location` args were added
* `TelegramBotAPI-extensions-utils`:
* Function `InlineKeyboardMarkup` for flat keyboards was added
* Function `ReplyKeyboardMarkup` for flat keyboards was added

View File

@ -37,6 +37,34 @@ suspend fun RequestsExecutor.sendVenue(
chat.id, latitude, longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendVenue(
chatId: ChatIdentifier,
location: Location,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVenue(
chatId, location.latitude, location.longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendVenue(
chat: Chat,
location: Location,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
chat.id, location.latitude, location.longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendVenue(
chatId: ChatIdentifier,
venue: Venue,