mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
commit
00f504a095
15
CHANGELOG.md
15
CHANGELOG.md
@ -1,5 +1,20 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
|
## 4.1.0
|
||||||
|
|
||||||
|
* `Versions`:
|
||||||
|
* `Kotlin`: `1.7.20` -> `1.7.21`
|
||||||
|
* `MicroUtils`: `0.14.0` -> `0.14.1`
|
||||||
|
* `Korlibs`: `3.3.1` -> `3.4.0`
|
||||||
|
* `UUID`: `0.5.0` -> `0.6.0`
|
||||||
|
* `Core`:
|
||||||
|
* All the chats identifiers has been rewritten as value classes
|
||||||
|
* New chat identifier: `ChatIdWithThreadId`
|
||||||
|
* `RawMessage` will create `ChatIdWithThreadId` chat id under the hood by default
|
||||||
|
* All the methods which potentially using `threadId` will try to take it from `chatId`
|
||||||
|
* `API`:
|
||||||
|
* All default `threadId` null values has been replaced with auto-calculated threadId from chats/chat ids
|
||||||
|
|
||||||
## 4.0.0
|
## 4.0.0
|
||||||
|
|
||||||
**!!! THIS UPDATE CONTAINS FULL REWORK OF MEDIA GROUPS FUNCTIONALITY !!!**
|
**!!! THIS UPDATE CONTAINS FULL REWORK OF MEDIA GROUPS FUNCTIONALITY !!!**
|
||||||
|
@ -6,4 +6,4 @@ kotlin.incremental=true
|
|||||||
kotlin.incremental.js=true
|
kotlin.incremental.js=true
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=4.0.0
|
library_version=4.1.0
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "1.7.20"
|
kotlin = "1.7.21"
|
||||||
kotlin-serialization = "1.4.1"
|
kotlin-serialization = "1.4.1"
|
||||||
kotlin-coroutines = "1.6.4"
|
kotlin-coroutines = "1.6.4"
|
||||||
|
|
||||||
javax-activation = "1.1.1"
|
javax-activation = "1.1.1"
|
||||||
|
|
||||||
korlibs = "3.3.1"
|
korlibs = "3.4.0"
|
||||||
uuid = "0.5.0"
|
uuid = "0.6.0"
|
||||||
ktor = "2.1.3"
|
ktor = "2.1.3"
|
||||||
|
|
||||||
ksp = "1.7.20-1.0.8"
|
ksp = "1.7.21-1.0.8"
|
||||||
kotlin-poet = "1.12.0"
|
kotlin-poet = "1.12.0"
|
||||||
|
|
||||||
microutils = "0.14.0"
|
microutils = "0.14.1"
|
||||||
|
|
||||||
github-release-plugin = "2.4.1"
|
github-release-plugin = "2.4.1"
|
||||||
|
dokka = "1.7.20"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ ksp = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref =
|
|||||||
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||||
kotlin-ksp-plugin = { module = "com.google.devtools.ksp:symbol-processing-gradle-plugin", version.ref = "ksp" }
|
kotlin-ksp-plugin = { module = "com.google.devtools.ksp:symbol-processing-gradle-plugin", version.ref = "ksp" }
|
||||||
kotlin-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
|
kotlin-serialization-plugin = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
|
||||||
kotlin-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "kotlin" }
|
kotlin-dokka-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" }
|
||||||
github-release-plugin = { module = "com.github.breadmoirai:github-release", version.ref = "github-release-plugin" }
|
github-release-plugin = { module = "com.github.breadmoirai:github-release", version.ref = "github-release-plugin" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
|
@ -7,12 +7,13 @@ import dev.inmo.tgbotapi.types.MessageId
|
|||||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
) = execute(
|
) = execute(
|
||||||
@ -23,7 +24,7 @@ suspend fun TelegramBot.forwardMessage(
|
|||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
) = forwardMessage(fromChat.id, toChatId, messageId, threadId, disableNotification, protectContent)
|
) = forwardMessage(fromChat.id, toChatId, messageId, threadId, disableNotification, protectContent)
|
||||||
@ -32,7 +33,7 @@ suspend fun TelegramBot.forwardMessage(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
) = forwardMessage(fromChatId, toChat.id, messageId, threadId, disableNotification, protectContent)
|
) = forwardMessage(fromChatId, toChat.id, messageId, threadId, disableNotification, protectContent)
|
||||||
@ -41,7 +42,7 @@ suspend fun TelegramBot.forwardMessage(
|
|||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
) = forwardMessage(fromChat.id, toChat.id, messageId, threadId, disableNotification, protectContent)
|
) = forwardMessage(fromChat.id, toChat.id, messageId, threadId, disableNotification, protectContent)
|
||||||
@ -49,7 +50,7 @@ suspend fun TelegramBot.forwardMessage(
|
|||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
message: Message,
|
message: Message,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
) = forwardMessage(message.chat, toChatId, message.messageId, threadId, disableNotification, protectContent)
|
) = forwardMessage(message.chat, toChatId, message.messageId, threadId, disableNotification, protectContent)
|
||||||
@ -57,7 +58,7 @@ suspend fun TelegramBot.forwardMessage(
|
|||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
message: Message,
|
message: Message,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false
|
protectContent: Boolean = false
|
||||||
) = forwardMessage(message.chat, toChat, message.messageId, threadId, disableNotification, protectContent)
|
) = forwardMessage(message.chat, toChat, message.messageId, threadId, disableNotification, protectContent)
|
||||||
|
@ -41,7 +41,7 @@ suspend fun TelegramBot.handleLiveLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
locationsFlow: Flow<EditLiveLocationInfo>,
|
locationsFlow: Flow<EditLiveLocationInfo>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -98,7 +98,7 @@ suspend fun TelegramBot.handleLiveLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
locationsFlow: Flow<Location>,
|
locationsFlow: Flow<Location>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -135,7 +135,7 @@ suspend fun TelegramBot.handleLiveLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
locationsFlow: Flow<Pair<Double, Double>>,
|
locationsFlow: Flow<Pair<Double, Double>>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -15,6 +15,7 @@ import dev.inmo.tgbotapi.types.location.StaticLocation
|
|||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||||
|
import dev.inmo.tgbotapi.utils.extensions.threadIdOrNull
|
||||||
import io.ktor.utils.io.core.Closeable
|
import io.ktor.utils.io.core.Closeable
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@ -90,7 +91,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHorizontalAccuracy: Meters? = null,
|
initHorizontalAccuracy: Meters? = null,
|
||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -137,7 +138,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHorizontalAccuracy: Meters? = null,
|
initHorizontalAccuracy: Meters? = null,
|
||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -166,13 +167,13 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.startLiveLocation(
|
suspend fun TelegramBot.startLiveLocation(
|
||||||
scope: CoroutineScope,
|
scope: CoroutineScope,
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
initHorizontalAccuracy: Meters? = null,
|
initHorizontalAccuracy: Meters? = null,
|
||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -207,7 +208,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHorizontalAccuracy: Meters? = null,
|
initHorizontalAccuracy: Meters? = null,
|
||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -243,7 +244,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHorizontalAccuracy: Meters? = null,
|
initHorizontalAccuracy: Meters? = null,
|
||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = to.threadIdOrNull,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -277,7 +278,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHorizontalAccuracy: Meters? = null,
|
initHorizontalAccuracy: Meters? = null,
|
||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = to.threadIdOrNull,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
|
@ -34,7 +34,7 @@ suspend fun TelegramBot.stopPoll(
|
|||||||
* as a builder for that
|
* as a builder for that
|
||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.stopPoll(
|
suspend fun TelegramBot.stopPoll(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
message: Message,
|
message: Message,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) = stopPoll(chatId, message.messageId, replyMarkup)
|
) = stopPoll(chatId, message.messageId, replyMarkup)
|
||||||
|
@ -2,11 +2,11 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatMenuButton
|
import dev.inmo.tgbotapi.requests.chat.get.GetChatMenuButton
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatMenuButton(
|
suspend fun TelegramBot.getChatMenuButton(
|
||||||
chatId: ChatId
|
chatId: IdChatIdentifier
|
||||||
) = execute(GetChatMenuButton(chatId))
|
) = execute(GetChatMenuButton(chatId))
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatMenuButton(
|
suspend fun TelegramBot.getChatMenuButton(
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.TelegramDate
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
@ -24,7 +24,7 @@ suspend fun TelegramBot.banChatMember(
|
|||||||
) = banChatMember(chat.id, userId, untilDate, revokeMessages)
|
) = banChatMember(chat.id, userId, untilDate, revokeMessages)
|
||||||
|
|
||||||
suspend fun TelegramBot.banChatMember(
|
suspend fun TelegramBot.banChatMember(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
user: User,
|
user: User,
|
||||||
untilDate: TelegramDate? = null,
|
untilDate: TelegramDate? = null,
|
||||||
revokeMessages: Boolean? = null
|
revokeMessages: Boolean? = null
|
||||||
|
@ -2,22 +2,22 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatSenderChat
|
import dev.inmo.tgbotapi.requests.chat.members.BanChatSenderChat
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.banChatSenderChat(
|
suspend fun TelegramBot.banChatSenderChat(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
senderChatId: ChatId
|
senderChatId: IdChatIdentifier
|
||||||
) = execute(BanChatSenderChat(chatId, senderChatId))
|
) = execute(BanChatSenderChat(chatId, senderChatId))
|
||||||
|
|
||||||
suspend fun TelegramBot.banChatSenderChat(
|
suspend fun TelegramBot.banChatSenderChat(
|
||||||
chat: PublicChat,
|
chat: PublicChat,
|
||||||
senderChatId: ChatId
|
senderChatId: IdChatIdentifier
|
||||||
) = banChatSenderChat(chat.id, senderChatId)
|
) = banChatSenderChat(chat.id, senderChatId)
|
||||||
|
|
||||||
suspend fun TelegramBot.banChatSenderChat(
|
suspend fun TelegramBot.banChatSenderChat(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
senderChat: PublicChat
|
senderChat: PublicChat
|
||||||
) = banChatSenderChat(chatId, senderChat.id)
|
) = banChatSenderChat(chatId, senderChat.id)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.GetChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.GetChatMember
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
@ -19,7 +19,7 @@ suspend fun TelegramBot.getChatMember(
|
|||||||
) = getChatMember(chat.id, userId)
|
) = getChatMember(chat.id, userId)
|
||||||
|
|
||||||
suspend fun TelegramBot.getChatMember(
|
suspend fun TelegramBot.getChatMember(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
user: User
|
user: User
|
||||||
) = getChatMember(chatId, user.id)
|
) = getChatMember(chatId, user.id)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.PromoteChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.PromoteChatMember
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.TelegramDate
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
@ -80,7 +80,7 @@ suspend fun TelegramBot.promoteChatMember(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend fun TelegramBot.promoteChatMember(
|
suspend fun TelegramBot.promoteChatMember(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
user: User,
|
user: User,
|
||||||
untilDate: TelegramDate? = null,
|
untilDate: TelegramDate? = null,
|
||||||
isAnonymous: Boolean? = null,
|
isAnonymous: Boolean? = null,
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.RestrictChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.RestrictChatMember
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.TelegramDate
|
import dev.inmo.tgbotapi.types.TelegramDate
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
@ -25,7 +25,7 @@ suspend fun TelegramBot.restrictChatMember(
|
|||||||
) = restrictChatMember(chat.id, userId, untilDate, permissions)
|
) = restrictChatMember(chat.id, userId, untilDate, permissions)
|
||||||
|
|
||||||
suspend fun TelegramBot.restrictChatMember(
|
suspend fun TelegramBot.restrictChatMember(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
user: User,
|
user: User,
|
||||||
untilDate: TelegramDate? = null,
|
untilDate: TelegramDate? = null,
|
||||||
permissions: ChatPermissions = ChatPermissions()
|
permissions: ChatPermissions = ChatPermissions()
|
||||||
|
@ -2,13 +2,13 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.SetChatAdministratorCustomTitle
|
import dev.inmo.tgbotapi.requests.chat.members.SetChatAdministratorCustomTitle
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
import dev.inmo.tgbotapi.types.chat.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
customTitle: String
|
customTitle: String
|
||||||
) = execute(SetChatAdministratorCustomTitle(chatId, userId, customTitle))
|
) = execute(SetChatAdministratorCustomTitle(chatId, userId, customTitle))
|
||||||
@ -20,7 +20,7 @@ suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
|||||||
) = setChatAdministratorCustomTitle(chat.id, userId, customTitle)
|
) = setChatAdministratorCustomTitle(chat.id, userId, customTitle)
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
user: User,
|
user: User,
|
||||||
customTitle: String
|
customTitle: String
|
||||||
) = setChatAdministratorCustomTitle(chatId, user.id, customTitle)
|
) = setChatAdministratorCustomTitle(chatId, user.id, customTitle)
|
||||||
|
@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatMember
|
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatMember
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
import dev.inmo.tgbotapi.types.UserId
|
||||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
@ -21,7 +21,7 @@ suspend fun TelegramBot.unbanChatMember(
|
|||||||
) = unbanChatMember(chat.id, userId, onlyIfBanned)
|
) = unbanChatMember(chat.id, userId, onlyIfBanned)
|
||||||
|
|
||||||
suspend fun TelegramBot.unbanChatMember(
|
suspend fun TelegramBot.unbanChatMember(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
user: User,
|
user: User,
|
||||||
onlyIfBanned: Boolean? = null
|
onlyIfBanned: Boolean? = null
|
||||||
) = unbanChatMember(chatId, user.id, onlyIfBanned)
|
) = unbanChatMember(chatId, user.id, onlyIfBanned)
|
||||||
|
@ -2,22 +2,22 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatSenderChat
|
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatSenderChat
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||||
|
|
||||||
suspend fun TelegramBot.unbanChatSenderChat(
|
suspend fun TelegramBot.unbanChatSenderChat(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
senderChatId: ChatId
|
senderChatId: IdChatIdentifier
|
||||||
) = execute(UnbanChatSenderChat(chatId, senderChatId))
|
) = execute(UnbanChatSenderChat(chatId, senderChatId))
|
||||||
|
|
||||||
suspend fun TelegramBot.unbanChatSenderChat(
|
suspend fun TelegramBot.unbanChatSenderChat(
|
||||||
chat: PublicChat,
|
chat: PublicChat,
|
||||||
senderChatId: ChatId
|
senderChatId: IdChatIdentifier
|
||||||
) = unbanChatSenderChat(chat.id, senderChatId)
|
) = unbanChatSenderChat(chat.id, senderChatId)
|
||||||
|
|
||||||
suspend fun TelegramBot.unbanChatSenderChat(
|
suspend fun TelegramBot.unbanChatSenderChat(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
senderChat: PublicChat
|
senderChat: PublicChat
|
||||||
) = unbanChatSenderChat(chatId, senderChat.id)
|
) = unbanChatSenderChat(chatId, senderChat.id)
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatMenuButton
|
import dev.inmo.tgbotapi.requests.chat.modify.SetChatMenuButton
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.MenuButton
|
import dev.inmo.tgbotapi.types.MenuButton
|
||||||
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||||
|
|
||||||
suspend fun TelegramBot.setChatMenuButton(
|
suspend fun TelegramBot.setChatMenuButton(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
menuButton: MenuButton
|
menuButton: MenuButton
|
||||||
) = execute(SetChatMenuButton(chatId, menuButton))
|
) = execute(SetChatMenuButton(chatId, menuButton))
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.GameContent
|
|||||||
|
|
||||||
suspend fun TelegramBot.getGameScore(
|
suspend fun TelegramBot.getGameScore(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
messageId: MessageId
|
messageId: MessageId
|
||||||
) = execute(
|
) = execute(
|
||||||
GetGameHighScoresByChat(userId, chatId, messageId)
|
GetGameHighScoresByChat(userId, chatId, messageId)
|
||||||
@ -18,7 +18,7 @@ suspend fun TelegramBot.getGameScore(
|
|||||||
|
|
||||||
suspend fun TelegramBot.getGameScore(
|
suspend fun TelegramBot.getGameScore(
|
||||||
user: CommonUser,
|
user: CommonUser,
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
messageId: MessageId
|
messageId: MessageId
|
||||||
) = getGameScore(
|
) = getGameScore(
|
||||||
user.id, chatId, messageId
|
user.id, chatId, messageId
|
||||||
|
@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.content.GameContent
|
|||||||
suspend fun TelegramBot.setGameScore(
|
suspend fun TelegramBot.setGameScore(
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
score: Long,
|
score: Long,
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
force: Boolean = false,
|
force: Boolean = false,
|
||||||
disableEditMessage: Boolean = false
|
disableEditMessage: Boolean = false
|
||||||
@ -22,7 +22,7 @@ suspend fun TelegramBot.setGameScore(
|
|||||||
suspend fun TelegramBot.setGameScore(
|
suspend fun TelegramBot.setGameScore(
|
||||||
user: CommonUser,
|
user: CommonUser,
|
||||||
score: Long,
|
score: Long,
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
force: Boolean = false,
|
force: Boolean = false,
|
||||||
disableEditMessage: Boolean = false
|
disableEditMessage: Boolean = false
|
||||||
|
@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -21,7 +22,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -53,7 +54,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -71,7 +72,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -89,7 +90,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -107,7 +108,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -137,7 +138,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -154,7 +155,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -171,7 +172,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -188,7 +189,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
message: Message,
|
message: Message,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -205,7 +206,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
message: Message,
|
message: Message,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -221,7 +222,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
message: Message,
|
message: Message,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -237,7 +238,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
message: Message,
|
message: Message,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -255,7 +256,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -287,7 +288,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -317,7 +318,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -347,7 +348,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -377,7 +378,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -407,7 +408,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -435,7 +436,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -463,7 +464,7 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -42,12 +42,12 @@ import kotlin.jvm.JvmName
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
phoneNumber: String,
|
phoneNumber: String,
|
||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -70,10 +70,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -97,10 +97,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.replyWithDice(
|
suspend inline fun TelegramBot.replyWithDice(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -112,10 +112,10 @@ suspend inline fun TelegramBot.replyWithDice(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animationType: DiceAnimationType,
|
animationType: DiceAnimationType,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -130,11 +130,11 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -156,10 +156,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -183,12 +183,12 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -211,11 +211,11 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -237,11 +237,11 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* as a builder for that
|
* as a builder for that
|
||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -254,11 +254,11 @@ suspend fun TelegramBot.reply(
|
|||||||
* as a builder for that
|
* as a builder for that
|
||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -274,7 +274,7 @@ suspend fun TelegramBot.reply(
|
|||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
@ -284,7 +284,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -308,7 +308,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
title: String,
|
title: String,
|
||||||
@ -317,7 +317,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -341,10 +341,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -364,10 +364,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Game
|
// Game
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithGame(
|
suspend inline fun TelegramBot.replyWithGame(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -377,10 +377,10 @@ suspend inline fun TelegramBot.replyWithGame(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithGame(
|
suspend inline fun TelegramBot.replyWithGame(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -390,10 +390,10 @@ suspend inline fun TelegramBot.replyWithGame(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -404,7 +404,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Animation
|
// Animation
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAnimation(
|
suspend inline fun TelegramBot.replyWithAnimation(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animation: InputFile,
|
animation: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
@ -413,7 +413,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -436,7 +436,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animation: AnimationFile,
|
animation: AnimationFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
@ -444,7 +444,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -452,7 +452,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendAnimation(toChatId, animation, text, parseMode, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(toChatId, animation, text, parseMode, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAnimation(
|
suspend inline fun TelegramBot.replyWithAnimation(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animation: InputFile,
|
animation: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
@ -460,7 +460,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -482,14 +482,14 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
animation: AnimationFile,
|
animation: AnimationFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -500,7 +500,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Audio
|
// Audio
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAudio(
|
suspend inline fun TelegramBot.replyWithAudio(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
audio: InputFile,
|
audio: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
@ -509,7 +509,7 @@ suspend inline fun TelegramBot.replyWithAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -517,13 +517,13 @@ suspend inline fun TelegramBot.replyWithAudio(
|
|||||||
) = sendAudio(toChatId, audio, thumb, text, parseMode, duration, performer, title, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(toChatId, audio, thumb, text, parseMode, duration, performer, title, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
audio: AudioFile,
|
audio: AudioFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -531,7 +531,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendAudio(toChatId, audio, text, parseMode, title, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(toChatId, audio, text, parseMode, title, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAudio(
|
suspend inline fun TelegramBot.replyWithAudio(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
audio: InputFile,
|
audio: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
@ -539,7 +539,7 @@ suspend inline fun TelegramBot.replyWithAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -547,12 +547,12 @@ suspend inline fun TelegramBot.replyWithAudio(
|
|||||||
) = sendAudio(toChatId, audio, thumb, entities, duration, performer, title, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(toChatId, audio, thumb, entities, duration, performer, title, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
audio: AudioFile,
|
audio: AudioFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -563,13 +563,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Documents
|
// Documents
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithDocument(
|
suspend inline fun TelegramBot.replyWithDocument(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
document: InputFile,
|
document: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -578,12 +578,12 @@ suspend inline fun TelegramBot.replyWithDocument(
|
|||||||
) = sendDocument(toChatId, document, thumb, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(toChatId, document, thumb, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -592,12 +592,12 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendDocument(toChatId, document, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(toChatId, document, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithDocument(
|
suspend inline fun TelegramBot.replyWithDocument(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
document: InputFile,
|
document: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -606,11 +606,11 @@ suspend inline fun TelegramBot.replyWithDocument(
|
|||||||
) = sendDocument(toChatId, document, thumb, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(toChatId, document, thumb, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -623,40 +623,40 @@ suspend inline fun TelegramBot.reply(
|
|||||||
|
|
||||||
@RiskFeature(rawSendingMediaGroupsWarning)
|
@RiskFeature(rawSendingMediaGroupsWarning)
|
||||||
suspend inline fun TelegramBot.replyWithMediaGroup(
|
suspend inline fun TelegramBot.replyWithMediaGroup(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendMediaGroup(toChatId, media, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply)
|
) = sendMediaGroup(toChatId, media, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithPlaylist(
|
suspend inline fun TelegramBot.replyWithPlaylist(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendPlaylist(toChatId, media, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply)
|
) = sendPlaylist(toChatId, media, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithDocuments(
|
suspend inline fun TelegramBot.replyWithDocuments(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendDocumentsGroup(toChatId, media, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply)
|
) = sendDocumentsGroup(toChatId, media, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithGallery(
|
suspend inline fun TelegramBot.replyWithGallery(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
@ -666,12 +666,12 @@ suspend inline fun TelegramBot.replyWithGallery(
|
|||||||
// Photo
|
// Photo
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithPhoto(
|
suspend inline fun TelegramBot.replyWithPhoto(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -679,12 +679,12 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
|||||||
) = sendPhoto(toChatId, fileId, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, fileId, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -692,12 +692,12 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendPhoto(toChatId, photo, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, photo, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -706,11 +706,11 @@ suspend inline fun TelegramBot.reply(
|
|||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithPhoto(
|
suspend inline fun TelegramBot.replyWithPhoto(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -718,11 +718,11 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
|||||||
) = sendPhoto(toChatId, fileId, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, fileId, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -730,11 +730,11 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendPhoto(toChatId, photo, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(toChatId, photo, entities, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -745,10 +745,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Sticker
|
// Sticker
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithSticker(
|
suspend inline fun TelegramBot.replyWithSticker(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -756,10 +756,10 @@ suspend inline fun TelegramBot.replyWithSticker(
|
|||||||
) = sendSticker(toChatId, sticker, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendSticker(toChatId, sticker, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -770,7 +770,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Videos
|
// Videos
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVideo(
|
suspend inline fun TelegramBot.replyWithVideo(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
video: InputFile,
|
video: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
@ -779,7 +779,7 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -787,12 +787,12 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
) = sendVideo(toChatId, video, thumb, text, parseMode, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, thumb, text, parseMode, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -800,7 +800,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendVideo(toChatId, video, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, text, parseMode, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVideo(
|
suspend inline fun TelegramBot.replyWithVideo(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
video: InputFile,
|
video: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
@ -808,7 +808,7 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -816,11 +816,11 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
) = sendVideo(toChatId, video, thumb, entities, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(toChatId, video, thumb, entities, duration, width, height, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -831,13 +831,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// VideoNotes
|
// VideoNotes
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVideoNote(
|
suspend inline fun TelegramBot.replyWithVideoNote(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
videoNote: InputFile,
|
videoNote: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -845,10 +845,10 @@ suspend inline fun TelegramBot.replyWithVideoNote(
|
|||||||
) = sendVideoNote(toChatId, videoNote, thumb, duration, size, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideoNote(toChatId, videoNote, thumb, duration, size, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -859,13 +859,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Voice
|
// Voice
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVoice(
|
suspend inline fun TelegramBot.replyWithVoice(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
voice: InputFile,
|
voice: InputFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -873,12 +873,12 @@ suspend inline fun TelegramBot.replyWithVoice(
|
|||||||
) = sendVoice(toChatId, voice, text, parseMode, duration, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(toChatId, voice, text, parseMode, duration, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -887,12 +887,12 @@ suspend inline fun TelegramBot.reply(
|
|||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVoice(
|
suspend inline fun TelegramBot.replyWithVoice(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
voice: InputFile,
|
voice: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -900,11 +900,11 @@ suspend inline fun TelegramBot.replyWithVoice(
|
|||||||
) = sendVoice(toChatId, voice, entities, duration, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(toChatId, voice, entities, duration, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -919,7 +919,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
* as a builder for that
|
* as a builder for that
|
||||||
*/
|
*/
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
@ -938,7 +938,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -949,7 +949,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
// Polls
|
// Polls
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
question: String,
|
question: String,
|
||||||
options: List<String>,
|
options: List<String>,
|
||||||
@ -957,7 +957,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -965,7 +965,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendRegularPoll(toChatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendRegularPoll(toChatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
poll: RegularPoll,
|
poll: RegularPoll,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
@ -974,7 +974,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
isAnonymous: Boolean = poll.isAnonymous,
|
isAnonymous: Boolean = poll.isAnonymous,
|
||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -982,7 +982,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendRegularPoll(toChatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendRegularPoll(toChatId, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
question: String,
|
question: String,
|
||||||
options: List<String>,
|
options: List<String>,
|
||||||
@ -992,7 +992,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1000,7 +1000,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendQuizPoll(toChatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(toChatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
quizPoll: QuizPoll,
|
quizPoll: QuizPoll,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
@ -1011,7 +1011,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1019,7 +1019,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendQuizPoll(toChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(toChatId, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
question: String,
|
question: String,
|
||||||
options: List<String>,
|
options: List<String>,
|
||||||
@ -1028,7 +1028,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1036,7 +1036,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = sendQuizPoll(toChatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(toChatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, threadId, disableNotification, protectContent, toMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
quizPoll: QuizPoll,
|
quizPoll: QuizPoll,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
@ -1046,7 +1046,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
|
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
|
||||||
isAnonymous: Boolean = quizPoll.isAnonymous,
|
isAnonymous: Boolean = quizPoll.isAnonymous,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1055,7 +1055,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
poll: Poll,
|
poll: Poll,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
@ -1063,7 +1063,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
options: List<String> = poll.options.map { it.text },
|
options: List<String> = poll.options.map { it.text },
|
||||||
isAnonymous: Boolean = poll.isAnonymous,
|
isAnonymous: Boolean = poll.isAnonymous,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1106,13 +1106,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1132,13 +1132,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1146,12 +1146,12 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, threadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
) = reply(toChatId, toMessageId, fromChat.id, messageId, text, parseMode, threadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
copy: Message,
|
copy: Message,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1159,10 +1159,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
) = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, threadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
) = reply(toChatId, toMessageId, copy.chat.id, copy.messageId, text, parseMode, threadId, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
content: MessageContent,
|
content: MessageContent,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1187,11 +1187,11 @@ suspend fun TelegramBot.reply(
|
|||||||
* @see handleLiveLocation
|
* @see handleLiveLocation
|
||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
locationsFlow: Flow<EditLiveLocationInfo>,
|
locationsFlow: Flow<EditLiveLocationInfo>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
@ -1214,11 +1214,11 @@ suspend fun TelegramBot.reply(
|
|||||||
@JvmName("replyLiveLocationWithLocationChatIdAndMessageId")
|
@JvmName("replyLiveLocationWithLocationChatIdAndMessageId")
|
||||||
@JsName("replyLiveLocationWithLocationChatIdAndMessageId")
|
@JsName("replyLiveLocationWithLocationChatIdAndMessageId")
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
locationsFlow: Flow<Location>,
|
locationsFlow: Flow<Location>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
@ -1243,11 +1243,11 @@ suspend fun TelegramBot.reply(
|
|||||||
@JvmName("replyLiveLocationWithLatLongChatIdAndMessageId")
|
@JvmName("replyLiveLocationWithLatLongChatIdAndMessageId")
|
||||||
@JsName("replyLiveLocationWithLatLongChatIdAndMessageId")
|
@JsName("replyLiveLocationWithLatLongChatIdAndMessageId")
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
locationsFlow: Flow<Pair<Double, Double>>,
|
locationsFlow: Flow<Pair<Double, Double>>,
|
||||||
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
liveTimeMillis: Long = defaultLivePeriodDelayMillis,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
@ -1265,10 +1265,10 @@ suspend fun TelegramBot.reply(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
mediaFile: TelegramMediaFile,
|
mediaFile: TelegramMediaFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1369,12 +1369,12 @@ suspend fun TelegramBot.reply(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
content: TextedMediaContent,
|
content: TextedMediaContent,
|
||||||
text: String?,
|
text: String?,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -1457,11 +1457,11 @@ suspend fun TelegramBot.reply(
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun TelegramBot.reply(
|
suspend fun TelegramBot.reply(
|
||||||
toChatId: ChatId,
|
toChatId: IdChatIdentifier,
|
||||||
toMessageId: MessageId,
|
toMessageId: MessageId,
|
||||||
content: TextedMediaContent,
|
content: TextedMediaContent,
|
||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
|
@ -9,7 +9,6 @@ import dev.inmo.tgbotapi.types.actions.*
|
|||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlin.contracts.*
|
import kotlin.contracts.*
|
||||||
import kotlin.coroutines.coroutineContext
|
|
||||||
|
|
||||||
private const val refreshTime: MilliSeconds = (botActionActualityTime - 1) * 1000L
|
private const val refreshTime: MilliSeconds = (botActionActualityTime - 1) * 1000L
|
||||||
typealias TelegramBotActionCallback<T> = suspend TelegramBot.() -> T
|
typealias TelegramBotActionCallback<T> = suspend TelegramBot.() -> T
|
||||||
@ -37,7 +36,7 @@ suspend fun <T> TelegramBot.withAction(
|
|||||||
|
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withAction(
|
suspend fun <T> TelegramBot.withAction(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
action: BotAction,
|
action: BotAction,
|
||||||
block: TelegramBotActionCallback<T>
|
block: TelegramBotActionCallback<T>
|
||||||
): T {
|
): T {
|
||||||
@ -67,77 +66,77 @@ suspend fun <T> TelegramBot.withAction(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withTypingAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withTypingAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, TypingAction, block)
|
return withAction(chatId, TypingAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withUploadPhotoAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withUploadPhotoAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, UploadPhotoAction, block)
|
return withAction(chatId, UploadPhotoAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withRecordVideoAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withRecordVideoAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, RecordVideoAction, block)
|
return withAction(chatId, RecordVideoAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withUploadVideoAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withUploadVideoAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, UploadVideoAction, block)
|
return withAction(chatId, UploadVideoAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withRecordVoiceAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withRecordVoiceAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, RecordVoiceAction, block)
|
return withAction(chatId, RecordVoiceAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withUploadVoiceAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withUploadVoiceAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, UploadVoiceAction, block)
|
return withAction(chatId, UploadVoiceAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withUploadDocumentAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withUploadDocumentAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, UploadDocumentAction, block)
|
return withAction(chatId, UploadDocumentAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withFindLocationAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withFindLocationAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, FindLocationAction, block)
|
return withAction(chatId, FindLocationAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withRecordVideoNoteAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withRecordVideoNoteAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, RecordVideoNoteAction, block)
|
return withAction(chatId, RecordVideoNoteAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withUploadVideoNoteAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withUploadVideoNoteAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
return withAction(chatId, UploadVideoNoteAction, block)
|
return withAction(chatId, UploadVideoNoteAction, block)
|
||||||
}
|
}
|
||||||
@OptIn(ExperimentalContracts::class)
|
@OptIn(ExperimentalContracts::class)
|
||||||
suspend fun <T> TelegramBot.withChooseStickerAction(chatId: ChatId, block: TelegramBotActionCallback<T>) : T {
|
suspend fun <T> TelegramBot.withChooseStickerAction(chatId: IdChatIdentifier, block: TelegramBotActionCallback<T>) : T {
|
||||||
contract {
|
contract {
|
||||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ suspend fun TelegramBot.sendContact(
|
|||||||
phoneNumber: String,
|
phoneNumber: String,
|
||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -34,7 +34,7 @@ suspend fun TelegramBot.sendContact(
|
|||||||
suspend fun TelegramBot.sendContact(
|
suspend fun TelegramBot.sendContact(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -55,7 +55,7 @@ suspend fun TelegramBot.sendContact(
|
|||||||
phoneNumber: String,
|
phoneNumber: String,
|
||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -72,7 +72,7 @@ suspend fun TelegramBot.sendContact(
|
|||||||
suspend fun TelegramBot.sendContact(
|
suspend fun TelegramBot.sendContact(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.MessageThreadId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -16,7 +17,7 @@ import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
|||||||
suspend fun TelegramBot.sendDice(
|
suspend fun TelegramBot.sendDice(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -33,7 +34,7 @@ suspend fun TelegramBot.sendDice(
|
|||||||
suspend fun TelegramBot.sendDice(
|
suspend fun TelegramBot.sendDice(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -19,7 +19,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -54,7 +54,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -88,7 +88,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -121,7 +121,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -155,7 +155,7 @@ suspend fun TelegramBot.sendLiveLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -174,7 +174,7 @@ suspend fun TelegramBot.sendLiveLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -194,7 +194,7 @@ suspend fun TelegramBot.sendLiveLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -213,7 +213,7 @@ suspend fun TelegramBot.sendLiveLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -20,7 +20,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -50,7 +50,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -69,7 +69,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -87,7 +87,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -103,7 +103,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -121,7 +121,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -139,7 +139,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -156,7 +156,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -174,7 +174,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -192,7 +192,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -209,7 +209,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -225,7 +225,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -243,7 +243,7 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -261,7 +261,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -277,7 +277,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -295,7 +295,7 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.MessageThreadId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.location.Location
|
import dev.inmo.tgbotapi.types.location.Location
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -17,7 +18,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -44,7 +45,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
suspend fun TelegramBot.sendLocation(
|
suspend fun TelegramBot.sendLocation(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -70,7 +71,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -95,7 +96,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
suspend fun TelegramBot.sendLocation(
|
suspend fun TelegramBot.sendLocation(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -121,7 +122,7 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -136,7 +137,7 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
suspend fun TelegramBot.sendStaticLocation(
|
suspend fun TelegramBot.sendStaticLocation(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -152,7 +153,7 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -167,7 +168,7 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
suspend fun TelegramBot.sendStaticLocation(
|
suspend fun TelegramBot.sendStaticLocation(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: Location,
|
location: Location,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
|
@ -22,7 +22,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -62,7 +62,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -99,7 +99,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -136,7 +136,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -167,7 +167,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
suspend fun TelegramBot.sendVenue(
|
suspend fun TelegramBot.sendVenue(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -193,7 +193,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
suspend fun TelegramBot.sendVenue(
|
suspend fun TelegramBot.sendVenue(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -59,7 +59,7 @@ suspend fun TelegramBot.send(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -80,7 +80,7 @@ suspend fun TelegramBot.send(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -100,7 +100,7 @@ suspend fun TelegramBot.send(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -120,7 +120,7 @@ suspend fun TelegramBot.send(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -139,7 +139,7 @@ suspend fun TelegramBot.send(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -158,7 +158,7 @@ suspend fun TelegramBot.send(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -176,7 +176,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
audio: AudioFile,
|
audio: AudioFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -194,7 +194,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
audio: AudioFile,
|
audio: AudioFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -212,7 +212,7 @@ suspend fun TelegramBot.send(
|
|||||||
phoneNumber: String,
|
phoneNumber: String,
|
||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -228,7 +228,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -246,7 +246,7 @@ suspend fun TelegramBot.send(
|
|||||||
phoneNumber: String,
|
phoneNumber: String,
|
||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -262,7 +262,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -278,7 +278,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
animationType: DiceAnimationType,
|
animationType: DiceAnimationType,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -294,7 +294,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
animationType: DiceAnimationType,
|
animationType: DiceAnimationType,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -312,7 +312,7 @@ suspend fun TelegramBot.send(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -331,7 +331,7 @@ suspend fun TelegramBot.send(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -349,7 +349,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -367,7 +367,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -384,7 +384,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -400,7 +400,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -414,7 +414,7 @@ suspend fun TelegramBot.send(
|
|||||||
* as a builder for that
|
* as a builder for that
|
||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
payload: String,
|
payload: String,
|
||||||
@ -432,7 +432,7 @@ suspend fun TelegramBot.send(
|
|||||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -464,13 +464,12 @@ suspend fun TelegramBot.send(
|
|||||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
threadId: MessageThreadId? = null,
|
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) = sendInvoice(user, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendInvoice(user, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Will execute [sendStaticLocation] request
|
* Will execute [sendStaticLocation] request
|
||||||
@ -481,7 +480,7 @@ suspend fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -497,7 +496,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -514,7 +513,7 @@ suspend fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -530,7 +529,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@ -548,7 +547,7 @@ suspend fun TelegramBot.send(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -566,7 +565,7 @@ suspend fun TelegramBot.send(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -583,7 +582,7 @@ suspend fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -599,7 +598,7 @@ suspend fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -617,7 +616,7 @@ suspend fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -636,7 +635,7 @@ suspend fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -652,7 +651,7 @@ suspend fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
separator: TextSource? = null,
|
separator: TextSource? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -670,7 +669,7 @@ suspend fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
separator: String,
|
separator: String,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -689,7 +688,7 @@ suspend fun TelegramBot.send(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -707,7 +706,7 @@ suspend fun TelegramBot.send(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -725,7 +724,7 @@ suspend fun TelegramBot.send(
|
|||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -743,7 +742,7 @@ suspend fun TelegramBot.send(
|
|||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -760,7 +759,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -777,7 +776,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -794,7 +793,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -811,7 +810,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -832,7 +831,7 @@ suspend fun TelegramBot.send(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -854,7 +853,7 @@ suspend fun TelegramBot.send(
|
|||||||
isAnonymous: Boolean = poll.isAnonymous,
|
isAnonymous: Boolean = poll.isAnonymous,
|
||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -875,7 +874,7 @@ suspend fun TelegramBot.send(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -897,7 +896,7 @@ suspend fun TelegramBot.send(
|
|||||||
isAnonymous: Boolean = poll.isAnonymous,
|
isAnonymous: Boolean = poll.isAnonymous,
|
||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -920,7 +919,7 @@ suspend fun TelegramBot.send(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -943,7 +942,7 @@ suspend fun TelegramBot.send(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -967,7 +966,7 @@ suspend fun TelegramBot.send(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -993,7 +992,7 @@ suspend fun TelegramBot.send(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1015,7 +1014,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1037,7 +1036,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1060,7 +1059,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
isAnonymous: Boolean = quizPoll.isAnonymous,
|
isAnonymous: Boolean = quizPoll.isAnonymous,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1083,7 +1082,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
isAnonymous: Boolean = quizPoll.isAnonymous,
|
isAnonymous: Boolean = quizPoll.isAnonymous,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1099,7 +1098,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1115,7 +1114,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1137,7 +1136,7 @@ suspend fun TelegramBot.send(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1171,7 +1170,7 @@ suspend fun TelegramBot.send(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1194,7 +1193,7 @@ suspend fun TelegramBot.send(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1216,7 +1215,7 @@ suspend fun TelegramBot.send(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1241,7 +1240,7 @@ suspend fun TelegramBot.send(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1264,7 +1263,7 @@ suspend fun TelegramBot.send(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1286,7 +1285,7 @@ suspend fun TelegramBot.send(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1308,7 +1307,7 @@ suspend fun TelegramBot.send(
|
|||||||
foursquareType: FoursquareType? = null,
|
foursquareType: FoursquareType? = null,
|
||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1324,7 +1323,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1340,7 +1339,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1358,7 +1357,7 @@ suspend fun TelegramBot.send(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1376,7 +1375,7 @@ suspend fun TelegramBot.send(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1393,7 +1392,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1410,7 +1409,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1426,7 +1425,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1442,7 +1441,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1460,7 +1459,7 @@ suspend fun TelegramBot.send(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1478,7 +1477,7 @@ suspend fun TelegramBot.send(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1495,7 +1494,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1512,7 +1511,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1528,7 +1527,7 @@ suspend inline fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1543,7 +1542,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1558,7 +1557,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupPartContent>,
|
media: List<MediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1573,7 +1572,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupPartContent>,
|
media: List<MediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1587,7 +1586,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1601,7 +1600,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1615,7 +1614,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioContent>,
|
media: List<AudioContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1629,7 +1628,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioContent>,
|
media: List<AudioContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1643,7 +1642,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1657,7 +1656,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1671,7 +1670,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentContent>,
|
media: List<DocumentContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1685,7 +1684,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentContent>,
|
media: List<DocumentContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1699,7 +1698,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1713,7 +1712,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1727,7 +1726,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupPartContent>,
|
media: List<VisualMediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -1741,7 +1740,7 @@ suspend fun TelegramBot.send(
|
|||||||
suspend fun TelegramBot.send(
|
suspend fun TelegramBot.send(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupPartContent>,
|
media: List<VisualMediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.MessageThreadId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.games.Game
|
import dev.inmo.tgbotapi.types.games.Game
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -16,7 +17,7 @@ import dev.inmo.tgbotapi.types.games.Game
|
|||||||
suspend fun TelegramBot.sendGame(
|
suspend fun TelegramBot.sendGame(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -35,7 +36,7 @@ suspend fun TelegramBot.sendGame(
|
|||||||
suspend fun TelegramBot.sendGame(
|
suspend fun TelegramBot.sendGame(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -52,7 +53,7 @@ suspend fun TelegramBot.sendGame(
|
|||||||
suspend fun TelegramBot.sendGame(
|
suspend fun TelegramBot.sendGame(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -69,7 +70,7 @@ suspend fun TelegramBot.sendGame(
|
|||||||
suspend fun TelegramBot.sendGame(
|
suspend fun TelegramBot.sendGame(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
game: Game,
|
game: Game,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.AnimationFile
|
import dev.inmo.tgbotapi.types.files.AnimationFile
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -25,7 +26,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -62,7 +63,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -85,7 +86,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -105,7 +106,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -126,7 +127,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -161,7 +162,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -183,7 +184,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -202,7 +203,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.AudioFile
|
import dev.inmo.tgbotapi.types.files.AudioFile
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -25,7 +26,7 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -63,7 +64,7 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -81,7 +82,7 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -99,7 +100,7 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -120,7 +121,7 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -156,7 +157,7 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -173,7 +174,7 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
audio: AudioFile,
|
audio: AudioFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -190,7 +191,7 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
audio: AudioFile,
|
audio: AudioFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.DocumentFile
|
import dev.inmo.tgbotapi.types.files.DocumentFile
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -22,7 +23,7 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -56,7 +57,7 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -74,7 +75,7 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -94,7 +95,7 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -112,7 +113,7 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
document: InputFile,
|
document: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -144,7 +145,7 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
document: InputFile,
|
document: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -161,7 +162,7 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -180,7 +181,7 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.content.MediaGroupPartContent
|
|||||||
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent
|
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.AudioContent
|
import dev.inmo.tgbotapi.types.message.content.AudioContent
|
||||||
import dev.inmo.tgbotapi.types.message.content.DocumentContent
|
import dev.inmo.tgbotapi.types.message.content.DocumentContent
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import kotlin.jvm.JvmName
|
import kotlin.jvm.JvmName
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ import kotlin.jvm.JvmName
|
|||||||
suspend fun TelegramBot.sendMediaGroup(
|
suspend fun TelegramBot.sendMediaGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -39,7 +40,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
suspend fun TelegramBot.sendMediaGroup(
|
suspend fun TelegramBot.sendMediaGroup(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -56,7 +57,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
suspend fun TelegramBot.sendMediaGroup(
|
suspend fun TelegramBot.sendMediaGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupPartContent>,
|
media: List<MediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -73,7 +74,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
suspend fun TelegramBot.sendMediaGroup(
|
suspend fun TelegramBot.sendMediaGroup(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupPartContent>,
|
media: List<MediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -88,7 +89,7 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
suspend fun TelegramBot.sendPlaylist(
|
suspend fun TelegramBot.sendPlaylist(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -105,7 +106,7 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
suspend fun TelegramBot.sendPlaylist(
|
suspend fun TelegramBot.sendPlaylist(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -121,7 +122,7 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
suspend fun TelegramBot.sendPlaylist(
|
suspend fun TelegramBot.sendPlaylist(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioContent>,
|
media: List<AudioContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -137,7 +138,7 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
suspend fun TelegramBot.sendPlaylist(
|
suspend fun TelegramBot.sendPlaylist(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioContent>,
|
media: List<AudioContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -152,7 +153,7 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
suspend fun TelegramBot.sendDocumentsGroup(
|
suspend fun TelegramBot.sendDocumentsGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -169,7 +170,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
suspend fun TelegramBot.sendDocumentsGroup(
|
suspend fun TelegramBot.sendDocumentsGroup(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -185,7 +186,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
suspend fun TelegramBot.sendDocumentsGroup(
|
suspend fun TelegramBot.sendDocumentsGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentContent>,
|
media: List<DocumentContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -201,7 +202,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
suspend fun TelegramBot.sendDocumentsGroup(
|
suspend fun TelegramBot.sendDocumentsGroup(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentContent>,
|
media: List<DocumentContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -216,7 +217,7 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -233,7 +234,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -249,7 +250,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupPartContent>,
|
media: List<VisualMediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -265,7 +266,7 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
suspend fun TelegramBot.sendVisualMediaGroup(
|
suspend fun TelegramBot.sendVisualMediaGroup(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupPartContent>,
|
media: List<VisualMediaGroupPartContent>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.*
|
import dev.inmo.tgbotapi.types.files.*
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -21,7 +22,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -51,7 +52,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -68,7 +69,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -85,7 +86,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -102,7 +103,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -119,7 +120,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -136,7 +137,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -164,7 +165,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -180,7 +181,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -196,7 +197,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -212,7 +213,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -228,7 +229,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
photoSize: PhotoSize,
|
photoSize: PhotoSize,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.MessageThreadId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.Sticker
|
import dev.inmo.tgbotapi.types.files.Sticker
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -17,7 +18,7 @@ import dev.inmo.tgbotapi.types.files.Sticker
|
|||||||
suspend fun TelegramBot.sendSticker(
|
suspend fun TelegramBot.sendSticker(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -34,7 +35,7 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
suspend fun TelegramBot.sendSticker(
|
suspend fun TelegramBot.sendSticker(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -49,7 +50,7 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
suspend fun TelegramBot.sendSticker(
|
suspend fun TelegramBot.sendSticker(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -64,7 +65,7 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
suspend fun TelegramBot.sendSticker(
|
suspend fun TelegramBot.sendSticker(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VideoFile
|
import dev.inmo.tgbotapi.types.files.VideoFile
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -25,7 +26,7 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -60,7 +61,7 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -81,7 +82,7 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -99,7 +100,7 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -119,7 +120,7 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -152,7 +153,7 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -172,7 +173,7 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -189,7 +190,7 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.MessageThreadId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
import dev.inmo.tgbotapi.types.files.VideoNoteFile
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -20,7 +21,7 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -49,7 +50,7 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
suspend fun TelegramBot.sendVideoNote(
|
suspend fun TelegramBot.sendVideoNote(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -69,7 +70,7 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -84,7 +85,7 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
suspend fun TelegramBot.sendVideoNote(
|
suspend fun TelegramBot.sendVideoNote(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.files.VoiceFile
|
import dev.inmo.tgbotapi.types.files.VoiceFile
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -22,7 +23,7 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -54,7 +55,7 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -71,7 +72,7 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -90,7 +91,7 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -108,7 +109,7 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice: InputFile,
|
voice: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -138,7 +139,7 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice: InputFile,
|
voice: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -154,7 +155,7 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -171,7 +172,7 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
|||||||
* as a builder for that
|
* as a builder for that
|
||||||
*/
|
*/
|
||||||
suspend fun TelegramBot.sendInvoice(
|
suspend fun TelegramBot.sendInvoice(
|
||||||
chatId: ChatId,
|
chatId: IdChatIdentifier,
|
||||||
title: String,
|
title: String,
|
||||||
description: String,
|
description: String,
|
||||||
payload: String,
|
payload: String,
|
||||||
@ -31,7 +31,7 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -64,10 +64,9 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendPhoneNumberToProvider: Boolean = false,
|
shouldSendPhoneNumberToProvider: Boolean = false,
|
||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
threadId: MessageThreadId? = null,
|
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, null, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.polls.*
|
import dev.inmo.tgbotapi.types.polls.*
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
@ -24,7 +25,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -48,7 +49,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isAnonymous: Boolean = poll.isAnonymous,
|
isAnonymous: Boolean = poll.isAnonymous,
|
||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -68,7 +69,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -91,7 +92,7 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
isAnonymous: Boolean = poll.isAnonymous,
|
isAnonymous: Boolean = poll.isAnonymous,
|
||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -116,7 +117,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -142,7 +143,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -167,7 +168,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -192,7 +193,7 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -216,7 +217,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -241,7 +242,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -265,7 +266,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous: Boolean = quizPoll.isAnonymous,
|
isAnonymous: Boolean = quizPoll.isAnonymous,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -289,7 +290,7 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
isAnonymous: Boolean = quizPoll.isAnonymous,
|
isAnonymous: Boolean = quizPoll.isAnonymous,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -20,7 +20,7 @@ data class ForwardMessage(
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageId,
|
override val messageId: MessageId,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
val disableNotification: Boolean = false,
|
val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -2,9 +2,8 @@ package dev.inmo.tgbotapi.requests.chat.abstracts
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.UserId
|
|
||||||
|
|
||||||
interface ChatSenderRequest : ChatRequest, SimpleRequest<Boolean> {
|
interface ChatSenderRequest : ChatRequest, SimpleRequest<Boolean> {
|
||||||
val senderChatId: ChatId
|
val senderChatId: IdChatIdentifier
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.requests.chat.get
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
|
import dev.inmo.tgbotapi.types.ChatIdWithThreadId
|
||||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
import dev.inmo.tgbotapi.types.chat.ExtendedChatSerializer
|
||||||
import dev.inmo.tgbotapi.types.chat.ExtendedChat
|
import dev.inmo.tgbotapi.types.chat.ExtendedChat
|
||||||
@ -14,8 +15,12 @@ data class GetChat(
|
|||||||
override val chatId: ChatIdentifier
|
override val chatId: ChatIdentifier
|
||||||
): ChatRequest, SimpleRequest<ExtendedChat> {
|
): ChatRequest, SimpleRequest<ExtendedChat> {
|
||||||
override fun method(): String = "getChat"
|
override fun method(): String = "getChat"
|
||||||
override val resultDeserializer: DeserializationStrategy<ExtendedChat>
|
@Transient
|
||||||
get() = ExtendedChatSerializer
|
override val resultDeserializer: DeserializationStrategy<ExtendedChat> = if (chatId is ChatIdWithThreadId) {
|
||||||
|
ExtendedChatSerializer.BasedOnForumThread(chatId.threadId)
|
||||||
|
} else {
|
||||||
|
ExtendedChatSerializer
|
||||||
|
}
|
||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
get() = serializer()
|
get() = serializer()
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ data class BanChatSenderChat(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(senderChatIdField)
|
@SerialName(senderChatIdField)
|
||||||
override val senderChatId: ChatId
|
override val senderChatId: IdChatIdentifier
|
||||||
) : ChatSenderRequest {
|
) : ChatSenderRequest {
|
||||||
override fun method(): String = "banChatSenderChat"
|
override fun method(): String = "banChatSenderChat"
|
||||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
@ -13,7 +13,7 @@ data class UnbanChatSenderChat(
|
|||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
@SerialName(senderChatIdField)
|
@SerialName(senderChatIdField)
|
||||||
override val senderChatId: ChatId
|
override val senderChatId: IdChatIdentifier
|
||||||
) : ChatSenderRequest {
|
) : ChatSenderRequest {
|
||||||
override fun method(): String = "unbanChatSenderChat"
|
override fun method(): String = "unbanChatSenderChat"
|
||||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
@ -10,7 +10,7 @@ data class GetGameHighScoresByChat (
|
|||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
override val userId: UserId,
|
override val userId: UserId,
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatId,
|
override val chatId: IdChatIdentifier,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageId
|
override val messageId: MessageId
|
||||||
) : GetGameHighScores, MessageAction {
|
) : GetGameHighScores, MessageAction {
|
||||||
|
@ -12,7 +12,7 @@ data class SetGameScoreByChatId (
|
|||||||
@SerialName(scoreField)
|
@SerialName(scoreField)
|
||||||
override val score: Long,
|
override val score: Long,
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatId,
|
override val chatId: IdChatIdentifier,
|
||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageId,
|
override val messageId: MessageId,
|
||||||
@SerialName(forceField)
|
@SerialName(forceField)
|
||||||
|
@ -27,7 +27,7 @@ fun CopyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -53,7 +53,7 @@ fun CopyMessage(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -80,7 +80,7 @@ fun CopyMessage(
|
|||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -106,7 +106,7 @@ fun CopyMessage(
|
|||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -142,7 +142,7 @@ data class CopyMessage internal constructor(
|
|||||||
@SerialName(captionEntitiesField)
|
@SerialName(captionEntitiesField)
|
||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -23,7 +23,7 @@ data class SendContact(
|
|||||||
@SerialName(lastNameField)
|
@SerialName(lastNameField)
|
||||||
val lastName: String? = null,
|
val lastName: String? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
@ -40,7 +40,7 @@ data class SendContact(
|
|||||||
constructor(
|
constructor(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -68,7 +68,7 @@ data class SendContact(
|
|||||||
|
|
||||||
fun Contact.toRequest(
|
fun Contact.toRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -18,7 +18,7 @@ fun SendLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -44,7 +44,7 @@ fun SendStaticLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -60,7 +60,7 @@ fun SendLiveLocation(
|
|||||||
horizontalAccuracy: Meters? = null,
|
horizontalAccuracy: Meters? = null,
|
||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -99,7 +99,7 @@ data class SendLocation internal constructor(
|
|||||||
@SerialName(proximityAlertRadiusField)
|
@SerialName(proximityAlertRadiusField)
|
||||||
override val proximityAlertRadius: Meters? = null,
|
override val proximityAlertRadius: Meters? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -25,7 +25,7 @@ fun SendTextMessage(
|
|||||||
text: String,
|
text: String,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -49,7 +49,7 @@ fun SendTextMessage(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -80,7 +80,7 @@ data class SendTextMessage internal constructor(
|
|||||||
@SerialName(entitiesField)
|
@SerialName(entitiesField)
|
||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableWebPagePreviewField)
|
@SerialName(disableWebPagePreviewField)
|
||||||
override val disableWebPagePreview: Boolean? = null,
|
override val disableWebPagePreview: Boolean? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
|
@ -33,7 +33,7 @@ data class SendVenue(
|
|||||||
@SerialName(googlePlaceTypeField)
|
@SerialName(googlePlaceTypeField)
|
||||||
val googlePlaceType: GooglePlaceType? = null,
|
val googlePlaceType: GooglePlaceType? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
@ -52,7 +52,7 @@ data class SendVenue(
|
|||||||
constructor(
|
constructor(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -85,7 +85,7 @@ data class SendVenue(
|
|||||||
|
|
||||||
fun Venue.toRequest(
|
fun Venue.toRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -19,7 +19,7 @@ data class SendGame (
|
|||||||
@SerialName(gameShortNameField)
|
@SerialName(gameShortNameField)
|
||||||
val gameShortName: String,
|
val gameShortName: String,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -28,7 +28,7 @@ fun SendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -76,7 +76,7 @@ fun SendAnimation(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -140,7 +140,7 @@ data class SendAnimationData internal constructor(
|
|||||||
@SerialName(heightField)
|
@SerialName(heightField)
|
||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -29,7 +29,7 @@ fun SendAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -77,7 +77,7 @@ fun SendAudio(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -141,7 +141,7 @@ data class SendAudioData internal constructor(
|
|||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -34,7 +34,7 @@ fun SendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -87,7 +87,7 @@ fun SendDocument(
|
|||||||
document: InputFile,
|
document: InputFile,
|
||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -153,7 +153,7 @@ data class SendDocumentData internal constructor(
|
|||||||
@SerialName(captionEntitiesField)
|
@SerialName(captionEntitiesField)
|
||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -32,7 +32,7 @@ const val rawSendingMediaGroupsWarning = "Media groups contains restrictions rel
|
|||||||
fun <T : MediaGroupPartContent> SendMediaGroup(
|
fun <T : MediaGroupPartContent> SendMediaGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberTelegramMedia>,
|
media: List<MediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -82,7 +82,7 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
|
|||||||
inline fun SendPlaylist(
|
inline fun SendPlaylist(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberTelegramMedia>,
|
media: List<AudioMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -98,7 +98,7 @@ inline fun SendPlaylist(
|
|||||||
inline fun SendDocumentsGroup(
|
inline fun SendDocumentsGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
media: List<DocumentMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -115,7 +115,7 @@ inline fun SendDocumentsGroup(
|
|||||||
inline fun SendVisualMediaGroup(
|
inline fun SendVisualMediaGroup(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberTelegramMedia>,
|
media: List<VisualMediaGroupMemberTelegramMedia>,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -143,7 +143,7 @@ data class SendMediaGroupData internal constructor(
|
|||||||
override val chatId: ChatIdentifier,
|
override val chatId: ChatIdentifier,
|
||||||
val media: List<MediaGroupMemberTelegramMedia> = emptyList(),
|
val media: List<MediaGroupMemberTelegramMedia> = emptyList(),
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -23,7 +23,7 @@ fun SendPhoto(
|
|||||||
photo: InputFile,
|
photo: InputFile,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -55,7 +55,7 @@ fun SendPhoto(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
photo: InputFile,
|
photo: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -99,7 +99,7 @@ data class SendPhotoData internal constructor(
|
|||||||
@SerialName(captionEntitiesField)
|
@SerialName(captionEntitiesField)
|
||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -15,7 +15,7 @@ import kotlinx.serialization.json.JsonObject
|
|||||||
fun SendSticker(
|
fun SendSticker(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -47,7 +47,7 @@ data class SendStickerByFileId internal constructor(
|
|||||||
@SerialName(stickerField)
|
@SerialName(stickerField)
|
||||||
val sticker: FileId? = null,
|
val sticker: FileId? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -29,7 +29,7 @@ fun SendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
supportStreaming: Boolean? = null,
|
supportStreaming: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -79,7 +79,7 @@ fun SendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
supportStreaming: Boolean? = null,
|
supportStreaming: Boolean? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -146,7 +146,7 @@ data class SendVideoData internal constructor(
|
|||||||
@SerialName(supportStreamingField)
|
@SerialName(supportStreamingField)
|
||||||
val supportStreaming: Boolean? = null,
|
val supportStreaming: Boolean? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -17,7 +17,7 @@ fun SendVideoNote(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null, // in documentation - length (size of video side)
|
size: Int? = null, // in documentation - length (size of video side)
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -69,7 +69,7 @@ data class SendVideoNoteData internal constructor(
|
|||||||
@SerialName(lengthField)
|
@SerialName(lengthField)
|
||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -25,7 +25,7 @@ fun SendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -64,7 +64,7 @@ fun SendVoice(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
voice: InputFile,
|
voice: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
@ -118,7 +118,7 @@ data class SendVoiceData internal constructor(
|
|||||||
@SerialName(durationField)
|
@SerialName(durationField)
|
||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -22,7 +22,7 @@ private val invoiceMessageSerializer: DeserializationStrategy<ContentMessage<Inv
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class SendInvoice(
|
data class SendInvoice(
|
||||||
@SerialName(chatIdField)
|
@SerialName(chatIdField)
|
||||||
override val chatId: ChatId,
|
override val chatId: IdChatIdentifier,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(descriptionField)
|
@SerialName(descriptionField)
|
||||||
@ -59,7 +59,7 @@ data class SendInvoice(
|
|||||||
@SerialName(priceDependOnShipAddressField)
|
@SerialName(priceDependOnShipAddressField)
|
||||||
override val priceDependOnShipAddress: Boolean = false,
|
override val priceDependOnShipAddress: Boolean = false,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -48,7 +48,7 @@ fun SendPoll(
|
|||||||
options: List<String>,
|
options: List<String>,
|
||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -74,7 +74,7 @@ fun SendPoll(
|
|||||||
*/
|
*/
|
||||||
fun Poll.createRequest(
|
fun Poll.createRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -202,7 +202,7 @@ data class SendRegularPoll(
|
|||||||
@SerialName(closeDateField)
|
@SerialName(closeDateField)
|
||||||
override val closeDate: LongSeconds?,
|
override val closeDate: LongSeconds?,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
@ -232,7 +232,7 @@ fun SendRegularPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -265,7 +265,7 @@ fun SendQuizPoll(
|
|||||||
explanation: String? = null,
|
explanation: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -299,7 +299,7 @@ fun SendQuizPoll(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -335,7 +335,7 @@ internal fun SendQuizPoll(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
rawEntities: List<RawMessageEntity>? = null,
|
rawEntities: List<RawMessageEntity>? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
threadId: MessageThreadId? = null,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
@ -386,7 +386,7 @@ data class SendQuizPoll internal constructor(
|
|||||||
@SerialName(closeDateField)
|
@SerialName(closeDateField)
|
||||||
override val closeDate: LongSeconds? = null,
|
override val closeDate: LongSeconds? = null,
|
||||||
@SerialName(messageThreadIdField)
|
@SerialName(messageThreadIdField)
|
||||||
override val threadId: MessageThreadId? = null,
|
override val threadId: MessageThreadId? = chatId.threadId,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
|
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types
|
|||||||
import dev.inmo.micro_utils.common.Warning
|
import dev.inmo.micro_utils.common.Warning
|
||||||
import dev.inmo.tgbotapi.types.chat.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
|
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||||
@ -10,19 +11,45 @@ import kotlinx.serialization.encoding.Decoder
|
|||||||
import kotlinx.serialization.encoding.Encoder
|
import kotlinx.serialization.encoding.Encoder
|
||||||
import kotlinx.serialization.json.JsonPrimitive
|
import kotlinx.serialization.json.JsonPrimitive
|
||||||
import kotlinx.serialization.json.longOrNull
|
import kotlinx.serialization.json.longOrNull
|
||||||
|
import kotlin.jvm.JvmInline
|
||||||
|
|
||||||
const val internalLinkBeginning = "https://t.me"
|
const val internalLinkBeginning = "https://t.me"
|
||||||
|
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
sealed class ChatIdentifier
|
@ClassCastsIncluded
|
||||||
|
sealed interface ChatIdentifier
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Also used as User Identifier
|
* Also used as User Identifier
|
||||||
*/
|
*/
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
data class ChatId(
|
sealed interface IdChatIdentifier : ChatIdentifier {
|
||||||
val chatId: Identifier
|
abstract val chatId: Identifier
|
||||||
) : ChatIdentifier()
|
val threadId: MessageThreadId?
|
||||||
|
get() = null
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
operator fun invoke(chatId: Identifier) = ChatId(chatId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
|
@JvmInline
|
||||||
|
value class ChatId(override val chatId: Identifier) : IdChatIdentifier
|
||||||
|
|
||||||
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
|
@JvmInline
|
||||||
|
value class ChatIdWithThreadId(val chatIdWithThreadId: Pair<Identifier, MessageThreadId>) : IdChatIdentifier {
|
||||||
|
override val chatId: Identifier
|
||||||
|
get() = chatIdWithThreadId.first
|
||||||
|
override val threadId: MessageThreadId
|
||||||
|
get() = chatIdWithThreadId.second
|
||||||
|
|
||||||
|
constructor(chatId: Identifier, threadId: MessageThreadId): this(chatId to threadId)
|
||||||
|
}
|
||||||
|
|
||||||
|
val ChatIdentifier.threadId: MessageThreadId?
|
||||||
|
get() = (this as? IdChatIdentifier) ?.threadId
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://core.telegram.org/bots/api#formatting-options
|
* https://core.telegram.org/bots/api#formatting-options
|
||||||
@ -39,16 +66,16 @@ val UserId.userLink: String
|
|||||||
val User.link: String
|
val User.link: String
|
||||||
get() = id.userLink
|
get() = id.userLink
|
||||||
|
|
||||||
typealias UserId = ChatId
|
typealias UserId = IdChatIdentifier
|
||||||
|
|
||||||
fun Identifier.toChatId(): ChatId = ChatId(this)
|
fun Identifier.toChatId(): IdChatIdentifier = ChatId(this)
|
||||||
fun Int.toChatId(): ChatId = toLong().toChatId()
|
fun Int.toChatId(): IdChatIdentifier = toLong().toChatId()
|
||||||
fun Byte.toChatId(): ChatId = toLong().toChatId()
|
fun Byte.toChatId(): IdChatIdentifier = toLong().toChatId()
|
||||||
|
|
||||||
@Serializable(ChatIdentifierSerializer::class)
|
@Serializable(ChatIdentifierSerializer::class)
|
||||||
data class Username(
|
data class Username(
|
||||||
val username: String
|
val username: String
|
||||||
) : ChatIdentifier() {
|
) : ChatIdentifier {
|
||||||
val usernameWithoutAt
|
val usernameWithoutAt
|
||||||
get() = username.dropWhile { it == '@' }
|
get() = username.dropWhile { it == '@' }
|
||||||
|
|
||||||
@ -80,7 +107,7 @@ object ChatIdentifierSerializer : KSerializer<ChatIdentifier> {
|
|||||||
|
|
||||||
override fun serialize(encoder: Encoder, value: ChatIdentifier) {
|
override fun serialize(encoder: Encoder, value: ChatIdentifier) {
|
||||||
when (value) {
|
when (value) {
|
||||||
is ChatId -> encoder.encodeLong(value.chatId)
|
is IdChatIdentifier -> encoder.encodeLong(value.chatId)
|
||||||
is Username -> encoder.encodeString(value.username)
|
is Username -> encoder.encodeString(value.username)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ data class RetryAfterError(
|
|||||||
}
|
}
|
||||||
|
|
||||||
data class MigrateChatId(
|
data class MigrateChatId(
|
||||||
val newChatId: ChatId
|
val newChatId: IdChatIdentifier
|
||||||
) : RequestError()
|
) : RequestError()
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import kotlinx.serialization.*
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class ResponseParametersRaw(
|
data class ResponseParametersRaw(
|
||||||
@SerialName("migrate_to_chat_id")
|
@SerialName("migrate_to_chat_id")
|
||||||
private val migrateToChatId: ChatId? = null,
|
private val migrateToChatId: IdChatIdentifier? = null,
|
||||||
@SerialName("retry_after")
|
@SerialName("retry_after")
|
||||||
private val retryAfter: Seconds? = null
|
private val retryAfter: Seconds? = null
|
||||||
) {
|
) {
|
||||||
|
@ -25,7 +25,9 @@ sealed interface PublicChat : Chat {
|
|||||||
sealed interface SuperPublicChat : PublicChat, UsernameChat
|
sealed interface SuperPublicChat : PublicChat, UsernameChat
|
||||||
|
|
||||||
@Serializable(PreviewChatSerializer::class)
|
@Serializable(PreviewChatSerializer::class)
|
||||||
sealed interface ChannelChat : SuperPublicChat
|
sealed interface ChannelChat : SuperPublicChat {
|
||||||
|
override val id: ChatId
|
||||||
|
}
|
||||||
|
|
||||||
@Serializable(PreviewChatSerializer::class)
|
@Serializable(PreviewChatSerializer::class)
|
||||||
sealed interface GroupChat : PublicChat
|
sealed interface GroupChat : PublicChat
|
||||||
@ -49,5 +51,5 @@ sealed interface AbleToAddInAttachmentMenuChat : Chat {
|
|||||||
@Serializable(PreviewChatSerializer::class)
|
@Serializable(PreviewChatSerializer::class)
|
||||||
@ClassCastsIncluded
|
@ClassCastsIncluded
|
||||||
sealed interface Chat {
|
sealed interface Chat {
|
||||||
val id: ChatId
|
val id: IdChatIdentifier
|
||||||
}
|
}
|
||||||
|
@ -93,9 +93,9 @@ object PreviewChatSerializer : KSerializer<Chat> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
sealed class ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
||||||
@OptIn(InternalSerializationApi::class)
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor("PreviewChatSerializer", PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor("ExtendedChatSerializer", PolymorphicKind.OPEN)
|
||||||
|
|
||||||
override fun deserialize(decoder: Decoder): ExtendedChat {
|
override fun deserialize(decoder: Decoder): ExtendedChat {
|
||||||
val decodedJson = JsonObject.serializer().deserialize(decoder)
|
val decodedJson = JsonObject.serializer().deserialize(decoder)
|
||||||
@ -131,6 +131,22 @@ object ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
|||||||
is UnknownExtendedChat -> JsonObject.serializer().serialize(encoder, value.rawJson)
|
is UnknownExtendedChat -> JsonObject.serializer().serialize(encoder, value.rawJson)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class BasedOnForumThread(private val threadId: MessageThreadId) : ExtendedChatSerializer() {
|
||||||
|
override fun deserialize(decoder: Decoder): ExtendedChat {
|
||||||
|
return super.deserialize(decoder).let {
|
||||||
|
if (it is ExtendedForumChatImpl) {
|
||||||
|
it.copy(
|
||||||
|
id = (it.id as? ChatIdWithThreadId) ?: ChatIdWithThreadId(it.id.chatId, threadId)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object : ExtendedChatSerializer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
|
@ -27,7 +27,7 @@ data class ExtendedChannelChatImpl(
|
|||||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class)
|
||||||
override val pinnedMessage: Message? = null,
|
override val pinnedMessage: Message? = null,
|
||||||
@SerialName(linkedChatIdField)
|
@SerialName(linkedChatIdField)
|
||||||
override val linkedGroupChatId: ChatId? = null
|
override val linkedGroupChatId: IdChatIdentifier? = null
|
||||||
) : ExtendedChannelChat
|
) : ExtendedChannelChat
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -52,7 +52,7 @@ data class ExtendedGroupChatImpl(
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class ExtendedPrivateChatImpl(
|
data class ExtendedPrivateChatImpl(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: ChatId,
|
override val id: IdChatIdentifier,
|
||||||
@SerialName(photoField)
|
@SerialName(photoField)
|
||||||
override val chatPhoto: ChatPhoto? = null,
|
override val chatPhoto: ChatPhoto? = null,
|
||||||
@SerialName(usernameField)
|
@SerialName(usernameField)
|
||||||
@ -103,7 +103,7 @@ data class ExtendedSupergroupChatImpl(
|
|||||||
@SerialName(canSetStickerSetField)
|
@SerialName(canSetStickerSetField)
|
||||||
override val canSetStickerSet: Boolean = false,
|
override val canSetStickerSet: Boolean = false,
|
||||||
@SerialName(linkedChatIdField)
|
@SerialName(linkedChatIdField)
|
||||||
override val linkedChannelChatId: ChatId? = null,
|
override val linkedChannelChatId: IdChatIdentifier? = null,
|
||||||
@SerialName(locationField)
|
@SerialName(locationField)
|
||||||
override val location: ChatLocation? = null,
|
override val location: ChatLocation? = null,
|
||||||
@SerialName(joinToSendMessagesField)
|
@SerialName(joinToSendMessagesField)
|
||||||
@ -115,7 +115,7 @@ data class ExtendedSupergroupChatImpl(
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class ExtendedForumChatImpl(
|
data class ExtendedForumChatImpl(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: ChatId,
|
override val id: IdChatIdentifier,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(usernameField)
|
@SerialName(usernameField)
|
||||||
@ -140,7 +140,7 @@ data class ExtendedForumChatImpl(
|
|||||||
@SerialName(canSetStickerSetField)
|
@SerialName(canSetStickerSetField)
|
||||||
override val canSetStickerSet: Boolean = false,
|
override val canSetStickerSet: Boolean = false,
|
||||||
@SerialName(linkedChatIdField)
|
@SerialName(linkedChatIdField)
|
||||||
override val linkedChannelChatId: ChatId? = null,
|
override val linkedChannelChatId: IdChatIdentifier? = null,
|
||||||
@SerialName(locationField)
|
@SerialName(locationField)
|
||||||
override val location: ChatLocation? = null,
|
override val location: ChatLocation? = null,
|
||||||
@SerialName(joinToSendMessagesField)
|
@SerialName(joinToSendMessagesField)
|
||||||
@ -170,7 +170,7 @@ data class ExtendedBot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
data class UnknownExtendedChat(
|
data class UnknownExtendedChat(
|
||||||
override val id: ChatId,
|
override val id: IdChatIdentifier,
|
||||||
val raw: String,
|
val raw: String,
|
||||||
val rawJson: JsonObject
|
val rawJson: JsonObject
|
||||||
) : ExtendedChat {
|
) : ExtendedChat {
|
||||||
|
@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable
|
|||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer::class)
|
||||||
sealed interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat, ExtendedChatWithUsername {
|
sealed interface ExtendedChannelChat : ChannelChat, ExtendedPublicChat, ExtendedChatWithUsername {
|
||||||
val linkedGroupChatId: ChatId?
|
val linkedGroupChatId: IdChatIdentifier?
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer::class)
|
||||||
@ -38,7 +38,7 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext
|
|||||||
val slowModeDelay: Long?
|
val slowModeDelay: Long?
|
||||||
val stickerSetName: StickerSetName?
|
val stickerSetName: StickerSetName?
|
||||||
val canSetStickerSet: Boolean
|
val canSetStickerSet: Boolean
|
||||||
val linkedChannelChatId: ChatId?
|
val linkedChannelChatId: IdChatIdentifier?
|
||||||
val location: ChatLocation?
|
val location: ChatLocation?
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,7 +53,7 @@ sealed interface ExtendedSupergroupChat : SupergroupChat, ExtendedGroupChat, Ext
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer::class)
|
||||||
sealed interface ExtendedForumChat : ExtendedSupergroupChat
|
sealed interface ExtendedForumChat : ExtendedSupergroupChat, ForumChat
|
||||||
|
|
||||||
@Serializable(ExtendedChatSerializer::class)
|
@Serializable(ExtendedChatSerializer::class)
|
||||||
sealed interface ExtendedChat : Chat {
|
sealed interface ExtendedChat : Chat {
|
||||||
|
@ -18,7 +18,7 @@ data class GroupChatImpl(
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class PrivateChatImpl(
|
data class PrivateChatImpl(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: ChatId,
|
override val id: IdChatIdentifier,
|
||||||
@SerialName(usernameField)
|
@SerialName(usernameField)
|
||||||
override val username: Username? = null,
|
override val username: Username? = null,
|
||||||
@SerialName(firstNameField)
|
@SerialName(firstNameField)
|
||||||
@ -40,7 +40,7 @@ data class SupergroupChatImpl(
|
|||||||
@Serializable
|
@Serializable
|
||||||
data class ForumChatImpl(
|
data class ForumChatImpl(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
override val id: ChatId,
|
override val id: IdChatIdentifier,
|
||||||
@SerialName(titleField)
|
@SerialName(titleField)
|
||||||
override val title: String,
|
override val title: String,
|
||||||
@SerialName(usernameField)
|
@SerialName(usernameField)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package dev.inmo.tgbotapi.types.chat
|
package dev.inmo.tgbotapi.types.chat
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
|
|
||||||
data class UnknownChatType(
|
data class UnknownChatType(
|
||||||
override val id: ChatId,
|
override val id: IdChatIdentifier,
|
||||||
val raw: String,
|
val raw: String,
|
||||||
val rawJson: JsonObject
|
val rawJson: JsonObject
|
||||||
) : Chat
|
) : Chat
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package dev.inmo.tgbotapi.types.message.ChatEvents
|
package dev.inmo.tgbotapi.types.message.ChatEvents
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.GroupEvent
|
||||||
|
|
||||||
class GroupChatCreated(
|
class GroupChatCreated(
|
||||||
val migratedTo: ChatId?
|
val migratedTo: IdChatIdentifier?
|
||||||
): GroupEvent
|
): GroupEvent
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package dev.inmo.tgbotapi.types.message.ChatEvents
|
package dev.inmo.tgbotapi.types.message.ChatEvents
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is sent when a group is converted to a supergroup.
|
* This event is sent when a group is converted to a supergroup.
|
||||||
*/
|
*/
|
||||||
data class MigratedToSupergroup(
|
data class MigratedToSupergroup(
|
||||||
val migratedFrom: ChatId
|
val migratedFrom: IdChatIdentifier
|
||||||
): SupergroupEvent
|
): SupergroupEvent
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package dev.inmo.tgbotapi.types.message.ChatEvents
|
package dev.inmo.tgbotapi.types.message.ChatEvents
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.SupergroupEvent
|
||||||
|
|
||||||
class SupergroupChatCreated(
|
class SupergroupChatCreated(
|
||||||
val migratedFrom: ChatId?
|
val migratedFrom: IdChatIdentifier?
|
||||||
): SupergroupEvent
|
): SupergroupEvent
|
||||||
|
@ -81,8 +81,8 @@ internal data class RawMessage(
|
|||||||
private val group_chat_created: Boolean = false,
|
private val group_chat_created: Boolean = false,
|
||||||
private val supergroup_chat_created: Boolean = false,
|
private val supergroup_chat_created: Boolean = false,
|
||||||
private val channel_chat_created: Boolean = false,
|
private val channel_chat_created: Boolean = false,
|
||||||
private val migrate_to_chat_id: ChatId? = null,
|
private val migrate_to_chat_id: IdChatIdentifier? = null,
|
||||||
private val migrate_from_chat_id: ChatId? = null,
|
private val migrate_from_chat_id: IdChatIdentifier? = null,
|
||||||
private val pinned_message: RawMessage? = null,
|
private val pinned_message: RawMessage? = null,
|
||||||
private val invoice: Invoice? = null,
|
private val invoice: Invoice? = null,
|
||||||
private val dice: Dice? = null,
|
private val dice: Dice? = null,
|
||||||
@ -286,9 +286,17 @@ internal data class RawMessage(
|
|||||||
media_group_id
|
media_group_id
|
||||||
)
|
)
|
||||||
is ForumChat -> if (messageThreadId != null) {
|
is ForumChat -> if (messageThreadId != null) {
|
||||||
|
val chatId = ChatIdWithThreadId(
|
||||||
|
chat.id.chatId,
|
||||||
|
messageThreadId
|
||||||
|
)
|
||||||
|
val actualForumChat = when (chat) {
|
||||||
|
is ExtendedForumChatImpl -> chat.copy(id = chatId)
|
||||||
|
is ForumChatImpl -> chat.copy(id = chatId)
|
||||||
|
}
|
||||||
when (sender_chat) {
|
when (sender_chat) {
|
||||||
is ChannelChat -> FromChannelForumContentMessageImpl(
|
is ChannelChat -> FromChannelForumContentMessageImpl(
|
||||||
chat,
|
actualForumChat,
|
||||||
sender_chat,
|
sender_chat,
|
||||||
messageId,
|
messageId,
|
||||||
messageThreadId,
|
messageThreadId,
|
||||||
@ -304,7 +312,7 @@ internal data class RawMessage(
|
|||||||
media_group_id
|
media_group_id
|
||||||
)
|
)
|
||||||
is GroupChat -> AnonymousForumContentMessageImpl(
|
is GroupChat -> AnonymousForumContentMessageImpl(
|
||||||
chat,
|
actualForumChat,
|
||||||
messageId,
|
messageId,
|
||||||
messageThreadId,
|
messageThreadId,
|
||||||
date.asDate,
|
date.asDate,
|
||||||
@ -319,7 +327,7 @@ internal data class RawMessage(
|
|||||||
media_group_id
|
media_group_id
|
||||||
)
|
)
|
||||||
null -> CommonForumContentMessageImpl(
|
null -> CommonForumContentMessageImpl(
|
||||||
chat,
|
actualForumChat,
|
||||||
messageId,
|
messageId,
|
||||||
messageThreadId,
|
messageThreadId,
|
||||||
from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
|
from ?: error("It is expected that in messages from non anonymous users and channels user must be specified"),
|
||||||
|
@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
|||||||
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.*
|
import dev.inmo.tgbotapi.types.message.abstracts.*
|
||||||
|
import dev.inmo.tgbotapi.types.threadId
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import kotlinx.serialization.modules.*
|
import kotlinx.serialization.modules.*
|
||||||
|
|
||||||
@ -114,7 +115,7 @@ sealed interface MediaContent: MessageContent {
|
|||||||
sealed interface ResendableContent {
|
sealed interface ResendableContent {
|
||||||
fun createResend(
|
fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
messageThreadId: MessageThreadId? = null,
|
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageId? = null,
|
replyToMessageId: MessageId? = null,
|
||||||
|
@ -3,13 +3,11 @@ package dev.inmo.tgbotapi.types.message.ChatEvents
|
|||||||
import dev.inmo.tgbotapi.TestsJsonFormat
|
import dev.inmo.tgbotapi.TestsJsonFormat
|
||||||
import dev.inmo.tgbotapi.extensions.utils.asMessageUpdate
|
import dev.inmo.tgbotapi.extensions.utils.asMessageUpdate
|
||||||
import dev.inmo.tgbotapi.extensions.utils.asMigratedToSupergroup
|
import dev.inmo.tgbotapi.extensions.utils.asMigratedToSupergroup
|
||||||
import dev.inmo.tgbotapi.extensions.utils.asSupergroupChatCreated
|
|
||||||
import dev.inmo.tgbotapi.extensions.utils.asSupergroupEventMessage
|
import dev.inmo.tgbotapi.extensions.utils.asSupergroupEventMessage
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.UpdateDeserializationStrategy
|
import dev.inmo.tgbotapi.types.update.abstracts.UpdateDeserializationStrategy
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
import kotlin.test.assertIs
|
|
||||||
import kotlin.test.fail
|
import kotlin.test.fail
|
||||||
|
|
||||||
|
|
||||||
@ -47,6 +45,6 @@ class MigratedToSupergroupTest {
|
|||||||
val data = message.data.asSupergroupEventMessage() ?: fail("message should be of SupergroupEventMessage subtype")
|
val data = message.data.asSupergroupEventMessage() ?: fail("message should be of SupergroupEventMessage subtype")
|
||||||
val event = data.chatEvent.asMigratedToSupergroup() ?: fail("event should be of SupergroupChatCreated subtype")
|
val event = data.chatEvent.asMigratedToSupergroup() ?: fail("event should be of SupergroupChatCreated subtype")
|
||||||
|
|
||||||
assertEquals(ChatId(57005), event.migratedFrom)
|
assertEquals(IdChatIdentifier(57005), event.migratedFrom)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,14 @@ import dev.inmo.tgbotapi.abstracts.FromUser
|
|||||||
import dev.inmo.tgbotapi.abstracts.WithUser
|
import dev.inmo.tgbotapi.abstracts.WithUser
|
||||||
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
|
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
|
||||||
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
import dev.inmo.tgbotapi.requests.send.payments.SendInvoice
|
||||||
|
import dev.inmo.tgbotapi.types.ChatId
|
||||||
|
import dev.inmo.tgbotapi.types.ChatIdWithThreadId
|
||||||
|
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.ChatInviteLink
|
import dev.inmo.tgbotapi.types.ChatInviteLink
|
||||||
import dev.inmo.tgbotapi.types.ChatInviteLinkUnlimited
|
import dev.inmo.tgbotapi.types.ChatInviteLinkUnlimited
|
||||||
import dev.inmo.tgbotapi.types.ChatInviteLinkWithJoinRequest
|
import dev.inmo.tgbotapi.types.ChatInviteLinkWithJoinRequest
|
||||||
import dev.inmo.tgbotapi.types.ChatInviteLinkWithLimitedMembers
|
import dev.inmo.tgbotapi.types.ChatInviteLinkWithLimitedMembers
|
||||||
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult
|
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.BaseChosenInlineResult
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult
|
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.ChosenInlineResult
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult
|
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.LocationChosenInlineResult
|
||||||
@ -84,6 +88,7 @@ import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
|
|||||||
import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery
|
import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery
|
||||||
import dev.inmo.tgbotapi.types.PrimaryInviteLink
|
import dev.inmo.tgbotapi.types.PrimaryInviteLink
|
||||||
import dev.inmo.tgbotapi.types.SecondaryChatInviteLink
|
import dev.inmo.tgbotapi.types.SecondaryChatInviteLink
|
||||||
|
import dev.inmo.tgbotapi.types.Username
|
||||||
import dev.inmo.tgbotapi.types.actions.BotAction
|
import dev.inmo.tgbotapi.types.actions.BotAction
|
||||||
import dev.inmo.tgbotapi.types.actions.ChooseStickerAction
|
import dev.inmo.tgbotapi.types.actions.ChooseStickerAction
|
||||||
import dev.inmo.tgbotapi.types.actions.CustomBotAction
|
import dev.inmo.tgbotapi.types.actions.CustomBotAction
|
||||||
@ -986,6 +991,40 @@ public inline fun <T>
|
|||||||
WithUser.ifMessageGameShortNameCallbackQuery(block: (MessageGameShortNameCallbackQuery) -> T):
|
WithUser.ifMessageGameShortNameCallbackQuery(block: (MessageGameShortNameCallbackQuery) -> T):
|
||||||
T? = messageGameShortNameCallbackQueryOrNull() ?.let(block)
|
T? = messageGameShortNameCallbackQueryOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.idChatIdentifierOrNull(): IdChatIdentifier? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.idChatIdentifierOrThrow(): IdChatIdentifier = this as
|
||||||
|
dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
|
|
||||||
|
public inline fun <T> ChatIdentifier.ifIdChatIdentifier(block: (IdChatIdentifier) -> T): T? =
|
||||||
|
idChatIdentifierOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.chatIdOrNull(): ChatId? = this as? dev.inmo.tgbotapi.types.ChatId
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.chatIdOrThrow(): ChatId = this as dev.inmo.tgbotapi.types.ChatId
|
||||||
|
|
||||||
|
public inline fun <T> ChatIdentifier.ifChatId(block: (ChatId) -> T): T? = chatIdOrNull()
|
||||||
|
?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.chatIdWithThreadIdOrNull(): ChatIdWithThreadId? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.ChatIdWithThreadId
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.chatIdWithThreadIdOrThrow(): ChatIdWithThreadId = this as
|
||||||
|
dev.inmo.tgbotapi.types.ChatIdWithThreadId
|
||||||
|
|
||||||
|
public inline fun <T> ChatIdentifier.ifChatIdWithThreadId(block: (ChatIdWithThreadId) -> T): T? =
|
||||||
|
chatIdWithThreadIdOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.usernameOrNull(): Username? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.Username
|
||||||
|
|
||||||
|
public inline fun ChatIdentifier.usernameOrThrow(): Username = this as
|
||||||
|
dev.inmo.tgbotapi.types.Username
|
||||||
|
|
||||||
|
public inline fun <T> ChatIdentifier.ifUsername(block: (Username) -> T): T? = usernameOrNull()
|
||||||
|
?.let(block)
|
||||||
|
|
||||||
public inline fun InlineQueryResult.inlineQueryResultArticleOrNull(): InlineQueryResultArticle? =
|
public inline fun InlineQueryResult.inlineQueryResultArticleOrNull(): InlineQueryResultArticle? =
|
||||||
this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle
|
this as? dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.InlineQueryResultArticle
|
||||||
|
|
||||||
|
@ -160,10 +160,10 @@ inline val Message.supergroup_chat_created: Boolean
|
|||||||
inline val Message.channel_chat_created: Boolean
|
inline val Message.channel_chat_created: Boolean
|
||||||
get() = asChatEventMessage() ?.chatEvent is ChannelChatCreated
|
get() = asChatEventMessage() ?.chatEvent is ChannelChatCreated
|
||||||
@RiskFeature(RawFieldsUsageWarning)
|
@RiskFeature(RawFieldsUsageWarning)
|
||||||
inline val Message.migrate_to_chat_id: ChatId?
|
inline val Message.migrate_to_chat_id: IdChatIdentifier?
|
||||||
get() = asChatEventMessage() ?.chatEvent ?.asGroupChatCreated() ?.migratedTo
|
get() = asChatEventMessage() ?.chatEvent ?.asGroupChatCreated() ?.migratedTo
|
||||||
@RiskFeature(RawFieldsUsageWarning)
|
@RiskFeature(RawFieldsUsageWarning)
|
||||||
inline val Message.migrate_from_chat_id: ChatId?
|
inline val Message.migrate_from_chat_id: IdChatIdentifier?
|
||||||
get() = asChatEventMessage() ?.chatEvent ?.let {
|
get() = asChatEventMessage() ?.chatEvent ?.let {
|
||||||
it ?.asSupergroupChatCreated() ?.migratedFrom ?: it ?.asMigratedToSupergroup() ?.migratedFrom
|
it ?.asSupergroupChatCreated() ?.migratedFrom ?: it ?.asMigratedToSupergroup() ?.migratedFrom
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ infix fun String.mention(parseMode: ParseMode): String = when (parseMode) {
|
|||||||
is MarkdownV2 -> mentionMarkdownV2()
|
is MarkdownV2 -> mentionMarkdownV2()
|
||||||
}
|
}
|
||||||
|
|
||||||
infix fun Pair<String, ChatId>.mention(parseMode: ParseMode): String = when (parseMode) {
|
infix fun Pair<String, IdChatIdentifier>.mention(parseMode: ParseMode): String = when (parseMode) {
|
||||||
is HTML -> first.textMentionHTML(second)
|
is HTML -> first.textMentionHTML(second)
|
||||||
is Markdown -> first.textMentionMarkdown(second)
|
is Markdown -> first.textMentionMarkdown(second)
|
||||||
is MarkdownV2 -> first.textMentionMarkdownV2(second)
|
is MarkdownV2 -> first.textMentionMarkdownV2(second)
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package dev.inmo.tgbotapi.extensions.utils.updates
|
package dev.inmo.tgbotapi.extensions.utils.updates
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.types.ChatId
|
import dev.inmo.tgbotapi.types.IdChatIdentifier
|
||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate
|
import dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filter
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [Flow.filter] incoming [BaseMessageUpdate]s by their [ChatId]
|
* [Flow.filter] incoming [BaseMessageUpdate]s by their [IdChatIdentifier]
|
||||||
*/
|
*/
|
||||||
fun <T : BaseMessageUpdate> Flow<T>.filterBaseMessageUpdatesByChatId(chatId: ChatId): Flow<T> = filter { it.data.chat.id == chatId }
|
fun <T : BaseMessageUpdate> Flow<T>.filterBaseMessageUpdatesByChatId(chatId: IdChatIdentifier): Flow<T> = filter { it.data.chat.id == chatId }
|
||||||
/**
|
/**
|
||||||
* [Flow.filter] incoming [BaseMessageUpdate]s by their [ChatId] using [Chat.id] of [chat]
|
* [Flow.filter] incoming [BaseMessageUpdate]s by their [IdChatIdentifier] using [Chat.id] of [chat]
|
||||||
*/
|
*/
|
||||||
fun <T : BaseMessageUpdate> Flow<T>.filterBaseMessageUpdatesByChat(chat: Chat): Flow<T> = filterBaseMessageUpdatesByChatId(chat.id)
|
fun <T : BaseMessageUpdate> Flow<T>.filterBaseMessageUpdatesByChat(chat: Chat): Flow<T> = filterBaseMessageUpdatesByChatId(chat.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user