1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-06-01 23:45:25 +00:00
tgbotapi/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendVenue.kt

133 lines
4.4 KiB
Kotlin
Raw Normal View History

package dev.inmo.tgbotapi.extensions.api.send
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.send.SendVenue
2020-11-05 18:12:14 +00:00
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageIdentifier
2020-10-04 11:06:30 +00:00
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
2020-11-04 19:12:14 +00:00
import dev.inmo.tgbotapi.types.location.StaticLocation
2020-10-04 11:06:30 +00:00
import dev.inmo.tgbotapi.types.message.abstracts.Message
import dev.inmo.tgbotapi.types.venue.Venue
2020-02-15 09:33:04 +00:00
suspend fun TelegramBot.sendVenue(
2020-02-15 09:33:04 +00:00
chatId: ChatIdentifier,
latitude: Double,
longitude: Double,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-02-15 09:33:04 +00:00
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVenue(
2020-11-05 17:48:23 +00:00
chatId, latitude, longitude, title, address, foursquareId, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
2020-02-15 09:33:04 +00:00
)
)
suspend fun TelegramBot.sendVenue(
2020-02-15 09:33:04 +00:00
chat: Chat,
latitude: Double,
longitude: Double,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-02-15 09:33:04 +00:00
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
2020-11-05 17:48:23 +00:00
chat.id, latitude, longitude, title, address, foursquareId, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
2020-02-15 09:33:04 +00:00
)
suspend fun TelegramBot.sendVenue(
2020-07-02 09:55:14 +00:00
chatId: ChatIdentifier,
2020-11-04 19:12:14 +00:00
location: StaticLocation,
2020-07-02 09:55:14 +00:00
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-07-02 09:55:14 +00:00
replyMarkup: KeyboardMarkup? = null
2020-07-02 10:00:38 +00:00
) = sendVenue(
2020-11-05 17:48:23 +00:00
chatId, location.latitude, location.longitude, title, address, foursquareId, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
2020-07-02 09:55:14 +00:00
)
suspend fun TelegramBot.sendVenue(
2020-07-02 09:55:14 +00:00
chat: Chat,
2020-11-04 19:12:14 +00:00
location: StaticLocation,
2020-07-02 09:55:14 +00:00
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-07-02 09:55:14 +00:00
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
2020-11-05 17:48:23 +00:00
chat.id, location.latitude, location.longitude, title, address, foursquareId, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
2020-07-02 09:55:14 +00:00
)
suspend fun TelegramBot.sendVenue(
2020-02-15 09:33:04 +00:00
chatId: ChatIdentifier,
venue: Venue,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-02-15 09:33:04 +00:00
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVenue(
2020-11-05 17:48:23 +00:00
chatId, venue, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
2020-02-15 09:33:04 +00:00
)
)
suspend fun TelegramBot.sendVenue(
2020-02-15 09:33:04 +00:00
chat: Chat,
venue: Venue,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-02-15 09:33:04 +00:00
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
2020-11-05 17:48:23 +00:00
chat.id, venue, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
2020-02-15 09:33:04 +00:00
)
2020-10-04 10:47:30 +00:00
suspend inline fun TelegramBot.reply(
to: Message,
latitude: Double,
longitude: Double,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-10-04 10:47:30 +00:00
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
2020-11-05 17:48:23 +00:00
to.chat, latitude, longitude, title, address, foursquareId, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup
2020-10-04 10:47:30 +00:00
)
suspend inline fun TelegramBot.reply(
to: Message,
2020-11-04 19:12:14 +00:00
location: StaticLocation,
2020-10-04 10:47:30 +00:00
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-10-04 10:47:30 +00:00
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
2020-11-05 17:48:23 +00:00
to.chat, location, title, address, foursquareId, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup
2020-10-04 10:47:30 +00:00
)
suspend inline fun TelegramBot.reply(
to: Message,
venue: Venue,
disableNotification: Boolean = false,
2020-11-05 17:48:23 +00:00
allowSendingWithoutReply: Boolean? = null,
2020-10-04 10:47:30 +00:00
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
2020-11-05 17:48:23 +00:00
to.chat, venue, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup
2020-10-04 10:47:30 +00:00
)