diff --git a/CHANGELOG.md b/CHANGELOG.md index b6a6c50975..42534de13f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/SendVenue.kt b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/SendVenue.kt index aa22e5be36..39dd8e5dee 100644 --- a/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/SendVenue.kt +++ b/TelegramBotAPI-extensions-api/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/api/send/SendVenue.kt @@ -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,