mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
commit
b61912d99a
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,4 +10,5 @@ build/
|
|||||||
out/
|
out/
|
||||||
|
|
||||||
local.properties
|
local.properties
|
||||||
|
kotlin-js-store/
|
||||||
secret.gradle
|
secret.gradle
|
||||||
|
32
CHANGELOG.md
32
CHANGELOG.md
@ -1,5 +1,37 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
|
## 0.38.0
|
||||||
|
|
||||||
|
_This update contains [Telegram Bot API 5.6](https://core.telegram.org/bots/api-changelog#december-30-2021) implementation_
|
||||||
|
|
||||||
|
_This update contains migration onto Kotlin 1.6_
|
||||||
|
|
||||||
|
_This update has changed constructors of all `CommonMessage` implementations_
|
||||||
|
|
||||||
|
|
||||||
|
* `Common`:
|
||||||
|
* `Version`:
|
||||||
|
* `Kotlin`: `1.5.31` -> `1.6.10`
|
||||||
|
* `Coroutines`: `1.5.2` -> `1.6.0`
|
||||||
|
* `Serialization`: `1.3.1` -> `1.3.2`
|
||||||
|
* `Klock`: `2.4.8` -> `2.4.10`
|
||||||
|
* `Ktor`: `1.6.5` -> `1.6.7`
|
||||||
|
* `MicroUtils`: `0.8.7` -> `0.9.0`
|
||||||
|
* `Core`:
|
||||||
|
* Add `SpoilerTextSource` (as part of `Telegram Bot API 5.6` update)
|
||||||
|
* Add support of `protect_content` as a field `protectContent` in all send message requests and parameter in all
|
||||||
|
functions related to that requests (as part of `Telegram Bot API 5.6` update)
|
||||||
|
* **ALL IMPLEMENTERS OF `CommonMessage` HAS CHANGED THEIR CONSTRUCTOR: NOW THEY GET `hasProtectedContent` instead of
|
||||||
|
`forwardable` (inversed) field**
|
||||||
|
* `ChannelContentMessageImpl`
|
||||||
|
* `ChannelMediaGroupMessage`
|
||||||
|
* `CommonMediaGroupMessage`
|
||||||
|
* `GroupContentMessage` implementers
|
||||||
|
* `ConnectedFromChannelGroupContentMessageImpl`
|
||||||
|
* `UnconnectedFromChannelGroupContentMessageImpl`
|
||||||
|
* `AnonymousGroupContentMessageImpl`
|
||||||
|
* `CommonGroupContentMessageImpl`
|
||||||
|
* `PrivateContentMessageImpl`
|
||||||
|
|
||||||
## 0.37.4
|
## 0.37.4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-5.5-blue)](https://core.telegram.org/bots/api-changelog#december-7-2021)
|
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-5.6-blue)](https://core.telegram.org/bots/api-changelog#december-30-2021)
|
||||||
|
|
||||||
| [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Build Status](https://github.com/InsanusMokrassar/TelegramBotAPI/workflows/Build/badge.svg)](https://github.com/InsanusMokrassar/TelegramBotAPI/actions) [![Small survey](https://img.shields.io/static/v1?label=Google&message=Survey&color=blue)](https://forms.gle/2Hex2ynbHWHhi1KY7) [![Chat in Telegram](https://img.shields.io/static/v1?label=Telegram&message=Chat&color=blue)](https://t.me/InMoTelegramBotAPI) |
|
| [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Build Status](https://github.com/InsanusMokrassar/TelegramBotAPI/workflows/Build/badge.svg)](https://github.com/InsanusMokrassar/TelegramBotAPI/actions) [![Small survey](https://img.shields.io/static/v1?label=Google&message=Survey&color=blue)](https://forms.gle/2Hex2ynbHWHhi1KY7) [![Chat in Telegram](https://img.shields.io/static/v1?label=Telegram&message=Chat&color=blue)](https://t.me/InMoTelegramBotAPI) |
|
||||||
|:---:|
|
|:---:|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
dokka_version=1.5.31
|
dokka_version=1.6.0
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx1024m
|
org.gradle.jvmargs=-Xmx1024m
|
||||||
|
@ -5,18 +5,19 @@ kotlin.js.generate.externals=true
|
|||||||
kotlin.incremental=true
|
kotlin.incremental=true
|
||||||
kotlin.incremental.js=true
|
kotlin.incremental.js=true
|
||||||
|
|
||||||
kotlin_version=1.5.31
|
kotlin_version=1.6.10
|
||||||
kotlin_coroutines_version=1.5.2
|
kotlin_coroutines_version=1.6.0
|
||||||
kotlin_serialisation_runtime_version=1.3.1
|
kotlin_serialisation_runtime_version=1.3.2
|
||||||
klock_version=2.4.8
|
klock_version=2.4.10
|
||||||
uuid_version=0.3.1
|
uuid_version=0.3.1
|
||||||
ktor_version=1.6.5
|
ktor_version=1.6.7
|
||||||
|
|
||||||
micro_utils_version=0.8.9
|
|
||||||
|
micro_utils_version=0.9.0
|
||||||
|
|
||||||
javax_activation_version=1.1.1
|
javax_activation_version=1.1.1
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=0.37.4
|
library_version=0.38.0
|
||||||
|
|
||||||
github_release_plugin_version=2.2.12
|
github_release_plugin_version=2.2.12
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||||
|
@ -11,40 +11,46 @@ suspend fun TelegramBot.forwardMessage(
|
|||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
disableNotification: Boolean = false
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false
|
||||||
) = execute(
|
) = execute(
|
||||||
ForwardMessage(fromChatId, toChatId, messageId, disableNotification)
|
ForwardMessage(fromChatId, toChatId, messageId, disableNotification, protectContent)
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
disableNotification: Boolean = false
|
disableNotification: Boolean = false,
|
||||||
) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification)
|
protectContent: Boolean = false
|
||||||
|
) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification, protectContent)
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
disableNotification: Boolean = false
|
disableNotification: Boolean = false,
|
||||||
) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification)
|
protectContent: Boolean = false
|
||||||
|
) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification, protectContent)
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
fromChat: Chat,
|
fromChat: Chat,
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
disableNotification: Boolean = false
|
disableNotification: Boolean = false,
|
||||||
) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification)
|
protectContent: Boolean = false
|
||||||
|
) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification, protectContent)
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
toChatId: ChatIdentifier,
|
toChatId: ChatIdentifier,
|
||||||
message: Message,
|
message: Message,
|
||||||
disableNotification: Boolean = false
|
disableNotification: Boolean = false,
|
||||||
) = forwardMessage(message.chat, toChatId, message.messageId, disableNotification)
|
protectContent: Boolean = false
|
||||||
|
) = forwardMessage(message.chat, toChatId, message.messageId, disableNotification, protectContent)
|
||||||
|
|
||||||
suspend fun TelegramBot.forwardMessage(
|
suspend fun TelegramBot.forwardMessage(
|
||||||
toChat: Chat,
|
toChat: Chat,
|
||||||
message: Message,
|
message: Message,
|
||||||
disableNotification: Boolean = false
|
disableNotification: Boolean = false,
|
||||||
) = forwardMessage(message.chat, toChat, message.messageId, disableNotification)
|
protectContent: Boolean = false
|
||||||
|
) = forwardMessage(message.chat, toChat, message.messageId, disableNotification, protectContent)
|
||||||
|
@ -91,6 +91,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -106,6 +107,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading,
|
initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -134,6 +136,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -147,6 +150,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading,
|
initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -165,6 +169,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -178,6 +183,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading,
|
initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -196,6 +202,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -209,6 +216,7 @@ suspend fun TelegramBot.startLiveLocation(
|
|||||||
initHeading,
|
initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -228,6 +236,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = startLiveLocation(
|
) = startLiveLocation(
|
||||||
@ -240,6 +249,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading,
|
initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -258,6 +268,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading: Degrees? = null,
|
initHeading: Degrees? = null,
|
||||||
initProximityAlertRadius: Meters? = null,
|
initProximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = startLiveLocation(
|
) = startLiveLocation(
|
||||||
@ -269,6 +280,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
initHeading,
|
initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -21,11 +21,12 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
CopyMessage(fromChatId, toChatId, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
CopyMessage(fromChatId, toChatId, messageId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,10 +40,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(fromChat.id, toChatId, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(fromChat.id, toChatId, messageId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -55,10 +57,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(fromChatId, toChat.id, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(fromChatId, toChat.id, messageId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -71,10 +74,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(fromChat.id, toChat.id, messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(fromChat.id, toChat.id, messageId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -86,10 +90,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(message.chat, toChatId, message.messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(message.chat, toChatId, message.messageId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -101,10 +106,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(message.chat, toChat, message.messageId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(message.chat, toChat, message.messageId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -117,11 +123,12 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
CopyMessage(fromChatId, toChatId, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
CopyMessage(fromChatId, toChatId, messageId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,10 +141,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(fromChat.id, toChatId, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(fromChat.id, toChatId, messageId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -149,10 +157,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(fromChatId, toChat.id, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(fromChatId, toChat.id, messageId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -164,10 +173,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(fromChat.id, toChat.id, messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(fromChat.id, toChat.id, messageId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -178,10 +188,11 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
message: Message,
|
message: Message,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(message.chat, toChatId, message.messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(message.chat, toChatId, message.messageId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -192,7 +203,8 @@ suspend inline fun TelegramBot.copyMessage(
|
|||||||
message: Message,
|
message: Message,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = copyMessage(message.chat, toChat, message.messageId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = copyMessage(message.chat, toChat, message.messageId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -38,6 +38,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendContact(
|
) = sendContact(
|
||||||
@ -46,6 +47,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
firstName,
|
firstName,
|
||||||
lastName,
|
lastName,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -59,12 +61,14 @@ suspend inline fun TelegramBot.reply(
|
|||||||
to: Message,
|
to: Message,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendContact(
|
) = sendContact(
|
||||||
to.chat,
|
to.chat,
|
||||||
contact,
|
contact,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -81,9 +85,10 @@ suspend inline fun TelegramBot.replyWithDice(
|
|||||||
to: Message,
|
to: Message,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendDice(to.chat, animationType, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendDice(to.chat, animationType, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -93,9 +98,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
to: Message,
|
to: Message,
|
||||||
animationType: DiceAnimationType,
|
animationType: DiceAnimationType,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = replyWithDice(to, animationType, disableNotification, allowSendingWithoutReply, replyMarkup)
|
) = replyWithDice(to, animationType, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Location
|
// Location
|
||||||
@ -109,12 +115,14 @@ suspend inline fun TelegramBot.reply(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(
|
) = sendLocation(
|
||||||
to.chat,
|
to.chat,
|
||||||
latitude,
|
latitude,
|
||||||
longitude,
|
longitude,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
)
|
)
|
||||||
@ -127,11 +135,13 @@ suspend inline fun TelegramBot.reply(
|
|||||||
to: Message,
|
to: Message,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(
|
) = sendLocation(
|
||||||
to.chat,
|
to.chat,
|
||||||
location,
|
location,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
)
|
)
|
||||||
@ -149,6 +159,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendTextMessage(
|
) = sendTextMessage(
|
||||||
@ -157,6 +168,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
parseMode,
|
parseMode,
|
||||||
disableWebPagePreview,
|
disableWebPagePreview,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -171,6 +183,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendTextMessage(
|
) = sendTextMessage(
|
||||||
@ -178,6 +191,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
entities,
|
entities,
|
||||||
disableWebPagePreview,
|
disableWebPagePreview,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -201,6 +215,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVenue(
|
) = sendVenue(
|
||||||
@ -214,6 +229,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = to.messageId,
|
replyToMessageId = to.messageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -229,6 +245,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVenue(
|
) = sendVenue(
|
||||||
@ -242,6 +259,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = to.messageId,
|
replyToMessageId = to.messageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -251,12 +269,14 @@ suspend inline fun TelegramBot.reply(
|
|||||||
to: Message,
|
to: Message,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVenue(
|
) = sendVenue(
|
||||||
chat = to.chat,
|
chat = to.chat,
|
||||||
venue = venue,
|
venue = venue,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = to.messageId,
|
replyToMessageId = to.messageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -269,29 +289,32 @@ suspend inline fun TelegramBot.replyWithGame(
|
|||||||
to: Message,
|
to: Message,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendGame(
|
) = sendGame(
|
||||||
to.chat, gameShortName, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup
|
to.chat, gameShortName, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithGame(
|
suspend inline fun TelegramBot.replyWithGame(
|
||||||
to: Message,
|
to: Message,
|
||||||
game: Game,
|
game: Game,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendGame(
|
) = sendGame(
|
||||||
to.chat, game.title, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup
|
to.chat, game.title, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
game: Game,
|
game: Game,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = replyWithGame(to, game, disableNotification, allowSendingWithoutReply, replyMarkup)
|
) = replyWithGame(to, game, disableNotification, protectContent, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Animation
|
// Animation
|
||||||
@ -306,6 +329,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(
|
) = sendAnimation(
|
||||||
@ -318,6 +342,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -332,9 +357,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(to.chat, animation, text, parseMode, duration, width, height, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(to.chat, animation, text, parseMode, duration, width, height, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAnimation(
|
suspend inline fun TelegramBot.replyWithAnimation(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -345,6 +371,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(
|
) = sendAnimation(
|
||||||
@ -356,6 +383,7 @@ suspend inline fun TelegramBot.replyWithAnimation(
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
to.messageId,
|
to.messageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -369,9 +397,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(to.chat, animation, entities, duration, width, height, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(to.chat, animation, entities, duration, width, height, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
@ -386,9 +415,10 @@ suspend inline fun TelegramBot.replyWithAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(to.chat, audio, thumb, text, parseMode, duration, performer, title, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(to.chat, audio, thumb, text, parseMode, duration, performer, title, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -397,9 +427,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(to.chat, audio, text, parseMode, title, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(to.chat, audio, text, parseMode, title, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithAudio(
|
suspend inline fun TelegramBot.replyWithAudio(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -410,9 +441,10 @@ suspend inline fun TelegramBot.replyWithAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(to.chat, audio, thumb, entities, duration, performer, title, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(to.chat, audio, thumb, entities, duration, performer, title, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -420,9 +452,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(to.chat, audio, entities, title, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(to.chat, audio, entities, title, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Documents
|
// Documents
|
||||||
@ -434,10 +467,11 @@ suspend inline fun TelegramBot.replyWithDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(to.chat, document, thumb, text, parseMode, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(to.chat, document, thumb, text, parseMode, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -445,10 +479,11 @@ suspend inline fun TelegramBot.reply(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(to.chat, document, text, parseMode, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(to.chat, document, text, parseMode, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithDocument(
|
suspend inline fun TelegramBot.replyWithDocument(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -456,20 +491,22 @@ suspend inline fun TelegramBot.replyWithDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(to.chat, document, thumb, entities, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(to.chat, document, thumb, entities, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(to.chat, document, entities, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(to.chat, document, entities, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
|
|
||||||
// Media Group
|
// Media Group
|
||||||
@ -479,29 +516,33 @@ suspend inline fun TelegramBot.replyWithMediaGroup(
|
|||||||
to: Message,
|
to: Message,
|
||||||
media: List<MediaGroupMemberInputMedia>,
|
media: List<MediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendMediaGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
|
) = sendMediaGroup(to.chat, media, disableNotification, protectContent, to.messageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithPlaylist(
|
suspend inline fun TelegramBot.replyWithPlaylist(
|
||||||
to: Message,
|
to: Message,
|
||||||
media: List<AudioMediaGroupMemberInputMedia>,
|
media: List<AudioMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendPlaylist(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
|
) = sendPlaylist(to.chat, media, disableNotification, protectContent, to.messageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithDocuments(
|
suspend inline fun TelegramBot.replyWithDocuments(
|
||||||
to: Message,
|
to: Message,
|
||||||
media: List<DocumentMediaGroupMemberInputMedia>,
|
media: List<DocumentMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendDocumentsGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
|
) = sendDocumentsGroup(to.chat, media, disableNotification, protectContent, to.messageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithGallery(
|
suspend inline fun TelegramBot.replyWithGallery(
|
||||||
to: Message,
|
to: Message,
|
||||||
media: List<VisualMediaGroupMemberInputMedia>,
|
media: List<VisualMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendVisualMediaGroup(to.chat, media, disableNotification, to.messageId, allowSendingWithoutReply)
|
) = sendVisualMediaGroup(to.chat, media, disableNotification, protectContent, to.messageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
|
|
||||||
// Photo
|
// Photo
|
||||||
@ -512,9 +553,10 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(to.chat, fileId, text, parseMode, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(to.chat, fileId, text, parseMode, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -522,9 +564,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(to.chat, photo, text, parseMode, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(to.chat, photo, text, parseMode, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithPhoto(
|
suspend inline fun TelegramBot.replyWithPhoto(
|
||||||
@ -532,18 +575,20 @@ suspend inline fun TelegramBot.replyWithPhoto(
|
|||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(to.chat, fileId, entities, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(to.chat, fileId, entities, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(to.chat, photo, entities, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(to.chat, photo, entities, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Sticker
|
// Sticker
|
||||||
@ -552,17 +597,19 @@ suspend inline fun TelegramBot.replyWithSticker(
|
|||||||
to: Message,
|
to: Message,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendSticker(to.chat, sticker, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendSticker(to.chat, sticker, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendSticker(to.chat, sticker, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendSticker(to.chat, sticker, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Videos
|
// Videos
|
||||||
@ -577,9 +624,10 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(to.chat, video, thumb, text, parseMode, duration, width, height, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(to.chat, video, thumb, text, parseMode, duration, width, height, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -587,9 +635,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(to.chat, video, text, parseMode, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(to.chat, video, text, parseMode, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVideo(
|
suspend inline fun TelegramBot.replyWithVideo(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -600,18 +649,20 @@ suspend inline fun TelegramBot.replyWithVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(to.chat, video, thumb, entities, duration, width, height, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(to.chat, video, thumb, entities, duration, width, height, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(to.chat, video, entities, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(to.chat, video, entities, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// VideoNotes
|
// VideoNotes
|
||||||
@ -623,17 +674,19 @@ suspend inline fun TelegramBot.replyWithVideoNote(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideoNote(to.chat, videoNote, thumb, duration, size, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideoNote(to.chat, videoNote, thumb, duration, size, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideoNote(to.chat, videoNote, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideoNote(to.chat, videoNote, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Voice
|
// Voice
|
||||||
@ -645,9 +698,10 @@ suspend inline fun TelegramBot.replyWithVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(to.chat, voice, text, parseMode, duration, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(to.chat, voice, text, parseMode, duration, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -655,9 +709,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(to.chat, voice, text, parseMode, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(to.chat, voice, text, parseMode, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
suspend inline fun TelegramBot.replyWithVoice(
|
suspend inline fun TelegramBot.replyWithVoice(
|
||||||
@ -666,18 +721,20 @@ suspend inline fun TelegramBot.replyWithVoice(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(to.chat, voice, entities, duration, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(to.chat, voice, entities, duration, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(to.chat, voice, entities, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(to.chat, voice, entities, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Invoice
|
// Invoice
|
||||||
@ -706,9 +763,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) = sendInvoice(to.chat.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendInvoice(to.chat.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
// Polls
|
// Polls
|
||||||
@ -722,9 +780,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendRegularPoll(to.chat, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendRegularPoll(to.chat, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -736,9 +795,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendRegularPoll(to.chat, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendRegularPoll(to.chat, poll, isClosed, question, options, isAnonymous, allowMultipleAnswers, closeInfo, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -751,9 +811,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(to.chat, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(to.chat, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -767,9 +828,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(to.chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(to.chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, explanation, parseMode, closeInfo, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -781,9 +843,10 @@ suspend inline fun TelegramBot.reply(
|
|||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(to.chat, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(to.chat, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
suspend inline fun TelegramBot.reply(
|
suspend inline fun TelegramBot.reply(
|
||||||
to: Message,
|
to: Message,
|
||||||
@ -796,6 +859,7 @@ suspend inline fun TelegramBot.reply(
|
|||||||
isAnonymous: Boolean = quizPoll.isAnonymous,
|
isAnonymous: Boolean = quizPoll.isAnonymous,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(to.chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, disableNotification, to.messageId, allowSendingWithoutReply, replyMarkup)
|
) = sendQuizPoll(to.chat, isClosed, quizPoll, question, options, correctOptionId, isAnonymous, entities, closeInfo, disableNotification, protectContent, to.messageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -16,12 +16,13 @@ suspend fun TelegramBot.sendContact(
|
|||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendContact(
|
SendContact(
|
||||||
chatId, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, phoneNumber, firstName, lastName, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -33,12 +34,13 @@ suspend fun TelegramBot.sendContact(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendContact(
|
SendContact(
|
||||||
chatId, contact, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, contact, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -52,11 +54,12 @@ suspend fun TelegramBot.sendContact(
|
|||||||
firstName: String,
|
firstName: String,
|
||||||
lastName: String? = null,
|
lastName: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendContact(
|
) = sendContact(
|
||||||
chat.id, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, phoneNumber, firstName, lastName, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,9 +70,10 @@ suspend fun TelegramBot.sendContact(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendContact(
|
) = sendContact(
|
||||||
chat.id, contact, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, contact, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
@ -16,11 +16,12 @@ suspend fun TelegramBot.sendDice(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendDice(chatId, animationType, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
SendDice(chatId, animationType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,7 +32,8 @@ suspend fun TelegramBot.sendDice(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
animationType: DiceAnimationType? = null,
|
animationType: DiceAnimationType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendDice(chat.id, animationType, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendDice(chat.id, animationType, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -17,6 +17,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
@ -25,6 +26,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
latitude,
|
latitude,
|
||||||
longitude,
|
longitude,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@ -38,6 +40,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(
|
) = sendLocation(
|
||||||
@ -45,6 +48,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
location.latitude,
|
location.latitude,
|
||||||
location.longitude,
|
location.longitude,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
)
|
)
|
||||||
@ -58,6 +62,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(
|
) = sendLocation(
|
||||||
@ -65,6 +70,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
latitude,
|
latitude,
|
||||||
longitude,
|
longitude,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
)
|
)
|
||||||
@ -77,6 +83,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(
|
) = sendLocation(
|
||||||
@ -84,6 +91,7 @@ suspend fun TelegramBot.sendLocation(
|
|||||||
location.latitude,
|
location.latitude,
|
||||||
location.longitude,
|
location.longitude,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
)
|
)
|
||||||
@ -97,9 +105,10 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(chatId, latitude, longitude, disableNotification, replyToMessageId, replyMarkup)
|
) = sendLocation(chatId, latitude, longitude, disableNotification, protectContent, replyToMessageId, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -109,9 +118,10 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(chatId, location.latitude, location.longitude, disableNotification, replyToMessageId, replyMarkup)
|
) = sendLocation(chatId, location.latitude, location.longitude, disableNotification, protectContent, replyToMessageId, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -122,9 +132,10 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(chat.id, latitude, longitude, disableNotification, replyToMessageId, replyMarkup)
|
) = sendLocation(chat.id, latitude, longitude, disableNotification, protectContent, replyToMessageId, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -134,6 +145,7 @@ suspend fun TelegramBot.sendStaticLocation(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
location: StaticLocation,
|
location: StaticLocation,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendLocation(chat.id, location.latitude, location.longitude, disableNotification, replyToMessageId, replyMarkup)
|
) = sendLocation(chat.id, location.latitude, location.longitude, disableNotification, protectContent, replyToMessageId, replyMarkup)
|
||||||
|
@ -19,11 +19,12 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
SendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,11 +37,12 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendMessage(
|
) = sendMessage(
|
||||||
chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -53,10 +55,11 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,10 +72,11 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendTextMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendTextMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -83,11 +87,12 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendTextMessage(chatId, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
SendTextMessage(chatId, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -99,11 +104,12 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendMessage(
|
) = sendMessage(
|
||||||
chatId, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -115,10 +121,11 @@ suspend fun TelegramBot.sendMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendMessage(chat.id, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendMessage(chat.id, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,7 +137,8 @@ suspend fun TelegramBot.sendTextMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendTextMessage(chat.id, entities, disableWebPagePreview, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendTextMessage(chat.id, entities, disableWebPagePreview, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -23,6 +23,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -38,6 +39,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -59,6 +61,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -73,6 +76,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -92,6 +96,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -106,6 +111,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -125,6 +131,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId: GooglePlaceId? = null,
|
googlePlaceId: GooglePlaceId? = null,
|
||||||
googlePlaceType: GooglePlaceType? = null,
|
googlePlaceType: GooglePlaceType? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -139,6 +146,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
googlePlaceId = googlePlaceId,
|
googlePlaceId = googlePlaceId,
|
||||||
googlePlaceType = googlePlaceType,
|
googlePlaceType = googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -152,6 +160,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -160,6 +169,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
chatId = chatId,
|
chatId = chatId,
|
||||||
venue = venue,
|
venue = venue,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -174,6 +184,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -181,6 +192,7 @@ suspend fun TelegramBot.sendVenue(
|
|||||||
chatId = chat.id,
|
chatId = chat.id,
|
||||||
venue = venue,
|
venue = venue,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
@ -16,12 +16,13 @@ suspend fun TelegramBot.sendGame(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendGame(
|
SendGame(
|
||||||
chatId, gameShortName, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, gameShortName, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -33,11 +34,12 @@ suspend fun TelegramBot.sendGame(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
gameShortName: String,
|
gameShortName: String,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendGame(
|
) = sendGame(
|
||||||
chat.id, gameShortName, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, gameShortName, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,11 +50,12 @@ suspend fun TelegramBot.sendGame(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
game: Game,
|
game: Game,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendGame(
|
) = sendGame(
|
||||||
chatId, game.title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, game.title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,9 +66,10 @@ suspend fun TelegramBot.sendGame(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
game: Game,
|
game: Game,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendGame(
|
) = sendGame(
|
||||||
chat.id, game.title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, game.title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
@ -25,6 +25,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -39,6 +40,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -58,11 +60,12 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(
|
) = sendAnimation(
|
||||||
chatId, animation.fileId, animation.thumb ?.fileId, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, animation.fileId, animation.thumb ?.fileId, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,10 +82,11 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(chat.id, animation, thumb, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(chat.id, animation, thumb, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -97,10 +101,11 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(chat.id, animation, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(chat.id, animation, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,6 +121,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -129,6 +135,7 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -147,11 +154,12 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(
|
) = sendAnimation(
|
||||||
chatId, animation.fileId, animation.thumb ?.fileId, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, animation.fileId, animation.thumb ?.fileId, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -167,10 +175,11 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(chat.id, animation, thumb, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(chat.id, animation, thumb, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -184,7 +193,8 @@ suspend fun TelegramBot.sendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAnimation(chat.id, animation, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAnimation(chat.id, animation, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -25,6 +25,7 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -39,6 +40,7 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
performer,
|
performer,
|
||||||
title,
|
title,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -59,10 +61,11 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -75,10 +78,11 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, text, parseMode, audio.duration, audio.performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, text, parseMode, audio.duration, audio.performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -91,10 +95,11 @@ suspend fun TelegramBot.sendAudio(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(chat.id, audio, text, parseMode, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(chat.id, audio, text, parseMode, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -110,6 +115,7 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -123,6 +129,7 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer,
|
performer,
|
||||||
title,
|
title,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -142,10 +149,11 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -157,10 +165,11 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, entities, audio.duration, audio.performer, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(chatId, audio.fileId, audio.thumb ?.fileId, entities, audio.duration, audio.performer, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -172,7 +181,8 @@ suspend inline fun TelegramBot.sendAudio(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
title: String? = audio.title,
|
title: String? = audio.title,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendAudio(chat.id, audio, entities, title, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendAudio(chat.id, audio, entities, title, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -22,6 +22,7 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@ -34,6 +35,7 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
text,
|
text,
|
||||||
parseMode,
|
parseMode,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup,
|
replyMarkup,
|
||||||
@ -52,11 +54,12 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(chat.id, document, thumb, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(chat.id, document, thumb, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -68,12 +71,13 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(
|
) = sendDocument(
|
||||||
chatId, document.fileId, document.thumb ?.fileId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection
|
chatId, document.fileId, document.thumb ?.fileId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,11 +90,12 @@ suspend fun TelegramBot.sendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(chat.id, document, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(chat.id, document, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -102,6 +107,7 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@ -113,6 +119,7 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb,
|
thumb,
|
||||||
entities,
|
entities,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup,
|
replyMarkup,
|
||||||
@ -130,11 +137,12 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(chat.id, document, thumb, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(chat.id, document, thumb, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -145,12 +153,13 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(
|
) = sendDocument(
|
||||||
chatId, document.fileId, document.thumb ?.fileId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection
|
chatId, document.fileId, document.thumb ?.fileId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,8 +171,9 @@ suspend inline fun TelegramBot.sendDocument(
|
|||||||
document: DocumentFile,
|
document: DocumentFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
) = sendDocument(chat.id, document, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
) = sendDocument(chat.id, document, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup, disableContentTypeDetection)
|
||||||
|
@ -17,11 +17,12 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberInputMedia>,
|
media: List<MediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendMediaGroup<MediaGroupContent>(
|
SendMediaGroup<MediaGroupContent>(
|
||||||
chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -33,10 +34,11 @@ suspend fun TelegramBot.sendMediaGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<MediaGroupMemberInputMedia>,
|
media: List<MediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendMediaGroup(
|
) = sendMediaGroup(
|
||||||
chat.id, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,11 +48,12 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberInputMedia>,
|
media: List<AudioMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendPlaylist(
|
SendPlaylist(
|
||||||
chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -61,10 +64,11 @@ suspend fun TelegramBot.sendPlaylist(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<AudioMediaGroupMemberInputMedia>,
|
media: List<AudioMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendPlaylist(
|
) = sendPlaylist(
|
||||||
chat.id, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -74,11 +78,12 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberInputMedia>,
|
media: List<DocumentMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendDocumentsGroup(
|
SendDocumentsGroup(
|
||||||
chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -89,10 +94,11 @@ suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<DocumentMediaGroupMemberInputMedia>,
|
media: List<DocumentMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendDocumentsGroup(
|
) = sendDocumentsGroup(
|
||||||
chat.id, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -102,11 +108,12 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberInputMedia>,
|
media: List<VisualMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendVisualMediaGroup(
|
SendVisualMediaGroup(
|
||||||
chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -117,8 +124,9 @@ suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
media: List<VisualMediaGroupMemberInputMedia>,
|
media: List<VisualMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = sendVisualMediaGroup(
|
) = sendVisualMediaGroup(
|
||||||
chat.id, media, disableNotification, replyToMessageId, allowSendingWithoutReply
|
chat.id, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
|
@ -22,6 +22,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -32,6 +33,7 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
text,
|
text,
|
||||||
parseMode,
|
parseMode,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -48,10 +50,11 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(chat.id, fileId, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(chat.id, fileId, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -63,10 +66,11 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -78,10 +82,11 @@ suspend fun TelegramBot.sendPhoto(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(chat.id, photo, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(chat.id, photo, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,6 +98,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -102,6 +108,7 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
fileId,
|
fileId,
|
||||||
entities,
|
entities,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -117,10 +124,11 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
fileId: InputFile,
|
fileId: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(chat.id, fileId, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(chat.id, fileId, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -131,10 +139,11 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(chatId, photo.biggest() ?.fileId ?: error("Photo content must not be empty"), entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -145,7 +154,8 @@ suspend inline fun TelegramBot.sendPhoto(
|
|||||||
photo: Photo,
|
photo: Photo,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendPhoto(chat.id, photo, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendPhoto(chat.id, photo, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -17,11 +17,12 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendSticker(chatId, sticker, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
SendSticker(chatId, sticker, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,10 +33,11 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendSticker(chat.id, sticker, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendSticker(chat.id, sticker, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -45,10 +47,11 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendSticker(chatId, sticker.fileId, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendSticker(chatId, sticker.fileId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -58,7 +61,8 @@ suspend fun TelegramBot.sendSticker(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
sticker: Sticker,
|
sticker: Sticker,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendSticker(chat, sticker.fileId, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendSticker(chat, sticker.fileId, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -25,6 +25,7 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -40,6 +41,7 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
height,
|
height,
|
||||||
null,
|
null,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -56,10 +58,11 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(chatId, video.fileId, video.thumb ?.fileId, text, parseMode, video.duration, video.width, video.height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(chatId, video.fileId, video.thumb ?.fileId, text, parseMode, video.duration, video.width, video.height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -75,10 +78,11 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(chat.id, video, thumb, text, parseMode, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(chat.id, video, thumb, text, parseMode, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,10 +95,11 @@ suspend fun TelegramBot.sendVideo(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(chat.id, video, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(chat.id, video, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -109,6 +114,7 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -123,6 +129,7 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
height,
|
height,
|
||||||
null,
|
null,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -138,10 +145,11 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(chatId, video.fileId, video.thumb ?.fileId, entities, video.duration, video.width, video.height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(chatId, video.fileId, video.thumb ?.fileId, entities, video.duration, video.width, video.height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -156,10 +164,11 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(chat.id, video, thumb, entities, duration, width, height, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(chat.id, video, thumb, entities, duration, width, height, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -171,7 +180,8 @@ suspend inline fun TelegramBot.sendVideo(
|
|||||||
video: VideoFile,
|
video: VideoFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideo(chat.id, video, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideo(chat.id, video, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -20,6 +20,7 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -31,6 +32,7 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration,
|
duration,
|
||||||
size,
|
size,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -45,11 +47,12 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideoNote(
|
) = sendVideoNote(
|
||||||
chatId, videoNote.fileId, videoNote.thumb ?.fileId, videoNote.duration, videoNote.width, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, videoNote.fileId, videoNote.thumb ?.fileId, videoNote.duration, videoNote.width, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,10 +66,11 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
size: Int? = null,
|
size: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideoNote(chat.id, videoNote, thumb, duration, size, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideoNote(chat.id, videoNote, thumb, duration, size, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -76,7 +80,8 @@ suspend fun TelegramBot.sendVideoNote(
|
|||||||
chat: Chat,
|
chat: Chat,
|
||||||
videoNote: VideoNoteFile,
|
videoNote: VideoNoteFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVideoNote(chat.id, videoNote, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVideoNote(chat.id, videoNote, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -23,6 +23,7 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -34,6 +35,7 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode,
|
parseMode,
|
||||||
duration,
|
duration,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -51,10 +53,11 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(chat.id, voice, text, parseMode, duration, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(chat.id, voice, text, parseMode, duration, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -66,11 +69,12 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(
|
) = sendVoice(
|
||||||
chatId, voice.fileId, text, parseMode, voice.duration, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, voice.fileId, text, parseMode, voice.duration, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,10 +87,11 @@ suspend fun TelegramBot.sendVoice(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(chat.id, voice, text, parseMode, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(chat.id, voice, text, parseMode, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -99,6 +104,7 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -109,6 +115,7 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities,
|
entities,
|
||||||
duration,
|
duration,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -125,10 +132,11 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(chat.id, voice, entities, duration, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(chat.id, voice, entities, duration, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -139,11 +147,12 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(
|
) = sendVoice(
|
||||||
chatId, voice.fileId, entities, voice.duration, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, voice.fileId, entities, voice.duration, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -154,7 +163,8 @@ suspend inline fun TelegramBot.sendVoice(
|
|||||||
voice: VoiceFile,
|
voice: VoiceFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendVoice(chat.id, voice, entities, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendVoice(chat.id, voice, entities, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -31,11 +31,12 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
SendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,7 +63,8 @@ suspend fun TelegramBot.sendInvoice(
|
|||||||
shouldSendEmailToProvider: Boolean = false,
|
shouldSendEmailToProvider: Boolean = false,
|
||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = 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, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
@ -24,12 +24,13 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendRegularPoll(
|
SendRegularPoll(
|
||||||
chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
/**
|
/**
|
||||||
@ -46,10 +47,11 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = sendRegularPoll(chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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
|
||||||
@ -64,11 +66,12 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendRegularPoll(
|
) = sendRegularPoll(
|
||||||
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,11 +88,12 @@ suspend fun TelegramBot.sendRegularPoll(
|
|||||||
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendRegularPoll(
|
) = sendRegularPoll(
|
||||||
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -108,12 +112,13 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -132,11 +137,12 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(
|
) = sendQuizPoll(
|
||||||
chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,11 +161,12 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(
|
) = sendQuizPoll(
|
||||||
chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -178,11 +185,12 @@ suspend fun TelegramBot.sendQuizPoll(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(
|
) = sendQuizPoll(
|
||||||
chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, question, options, correctOptionId, isAnonymous, isClosed, explanation, parseMode, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -200,12 +208,13 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = execute(
|
) = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -223,11 +232,12 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(
|
) = sendQuizPoll(
|
||||||
chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -245,11 +255,12 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(
|
) = sendQuizPoll(
|
||||||
chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -267,9 +278,10 @@ suspend inline fun TelegramBot.sendQuizPoll(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = sendQuizPoll(
|
) = sendQuizPoll(
|
||||||
chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chat.id, question, options, correctOptionId, isAnonymous, isClosed, entities, closeInfo, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
|
@ -2,20 +2,6 @@
|
|||||||
|
|
||||||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core)
|
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core)
|
||||||
|
|
||||||
- [TelegramBotAPI Core](#telegrambotapi-core)
|
|
||||||
* [What is it?](#what-is-it-)
|
|
||||||
* [Compatibility](#compatibility)
|
|
||||||
* [How to implement library?](#how-to-implement-library-)
|
|
||||||
+ [Maven](#maven)
|
|
||||||
+ [Gradle](#gradle)
|
|
||||||
* [How to work with library?](#how-to-work-with-library-)
|
|
||||||
+ [Types](#types)
|
|
||||||
+ [Requests](#requests)
|
|
||||||
+ [RequestsExecutor](#requestsexecutor)
|
|
||||||
+ [Passport](#passport)
|
|
||||||
|
|
||||||
<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>
|
|
||||||
|
|
||||||
## What is it?
|
## What is it?
|
||||||
|
|
||||||
Library for Object-Oriented and type-safe work with Telegram Bot API. Most part of some specific solves or unuseful
|
Library for Object-Oriented and type-safe work with Telegram Bot API. Most part of some specific solves or unuseful
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
package dev.inmo.tgbotapi.CommonAbstracts.types
|
||||||
|
|
||||||
|
interface ProtectContent {
|
||||||
|
val protectContent: Boolean
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package dev.inmo.tgbotapi.requests
|
package dev.inmo.tgbotapi.requests
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.types.MessageAction
|
import dev.inmo.tgbotapi.CommonAbstracts.types.MessageAction
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.types.ProtectContent
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
||||||
@ -18,8 +19,10 @@ data class ForwardMessage(
|
|||||||
@SerialName(messageIdField)
|
@SerialName(messageIdField)
|
||||||
override val messageId: MessageIdentifier,
|
override val messageId: MessageIdentifier,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
val disableNotification: Boolean = false
|
val disableNotification: Boolean = false,
|
||||||
): SimpleRequest<PossiblyForwardedMessage>, MessageAction {
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false
|
||||||
|
): SimpleRequest<PossiblyForwardedMessage>, MessageAction, ProtectContent {
|
||||||
override val chatId: ChatIdentifier
|
override val chatId: ChatIdentifier
|
||||||
get() = fromChatId
|
get() = fromChatId
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.requests.send
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
import dev.inmo.tgbotapi.CommonAbstracts.TextedOutput
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.types.MessageAction
|
import dev.inmo.tgbotapi.CommonAbstracts.types.MessageAction
|
||||||
|
import dev.inmo.tgbotapi.CommonAbstracts.types.ProtectContent
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
import dev.inmo.tgbotapi.requests.send.abstracts.ReplyingMarkupSendMessageRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
@ -20,10 +21,11 @@ fun CopyMessage(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = CopyMessage(fromChatId, toChatId, messageId, text, parseMode, null, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = CopyMessage(fromChatId, toChatId, messageId, text, parseMode, null, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
fun CopyMessage(
|
fun CopyMessage(
|
||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
@ -31,6 +33,7 @@ fun CopyMessage(
|
|||||||
messageId: MessageIdentifier,
|
messageId: MessageIdentifier,
|
||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -42,6 +45,7 @@ fun CopyMessage(
|
|||||||
null,
|
null,
|
||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -63,6 +67,8 @@ data class CopyMessage internal constructor(
|
|||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
@ -72,7 +78,8 @@ data class CopyMessage internal constructor(
|
|||||||
): SimpleRequest<MessageIdentifier>,
|
): SimpleRequest<MessageIdentifier>,
|
||||||
ReplyingMarkupSendMessageRequest<MessageIdentifier>,
|
ReplyingMarkupSendMessageRequest<MessageIdentifier>,
|
||||||
MessageAction,
|
MessageAction,
|
||||||
TextedOutput {
|
TextedOutput,
|
||||||
|
ProtectContent {
|
||||||
override val chatId: ChatIdentifier
|
override val chatId: ChatIdentifier
|
||||||
get() = fromChatId
|
get() = fromChatId
|
||||||
override val textSources: List<TextSource>? by lazy {
|
override val textSources: List<TextSource>? by lazy {
|
||||||
|
@ -24,6 +24,8 @@ data class SendContact(
|
|||||||
val lastName: String? = null,
|
val lastName: String? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
@ -37,6 +39,7 @@ data class SendContact(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
contact: Contact,
|
contact: Contact,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -46,6 +49,7 @@ data class SendContact(
|
|||||||
contact.firstName,
|
contact.firstName,
|
||||||
contact.lastName,
|
contact.lastName,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -61,6 +65,7 @@ data class SendContact(
|
|||||||
fun Contact.toRequest(
|
fun Contact.toRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -68,6 +73,7 @@ fun Contact.toRequest(
|
|||||||
chatId,
|
chatId,
|
||||||
this,
|
this,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -22,6 +22,8 @@ data class SendDice(
|
|||||||
val animationType: DiceAnimationType? = null,
|
val animationType: DiceAnimationType? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
@ -36,4 +38,4 @@ data class SendDice(
|
|||||||
|
|
||||||
override val resultDeserializer: DeserializationStrategy<ContentMessage<DiceContent>>
|
override val resultDeserializer: DeserializationStrategy<ContentMessage<DiceContent>>
|
||||||
get() = DiceContentMessageResultDeserializer
|
get() = DiceContentMessageResultDeserializer
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ fun SendLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -31,6 +32,7 @@ fun SendLocation(
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -41,10 +43,11 @@ fun SendStaticLocation(
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendLocation(chatId, latitude, longitude, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
) = SendLocation(chatId, latitude, longitude, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup)
|
||||||
|
|
||||||
fun SendLiveLocation(
|
fun SendLiveLocation(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
@ -55,6 +58,7 @@ fun SendLiveLocation(
|
|||||||
heading: Degrees? = null,
|
heading: Degrees? = null,
|
||||||
proximityAlertRadius: Meters? = null,
|
proximityAlertRadius: Meters? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -67,6 +71,7 @@ fun SendLiveLocation(
|
|||||||
heading,
|
heading,
|
||||||
proximityAlertRadius,
|
proximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -90,6 +95,8 @@ data class SendLocation internal constructor(
|
|||||||
override val proximityAlertRadius: Meters? = null,
|
override val proximityAlertRadius: Meters? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -24,6 +24,7 @@ fun SendTextMessage(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -34,6 +35,7 @@ fun SendTextMessage(
|
|||||||
null,
|
null,
|
||||||
disableWebPagePreview,
|
disableWebPagePreview,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -44,6 +46,7 @@ fun SendTextMessage(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableWebPagePreview: Boolean? = null,
|
disableWebPagePreview: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -54,6 +57,7 @@ fun SendTextMessage(
|
|||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
disableWebPagePreview,
|
disableWebPagePreview,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -73,6 +77,8 @@ data class SendTextMessage internal constructor(
|
|||||||
override val disableWebPagePreview: Boolean? = null,
|
override val disableWebPagePreview: Boolean? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -34,6 +34,8 @@ data class SendVenue(
|
|||||||
val googlePlaceType: GooglePlaceType? = null,
|
val googlePlaceType: GooglePlaceType? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
@ -49,6 +51,7 @@ data class SendVenue(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
venue: Venue,
|
venue: Venue,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -63,6 +66,7 @@ data class SendVenue(
|
|||||||
googlePlaceId = venue.googlePlaceId,
|
googlePlaceId = venue.googlePlaceId,
|
||||||
googlePlaceType = venue.googlePlaceType,
|
googlePlaceType = venue.googlePlaceType,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
replyToMessageId = replyToMessageId,
|
replyToMessageId = replyToMessageId,
|
||||||
allowSendingWithoutReply = allowSendingWithoutReply,
|
allowSendingWithoutReply = allowSendingWithoutReply,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@ -78,6 +82,7 @@ data class SendVenue(
|
|||||||
fun Venue.toRequest(
|
fun Venue.toRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -85,6 +90,7 @@ fun Venue.toRequest(
|
|||||||
chatId,
|
chatId,
|
||||||
this,
|
this,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package dev.inmo.tgbotapi.requests.send.abstracts
|
package dev.inmo.tgbotapi.requests.send.abstracts
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.types.DisableNotification
|
import dev.inmo.tgbotapi.CommonAbstracts.types.*
|
||||||
import dev.inmo.tgbotapi.CommonAbstracts.types.ReplyMessageId
|
|
||||||
|
|
||||||
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification
|
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification, ProtectContent
|
||||||
|
@ -20,6 +20,8 @@ data class SendGame (
|
|||||||
val gameShortName: String,
|
val gameShortName: String,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -27,6 +27,7 @@ fun SendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -47,6 +48,7 @@ fun SendAnimation(
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -71,6 +73,7 @@ fun SendAnimation(
|
|||||||
width: Int? = null,
|
width: Int? = null,
|
||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -91,6 +94,7 @@ fun SendAnimation(
|
|||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -131,6 +135,8 @@ data class SendAnimationData internal constructor(
|
|||||||
override val height: Int? = null,
|
override val height: Int? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -28,6 +28,7 @@ fun SendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -48,6 +49,7 @@ fun SendAudio(
|
|||||||
performer,
|
performer,
|
||||||
title,
|
title,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -72,6 +74,7 @@ fun SendAudio(
|
|||||||
performer: String? = null,
|
performer: String? = null,
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -92,6 +95,7 @@ fun SendAudio(
|
|||||||
performer,
|
performer,
|
||||||
title,
|
title,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -132,6 +136,8 @@ data class SendAudioData internal constructor(
|
|||||||
override val title: String? = null,
|
override val title: String? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -33,6 +33,7 @@ fun SendDocument(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@ -51,6 +52,7 @@ fun SendDocument(
|
|||||||
parseMode,
|
parseMode,
|
||||||
null,
|
null,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup,
|
replyMarkup,
|
||||||
@ -82,6 +84,7 @@ fun SendDocument(
|
|||||||
thumb: InputFile? = null,
|
thumb: InputFile? = null,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@ -100,6 +103,7 @@ fun SendDocument(
|
|||||||
null,
|
null,
|
||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup,
|
replyMarkup,
|
||||||
@ -144,6 +148,8 @@ data class SendDocumentData internal constructor(
|
|||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -25,6 +25,7 @@ fun <T : MediaGroupContent> SendMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<MediaGroupMemberInputMedia>,
|
media: List<MediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
): Request<List<MediaGroupMessage<T>>> {
|
): Request<List<MediaGroupMessage<T>>> {
|
||||||
@ -47,6 +48,7 @@ fun <T : MediaGroupContent> SendMediaGroup(
|
|||||||
chatId,
|
chatId,
|
||||||
media,
|
media,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply
|
allowSendingWithoutReply
|
||||||
)
|
)
|
||||||
@ -71,9 +73,10 @@ inline fun SendPlaylist(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<AudioMediaGroupMemberInputMedia>,
|
media: List<AudioMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = SendMediaGroup<AudioContent>(chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply)
|
) = SendMediaGroup<AudioContent>(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this method to be sure that you are correctly sending documents media group
|
* Use this method to be sure that you are correctly sending documents media group
|
||||||
@ -85,9 +88,10 @@ inline fun SendDocumentsGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<DocumentMediaGroupMemberInputMedia>,
|
media: List<DocumentMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = SendMediaGroup<DocumentContent>(chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply)
|
) = SendMediaGroup<DocumentContent>(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this method to be sure that you are correctly sending visual media group
|
* Use this method to be sure that you are correctly sending visual media group
|
||||||
@ -100,9 +104,10 @@ inline fun SendVisualMediaGroup(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
media: List<VisualMediaGroupMemberInputMedia>,
|
media: List<VisualMediaGroupMemberInputMedia>,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null
|
allowSendingWithoutReply: Boolean? = null
|
||||||
) = SendMediaGroup<VisualMediaGroupContent>(chatId, media, disableNotification, replyToMessageId, allowSendingWithoutReply)
|
) = SendMediaGroup<VisualMediaGroupContent>(chatId, media, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply)
|
||||||
|
|
||||||
private val messagesListSerializer: KSerializer<List<MediaGroupMessage<MediaGroupContent>>>
|
private val messagesListSerializer: KSerializer<List<MediaGroupMessage<MediaGroupContent>>>
|
||||||
= ListSerializer(TelegramBotAPIMessageDeserializeOnlySerializerClass())
|
= ListSerializer(TelegramBotAPIMessageDeserializeOnlySerializerClass())
|
||||||
@ -114,6 +119,8 @@ data class SendMediaGroupData internal constructor(
|
|||||||
val media: List<MediaGroupMemberInputMedia> = emptyList(),
|
val media: List<MediaGroupMemberInputMedia> = emptyList(),
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -22,6 +22,7 @@ fun SendPhoto(
|
|||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -33,6 +34,7 @@ fun SendPhoto(
|
|||||||
parseMode,
|
parseMode,
|
||||||
null,
|
null,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -50,6 +52,7 @@ fun SendPhoto(
|
|||||||
photo: InputFile,
|
photo: InputFile,
|
||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -61,6 +64,7 @@ fun SendPhoto(
|
|||||||
null,
|
null,
|
||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -90,6 +94,8 @@ data class SendPhotoData internal constructor(
|
|||||||
private val rawEntities: List<RawMessageEntity>? = null,
|
private val rawEntities: List<RawMessageEntity>? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -16,6 +16,7 @@ fun SendSticker(
|
|||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
sticker: InputFile,
|
sticker: InputFile,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -23,6 +24,7 @@ fun SendSticker(
|
|||||||
chatId,
|
chatId,
|
||||||
sticker as? FileId,
|
sticker as? FileId,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -44,6 +46,8 @@ data class SendStickerByFileId internal constructor(
|
|||||||
val sticker: FileId? = null,
|
val sticker: FileId? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -28,6 +28,7 @@ fun SendVideo(
|
|||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
supportStreaming: Boolean? = null,
|
supportStreaming: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -49,6 +50,7 @@ fun SendVideo(
|
|||||||
height,
|
height,
|
||||||
supportStreaming,
|
supportStreaming,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -74,6 +76,7 @@ fun SendVideo(
|
|||||||
height: Int? = null,
|
height: Int? = null,
|
||||||
supportStreaming: Boolean? = null,
|
supportStreaming: Boolean? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -95,6 +98,7 @@ fun SendVideo(
|
|||||||
height,
|
height,
|
||||||
supportStreaming,
|
supportStreaming,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -137,6 +141,8 @@ data class SendVideoData internal constructor(
|
|||||||
val supportStreaming: Boolean? = null,
|
val supportStreaming: Boolean? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -18,6 +18,7 @@ fun SendVideoNote(
|
|||||||
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)
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -34,6 +35,7 @@ fun SendVideoNote(
|
|||||||
duration,
|
duration,
|
||||||
size,
|
size,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -66,6 +68,8 @@ data class SendVideoNoteData internal constructor(
|
|||||||
override val width: Int? = null,
|
override val width: Int? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -24,6 +24,7 @@ fun SendVoice(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -39,6 +40,7 @@ fun SendVoice(
|
|||||||
null,
|
null,
|
||||||
duration,
|
duration,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -60,6 +62,7 @@ fun SendVoice(
|
|||||||
entities: TextSourcesList,
|
entities: TextSourcesList,
|
||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -75,6 +78,7 @@ fun SendVoice(
|
|||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
duration,
|
duration,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -109,6 +113,8 @@ data class SendVoiceData internal constructor(
|
|||||||
override val duration: Long? = null,
|
override val duration: Long? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -60,6 +60,8 @@ data class SendInvoice(
|
|||||||
override val priceDependOnShipAddress: Boolean = false,
|
override val priceDependOnShipAddress: Boolean = false,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -47,6 +47,7 @@ fun SendPoll(
|
|||||||
isAnonymous: Boolean = true,
|
isAnonymous: Boolean = true,
|
||||||
isClosed: Boolean = false,
|
isClosed: Boolean = false,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -69,6 +70,7 @@ fun SendPoll(
|
|||||||
fun Poll.createRequest(
|
fun Poll.createRequest(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -82,6 +84,7 @@ fun Poll.createRequest(
|
|||||||
allowMultipleAnswers,
|
allowMultipleAnswers,
|
||||||
scheduledCloseInfo,
|
scheduledCloseInfo,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -97,6 +100,7 @@ fun Poll.createRequest(
|
|||||||
textSources,
|
textSources,
|
||||||
scheduledCloseInfo,
|
scheduledCloseInfo,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -110,6 +114,7 @@ fun Poll.createRequest(
|
|||||||
false,
|
false,
|
||||||
scheduledCloseInfo,
|
scheduledCloseInfo,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -123,6 +128,7 @@ fun Poll.createRequest(
|
|||||||
false,
|
false,
|
||||||
scheduledCloseInfo,
|
scheduledCloseInfo,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -187,6 +193,8 @@ data class SendRegularPoll(
|
|||||||
override val closeDate: LongSeconds?,
|
override val closeDate: LongSeconds?,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
@ -213,6 +221,7 @@ fun SendRegularPoll(
|
|||||||
allowMultipleAnswers: Boolean = false,
|
allowMultipleAnswers: Boolean = false,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -226,6 +235,7 @@ fun SendRegularPoll(
|
|||||||
(closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
(closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
||||||
(closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
(closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -242,6 +252,7 @@ fun SendQuizPoll(
|
|||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -257,6 +268,7 @@ fun SendQuizPoll(
|
|||||||
null,
|
null,
|
||||||
closeInfo,
|
closeInfo,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -272,6 +284,7 @@ fun SendQuizPoll(
|
|||||||
entities: List<TextSource>,
|
entities: List<TextSource>,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -287,6 +300,7 @@ fun SendQuizPoll(
|
|||||||
entities.toRawMessageEntities(),
|
entities.toRawMessageEntities(),
|
||||||
closeInfo,
|
closeInfo,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -304,6 +318,7 @@ internal fun SendQuizPoll(
|
|||||||
rawEntities: List<RawMessageEntity>? = null,
|
rawEntities: List<RawMessageEntity>? = null,
|
||||||
closeInfo: ScheduledCloseInfo? = null,
|
closeInfo: ScheduledCloseInfo? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@ -320,6 +335,7 @@ internal fun SendQuizPoll(
|
|||||||
(closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
(closeInfo as? ApproximateScheduledCloseInfo) ?.openPeriod,
|
||||||
(closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
(closeInfo as? ExactScheduledCloseInfo) ?.closeDate,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -351,6 +367,8 @@ data class SendQuizPoll internal constructor(
|
|||||||
override val closeDate: LongSeconds? = null,
|
override val closeDate: LongSeconds? = null,
|
||||||
@SerialName(disableNotificationField)
|
@SerialName(disableNotificationField)
|
||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
|
@SerialName(protectContentField)
|
||||||
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(replyToMessageIdField)
|
@SerialName(replyToMessageIdField)
|
||||||
override val replyToMessageId: MessageIdentifier? = null,
|
override val replyToMessageId: MessageIdentifier? = null,
|
||||||
@SerialName(allowSendingWithoutReplyField)
|
@SerialName(allowSendingWithoutReplyField)
|
||||||
|
@ -102,6 +102,7 @@ const val updateIdField = "update_id"
|
|||||||
const val fromChatIdField = "from_chat_id"
|
const val fromChatIdField = "from_chat_id"
|
||||||
const val disableWebPagePreviewField = "disable_web_page_preview"
|
const val disableWebPagePreviewField = "disable_web_page_preview"
|
||||||
const val disableNotificationField = "disable_notification"
|
const val disableNotificationField = "disable_notification"
|
||||||
|
const val protectContentField = "protect_content"
|
||||||
const val replyToMessageIdField = "reply_to_message_id"
|
const val replyToMessageIdField = "reply_to_message_id"
|
||||||
const val allowSendingWithoutReplyField = "allow_sending_without_reply"
|
const val allowSendingWithoutReplyField = "allow_sending_without_reply"
|
||||||
const val replyMarkupField = "reply_markup"
|
const val replyMarkupField = "reply_markup"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.InlineQueryResultGif
|
||||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.inlineQueryResultGifType
|
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.results.gif.inlineQueryResultGifType
|
||||||
@ -57,6 +58,37 @@ fun InlineQueryResultGifImpl(
|
|||||||
inputMessageContent
|
inputMessageContent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun InlineQueryResultGifImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
gifFile: FileId,
|
||||||
|
thumbUrl: String,
|
||||||
|
thumbMimeType: MimeType? = null,
|
||||||
|
width: Int? = null,
|
||||||
|
height: Int? = null,
|
||||||
|
duration: Int? = null,
|
||||||
|
title: String? = null,
|
||||||
|
text: String? = null,
|
||||||
|
parseMode: ParseMode? = null,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultGifImpl(id, gifFile.fileId, thumbUrl, thumbMimeType, width, height, duration, title, text, parseMode, replyMarkup, inputMessageContent)
|
||||||
|
|
||||||
|
fun InlineQueryResultGifImpl(
|
||||||
|
id: InlineQueryIdentifier,
|
||||||
|
gifFile: FileId,
|
||||||
|
thumbUrl: String,
|
||||||
|
thumbMimeType: MimeType? = null,
|
||||||
|
width: Int? = null,
|
||||||
|
height: Int? = null,
|
||||||
|
duration: Int? = null,
|
||||||
|
title: String? = null,
|
||||||
|
entities: TextSourcesList,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null,
|
||||||
|
inputMessageContent: InputMessageContent? = null
|
||||||
|
) = InlineQueryResultGifImpl(
|
||||||
|
id, gifFile.fileId, thumbUrl, thumbMimeType, width, height, duration, title, entities, replyMarkup, inputMessageContent
|
||||||
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
data class InlineQueryResultGifImpl internal constructor(
|
data class InlineQueryResultGifImpl internal constructor(
|
||||||
@SerialName(idField)
|
@SerialName(idField)
|
||||||
|
@ -11,7 +11,7 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object InlineQueryResultSerializer : KSerializer<InlineQueryResult> {
|
object InlineQueryResultSerializer : KSerializer<InlineQueryResult> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor(InlineQueryResult::class.toString(), PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(InlineQueryResult::class.toString(), PolymorphicKind.OPEN)
|
||||||
override fun serialize(encoder: Encoder, value: InlineQueryResult) {
|
override fun serialize(encoder: Encoder, value: InlineQueryResult) {
|
||||||
when(value) {
|
when(value) {
|
||||||
|
@ -10,7 +10,7 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object InputMessageContentSerializer : KSerializer<InputMessageContent> {
|
object InputMessageContentSerializer : KSerializer<InputMessageContent> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor(InputMessageContent::class.toString(), PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(InputMessageContent::class.toString(), PolymorphicKind.OPEN)
|
||||||
override fun serialize(encoder: Encoder, value: InputMessageContent) {
|
override fun serialize(encoder: Encoder, value: InputMessageContent) {
|
||||||
when (value) {
|
when (value) {
|
||||||
|
@ -9,7 +9,7 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object InputMediaSerializer : KSerializer<InputMedia> {
|
object InputMediaSerializer : KSerializer<InputMedia> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor(InputMedia::class.toString(), PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(InputMedia::class.toString(), PolymorphicKind.OPEN)
|
||||||
override fun serialize(encoder: Encoder, value: InputMedia) {
|
override fun serialize(encoder: Encoder, value: InputMedia) {
|
||||||
when (value) {
|
when (value) {
|
||||||
|
@ -12,7 +12,7 @@ import kotlinx.serialization.json.*
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object MediaGroupMemberInputMediaSerializer : KSerializer<MediaGroupMemberInputMedia> {
|
object MediaGroupMemberInputMediaSerializer : KSerializer<MediaGroupMemberInputMedia> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor(MediaGroupMemberInputMedia::class.toString(), PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(MediaGroupMemberInputMedia::class.toString(), PolymorphicKind.OPEN)
|
||||||
override fun serialize(encoder: Encoder, value: MediaGroupMemberInputMedia) {
|
override fun serialize(encoder: Encoder, value: MediaGroupMemberInputMedia) {
|
||||||
when (value) {
|
when (value) {
|
||||||
|
@ -49,6 +49,7 @@ internal fun RawMessageEntity.asTextSource(
|
|||||||
)
|
)
|
||||||
"underline" -> UnderlineTextSource(sourceSubstring, subPartsWithRegulars)
|
"underline" -> UnderlineTextSource(sourceSubstring, subPartsWithRegulars)
|
||||||
"strikethrough" -> StrikethroughTextSource(sourceSubstring, subPartsWithRegulars)
|
"strikethrough" -> StrikethroughTextSource(sourceSubstring, subPartsWithRegulars)
|
||||||
|
"spoiler" -> SpoilerTextSource(sourceSubstring, subPartsWithRegulars)
|
||||||
else -> RegularTextSource(sourceSubstring)
|
else -> RegularTextSource(sourceSubstring)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,6 +159,7 @@ internal fun TextSource.toRawMessageEntities(offset: Int = 0): List<RawMessageEn
|
|||||||
is TextMentionTextSource -> RawMessageEntity("text_mention", offset, length, user = user)
|
is TextMentionTextSource -> RawMessageEntity("text_mention", offset, length, user = user)
|
||||||
is UnderlineTextSource -> RawMessageEntity("underline", offset, length)
|
is UnderlineTextSource -> RawMessageEntity("underline", offset, length)
|
||||||
is StrikethroughTextSource -> RawMessageEntity("strikethrough", offset, length)
|
is StrikethroughTextSource -> RawMessageEntity("strikethrough", offset, length)
|
||||||
|
is SpoilerTextSource -> RawMessageEntity("spoiler", offset, length)
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
) + if (this is MultilevelTextSource) {
|
) + if (this is MultilevelTextSource) {
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.MessageEntity.textsources
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
|
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||||
|
import dev.inmo.tgbotapi.utils.internal.*
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see italic
|
||||||
|
*/
|
||||||
|
@Serializable
|
||||||
|
data class SpoilerTextSource @RiskFeature(DirectInvocationOfTextSourceConstructor) constructor (
|
||||||
|
override val source: String,
|
||||||
|
override val subsources: TextSourcesList
|
||||||
|
) : MultilevelTextSource {
|
||||||
|
override val markdown: String by lazy { source.spoilerMarkdown() }
|
||||||
|
override val markdownV2: String by lazy { spoilerMarkdownV2() }
|
||||||
|
override val html: String by lazy { spoilerHTML() }
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
|
inline fun spoiler(parts: TextSourcesList) = SpoilerTextSource(parts.makeString(), parts)
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
|
inline fun spoiler(vararg parts: TextSource) = spoiler(parts.toList())
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
|
inline fun spoiler(text: String) = spoiler(regular(text))
|
||||||
|
|
@ -20,6 +20,7 @@ private val baseSerializers: Map<String, KSerializer<out TextSource>> = mapOf(
|
|||||||
"text_mention" to TextMentionTextSource.serializer(),
|
"text_mention" to TextMentionTextSource.serializer(),
|
||||||
"hashtag" to HashTagTextSource.serializer(),
|
"hashtag" to HashTagTextSource.serializer(),
|
||||||
"cashtag" to CashTagTextSource.serializer(),
|
"cashtag" to CashTagTextSource.serializer(),
|
||||||
|
"spoiler" to SpoilerTextSource.serializer(),
|
||||||
)
|
)
|
||||||
|
|
||||||
object TextSourceSerializer : TypedSerializer<TextSource>(TextSource::class, baseSerializers) {
|
object TextSourceSerializer : TypedSerializer<TextSource>(TextSource::class, baseSerializers) {
|
||||||
|
@ -13,7 +13,7 @@ import kotlinx.serialization.json.JsonObject
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object InlineKeyboardButtonSerializer : KSerializer<InlineKeyboardButton> {
|
object InlineKeyboardButtonSerializer : KSerializer<InlineKeyboardButton> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
||||||
"dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton",
|
"dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton",
|
||||||
PolymorphicKind.SEALED
|
PolymorphicKind.SEALED
|
||||||
|
@ -9,7 +9,7 @@ import kotlinx.serialization.encoding.Encoder
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object KeyboardMarkupSerializer : KSerializer<KeyboardMarkup> {
|
object KeyboardMarkupSerializer : KSerializer<KeyboardMarkup> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
override val descriptor: SerialDescriptor = buildSerialDescriptor(
|
||||||
KeyboardMarkup::class.toString(),
|
KeyboardMarkup::class.toString(),
|
||||||
PolymorphicKind.OPEN
|
PolymorphicKind.OPEN
|
||||||
|
@ -55,7 +55,7 @@ object ChatTypeSerializer : KSerializer<ChatType> {
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object PreviewChatSerializer : KSerializer<Chat> {
|
object PreviewChatSerializer : KSerializer<Chat> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor("PreviewChatSerializer", PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor("PreviewChatSerializer", PolymorphicKind.OPEN)
|
||||||
|
|
||||||
override fun deserialize(decoder: Decoder): Chat {
|
override fun deserialize(decoder: Decoder): Chat {
|
||||||
@ -88,7 +88,7 @@ object PreviewChatSerializer : KSerializer<Chat> {
|
|||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
object ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
object ExtendedChatSerializer : KSerializer<ExtendedChat> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor("PreviewChatSerializer", PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor("PreviewChatSerializer", PolymorphicKind.OPEN)
|
||||||
|
|
||||||
override fun deserialize(decoder: Decoder): ExtendedChat {
|
override fun deserialize(decoder: Decoder): ExtendedChat {
|
||||||
|
@ -13,24 +13,10 @@ data class ChannelContentMessageImpl<T: MessageContent>(
|
|||||||
override val content: T,
|
override val content: T,
|
||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?,
|
override val replyMarkup: InlineKeyboardMarkup?,
|
||||||
override val senderBot: CommonBot?,
|
override val senderBot: CommonBot?,
|
||||||
override val authorSignature: AuthorSignature?
|
override val authorSignature: AuthorSignature?
|
||||||
) : ChannelContentMessage<T> {
|
) : ChannelContentMessage<T>
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
chat: ChannelChat,
|
|
||||||
content: T,
|
|
||||||
date: DateTime,
|
|
||||||
editDate: DateTime?,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?,
|
|
||||||
senderBot: CommonBot?,
|
|
||||||
authorSignature: AuthorSignature?
|
|
||||||
) : this(messageId, chat, content, date, editDate, true, forwardInfo, replyTo, replyMarkup, senderBot, authorSignature)
|
|
||||||
}
|
|
||||||
|
@ -16,21 +16,8 @@ data class ChannelMediaGroupMessage<T : MediaGroupContent>(
|
|||||||
override val mediaGroupId: MediaGroupIdentifier,
|
override val mediaGroupId: MediaGroupIdentifier,
|
||||||
override val content: T,
|
override val content: T,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?
|
override val replyMarkup: InlineKeyboardMarkup?
|
||||||
) : MediaGroupMessage<T> {
|
) : MediaGroupMessage<T>
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
chat: Chat,
|
|
||||||
date: DateTime,
|
|
||||||
mediaGroupId: MediaGroupIdentifier,
|
|
||||||
content: T,
|
|
||||||
editDate: DateTime?,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?
|
|
||||||
) : this(messageId, chat, date, mediaGroupId, content, editDate, true, forwardInfo, replyTo, replyMarkup)
|
|
||||||
}
|
|
||||||
|
@ -13,7 +13,7 @@ private const val seconds7Days: Seconds = seconds24Hours * 7
|
|||||||
data class MessageAutoDeleteTimerChanged(
|
data class MessageAutoDeleteTimerChanged(
|
||||||
@SerialName(messageAutoDeleteTimeField)
|
@SerialName(messageAutoDeleteTimeField)
|
||||||
val newAutoDeleteTime: Seconds // TODO:: check that it is seconds
|
val newAutoDeleteTime: Seconds // TODO:: check that it is seconds
|
||||||
) : ChannelEvent, GroupEvent, SupergroupEvent
|
) : ChannelEvent, GroupEvent, SupergroupEvent, PrivateEvent
|
||||||
|
|
||||||
val MessageAutoDeleteTimerChanged.isOff
|
val MessageAutoDeleteTimerChanged.isOff
|
||||||
get() = newAutoDeleteTime == 0
|
get() = newAutoDeleteTime == 0
|
||||||
|
@ -15,22 +15,8 @@ data class CommonMediaGroupMessage<T : MediaGroupContent>(
|
|||||||
override val mediaGroupId: MediaGroupIdentifier,
|
override val mediaGroupId: MediaGroupIdentifier,
|
||||||
override val content: T,
|
override val content: T,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?
|
override val replyMarkup: InlineKeyboardMarkup?
|
||||||
) : MediaGroupMessage<T>, FromUserMessage {
|
) : MediaGroupMessage<T>, FromUserMessage
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
from: User,
|
|
||||||
chat: Chat,
|
|
||||||
date: DateTime,
|
|
||||||
mediaGroupId: MediaGroupIdentifier,
|
|
||||||
content: T,
|
|
||||||
editDate: DateTime?,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?
|
|
||||||
) : this(messageId, from, chat, date, mediaGroupId, content, editDate, true, forwardInfo, replyTo, replyMarkup)
|
|
||||||
}
|
|
||||||
|
@ -15,31 +15,13 @@ data class ConnectedFromChannelGroupContentMessageImpl<T : MessageContent>(
|
|||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?,
|
override val replyMarkup: InlineKeyboardMarkup?,
|
||||||
override val content: T,
|
override val content: T,
|
||||||
override val senderBot: CommonBot?,
|
override val senderBot: CommonBot?,
|
||||||
override val authorSignature: AuthorSignature?
|
override val authorSignature: AuthorSignature?
|
||||||
) : ConnectedFromChannelGroupContentMessage<T> {
|
) : ConnectedFromChannelGroupContentMessage<T>
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
chat: GroupChat,
|
|
||||||
channel: ChannelChat,
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
date: DateTime,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
editDate: DateTime?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?,
|
|
||||||
content: T,
|
|
||||||
senderBot: CommonBot?,
|
|
||||||
authorSignature: AuthorSignature?
|
|
||||||
) : this(chat, channel, messageId, date, forwardInfo, editDate, true, replyTo, replyMarkup, content, senderBot, authorSignature)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated("Renamed", ReplaceWith("ConnectedFromChannelGroupContentMessageImpl", "dev.inmo.tgbotapi.types.message.ConnectedFromChannelGroupContentMessageImpl"))
|
|
||||||
typealias FromChannelGroupContentMessageImpl<T> = ConnectedFromChannelGroupContentMessageImpl<T>
|
|
||||||
|
|
||||||
data class UnconnectedFromChannelGroupContentMessageImpl<T: MessageContent>(
|
data class UnconnectedFromChannelGroupContentMessageImpl<T: MessageContent>(
|
||||||
override val chat: GroupChat,
|
override val chat: GroupChat,
|
||||||
@ -48,7 +30,7 @@ data class UnconnectedFromChannelGroupContentMessageImpl<T: MessageContent>(
|
|||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?,
|
override val replyMarkup: InlineKeyboardMarkup?,
|
||||||
override val content: T,
|
override val content: T,
|
||||||
@ -62,27 +44,13 @@ data class AnonymousGroupContentMessageImpl<T : MessageContent>(
|
|||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?,
|
override val replyMarkup: InlineKeyboardMarkup?,
|
||||||
override val content: T,
|
override val content: T,
|
||||||
override val senderBot: CommonBot?,
|
override val senderBot: CommonBot?,
|
||||||
override val authorSignature: AuthorSignature?
|
override val authorSignature: AuthorSignature?
|
||||||
) : AnonymousGroupContentMessage<T> {
|
) : AnonymousGroupContentMessage<T>
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
chat: GroupChat,
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
date: DateTime,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
editDate: DateTime?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?,
|
|
||||||
content: T,
|
|
||||||
senderBot: CommonBot?,
|
|
||||||
authorSignature: AuthorSignature?
|
|
||||||
) : this(chat, messageId, date, forwardInfo, editDate, true, replyTo, replyMarkup, content, senderBot, authorSignature)
|
|
||||||
}
|
|
||||||
|
|
||||||
data class CommonGroupContentMessageImpl<T : MessageContent>(
|
data class CommonGroupContentMessageImpl<T : MessageContent>(
|
||||||
override val chat: GroupChat,
|
override val chat: GroupChat,
|
||||||
@ -91,23 +59,9 @@ data class CommonGroupContentMessageImpl<T : MessageContent>(
|
|||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?,
|
override val replyMarkup: InlineKeyboardMarkup?,
|
||||||
override val content: T,
|
override val content: T,
|
||||||
override val senderBot: CommonBot?
|
override val senderBot: CommonBot?
|
||||||
) : CommonGroupContentMessage<T> {
|
) : CommonGroupContentMessage<T>
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
chat: GroupChat,
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
from: User,
|
|
||||||
date: DateTime,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
editDate: DateTime?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?,
|
|
||||||
content: T,
|
|
||||||
senderBot: CommonBot?
|
|
||||||
) : this(chat, messageId, from, date, forwardInfo, editDate, true, replyTo, replyMarkup, content, senderBot)
|
|
||||||
}
|
|
||||||
|
@ -15,23 +15,9 @@ data class PrivateContentMessageImpl<T: MessageContent>(
|
|||||||
override val content: T,
|
override val content: T,
|
||||||
override val date: DateTime,
|
override val date: DateTime,
|
||||||
override val editDate: DateTime?,
|
override val editDate: DateTime?,
|
||||||
override val forwardable: Boolean,
|
override val hasProtectedContent: Boolean,
|
||||||
override val forwardInfo: ForwardInfo?,
|
override val forwardInfo: ForwardInfo?,
|
||||||
override val replyTo: Message?,
|
override val replyTo: Message?,
|
||||||
override val replyMarkup: InlineKeyboardMarkup?,
|
override val replyMarkup: InlineKeyboardMarkup?,
|
||||||
override val senderBot: CommonBot?
|
override val senderBot: CommonBot?
|
||||||
) : PrivateContentMessage<T> {
|
) : PrivateContentMessage<T>
|
||||||
@Deprecated("Use the constructor with forwardable field")
|
|
||||||
constructor(
|
|
||||||
messageId: MessageIdentifier,
|
|
||||||
from: User,
|
|
||||||
chat: Chat,
|
|
||||||
content: T,
|
|
||||||
date: DateTime,
|
|
||||||
editDate: DateTime?,
|
|
||||||
forwardInfo: ForwardInfo?,
|
|
||||||
replyTo: Message?,
|
|
||||||
replyMarkup: InlineKeyboardMarkup?,
|
|
||||||
senderBot: CommonBot?
|
|
||||||
) : this(messageId, from, chat, content, date, editDate, true, forwardInfo, replyTo, replyMarkup, senderBot)
|
|
||||||
}
|
|
@ -254,7 +254,7 @@ internal data class RawMessage(
|
|||||||
it,
|
it,
|
||||||
checkedContent,
|
checkedContent,
|
||||||
edit_date?.asDate,
|
edit_date?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
forwarded,
|
forwarded,
|
||||||
reply_to_message?.asMessage,
|
reply_to_message?.asMessage,
|
||||||
reply_markup
|
reply_markup
|
||||||
@ -267,7 +267,7 @@ internal data class RawMessage(
|
|||||||
it,
|
it,
|
||||||
checkedContent,
|
checkedContent,
|
||||||
edit_date?.asDate,
|
edit_date?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
forwarded,
|
forwarded,
|
||||||
reply_to_message?.asMessage,
|
reply_to_message?.asMessage,
|
||||||
reply_markup
|
reply_markup
|
||||||
@ -281,7 +281,7 @@ internal data class RawMessage(
|
|||||||
content,
|
content,
|
||||||
date.asDate,
|
date.asDate,
|
||||||
edit_date?.asDate,
|
edit_date?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
forwarded,
|
forwarded,
|
||||||
reply_to_message?.asMessage,
|
reply_to_message?.asMessage,
|
||||||
reply_markup,
|
reply_markup,
|
||||||
@ -297,7 +297,7 @@ internal data class RawMessage(
|
|||||||
date.asDate,
|
date.asDate,
|
||||||
forwarded,
|
forwarded,
|
||||||
edit_date ?.asDate,
|
edit_date ?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
reply_to_message ?.asMessage,
|
reply_to_message ?.asMessage,
|
||||||
reply_markup,
|
reply_markup,
|
||||||
content,
|
content,
|
||||||
@ -312,7 +312,7 @@ internal data class RawMessage(
|
|||||||
date.asDate,
|
date.asDate,
|
||||||
forwarded,
|
forwarded,
|
||||||
edit_date ?.asDate,
|
edit_date ?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
reply_to_message ?.asMessage,
|
reply_to_message ?.asMessage,
|
||||||
reply_markup,
|
reply_markup,
|
||||||
content,
|
content,
|
||||||
@ -326,7 +326,7 @@ internal data class RawMessage(
|
|||||||
date.asDate,
|
date.asDate,
|
||||||
forwarded,
|
forwarded,
|
||||||
edit_date ?.asDate,
|
edit_date ?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
reply_to_message ?.asMessage,
|
reply_to_message ?.asMessage,
|
||||||
reply_markup,
|
reply_markup,
|
||||||
content,
|
content,
|
||||||
@ -340,7 +340,7 @@ internal data class RawMessage(
|
|||||||
date.asDate,
|
date.asDate,
|
||||||
forwarded,
|
forwarded,
|
||||||
edit_date ?.asDate,
|
edit_date ?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
reply_to_message ?.asMessage,
|
reply_to_message ?.asMessage,
|
||||||
reply_markup,
|
reply_markup,
|
||||||
content,
|
content,
|
||||||
@ -357,7 +357,7 @@ internal data class RawMessage(
|
|||||||
content,
|
content,
|
||||||
date.asDate,
|
date.asDate,
|
||||||
edit_date?.asDate,
|
edit_date?.asDate,
|
||||||
has_protected_content != true,
|
has_protected_content == true,
|
||||||
forwarded,
|
forwarded,
|
||||||
reply_to_message?.asMessage,
|
reply_to_message?.asMessage,
|
||||||
reply_markup,
|
reply_markup,
|
||||||
|
@ -3,9 +3,9 @@ package dev.inmo.tgbotapi.types.message.abstracts
|
|||||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
|
import dev.inmo.tgbotapi.types.message.content.abstracts.MessageContent
|
||||||
|
|
||||||
interface ContentMessage<T: MessageContent>: Message {
|
interface ContentMessage<T: MessageContent>: Message {
|
||||||
val forwardable: Boolean
|
val hasProtectedContent: Boolean
|
||||||
val content: T
|
val content: T
|
||||||
|
|
||||||
val hasProtectedContent: Boolean
|
val forwardable: Boolean
|
||||||
get() = !forwardable
|
get() = !hasProtectedContent
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ data class UnknownMessageType(
|
|||||||
) : Message
|
) : Message
|
||||||
|
|
||||||
internal class TelegramBotAPIMessageDeserializationStrategyClass<T> : DeserializationStrategy<T> {
|
internal class TelegramBotAPIMessageDeserializationStrategyClass<T> : DeserializationStrategy<T> {
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor = buildSerialDescriptor("TelegramBotAPIMessageSerializer", PolymorphicKind.OPEN)
|
override val descriptor: SerialDescriptor = buildSerialDescriptor("TelegramBotAPIMessageSerializer", PolymorphicKind.OPEN)
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
@ -34,7 +34,7 @@ internal class TelegramBotAPIMessageDeserializationStrategyClass<T> : Deserializ
|
|||||||
|
|
||||||
internal class TelegramBotAPIMessageDeserializeOnlySerializerClass<T : Message> : KSerializer<T> {
|
internal class TelegramBotAPIMessageDeserializeOnlySerializerClass<T : Message> : KSerializer<T> {
|
||||||
private val deserializer = TelegramBotAPIMessageDeserializationStrategyClass<T>()
|
private val deserializer = TelegramBotAPIMessageDeserializationStrategyClass<T>()
|
||||||
@InternalSerializationApi
|
@OptIn(InternalSerializationApi::class)
|
||||||
override val descriptor: SerialDescriptor
|
override val descriptor: SerialDescriptor
|
||||||
get() = deserializer.descriptor
|
get() = deserializer.descriptor
|
||||||
|
|
||||||
|
@ -15,10 +15,11 @@ data class ContactContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
): Request<ContentMessage<ContactContent>> = SendContact(
|
): Request<ContentMessage<ContactContent>> = SendContact(
|
||||||
chatId, contact, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, contact, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ data class DiceContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -24,6 +25,7 @@ data class DiceContent(
|
|||||||
chatId,
|
chatId,
|
||||||
dice.animationType,
|
dice.animationType,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -17,6 +17,7 @@ data class GameContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -24,6 +25,7 @@ data class GameContent(
|
|||||||
chatId,
|
chatId,
|
||||||
game.title,
|
game.title,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -101,6 +101,7 @@ data class LiveLocationContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -113,6 +114,7 @@ data class LiveLocationContent(
|
|||||||
location.heading,
|
location.heading,
|
||||||
location.proximityAlertRadius,
|
location.proximityAlertRadius,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@ -130,6 +132,7 @@ data class StaticLocationContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -138,6 +141,7 @@ data class StaticLocationContent(
|
|||||||
location.latitude,
|
location.latitude,
|
||||||
location.longitude,
|
location.longitude,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -17,12 +17,14 @@ data class PollContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
): Request<ContentMessage<PollContent>> = poll.createRequest(
|
): Request<ContentMessage<PollContent>> = poll.createRequest(
|
||||||
chatId,
|
chatId,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -19,6 +19,7 @@ data class TextContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -27,6 +28,7 @@ data class TextContent(
|
|||||||
textSources,
|
textSources,
|
||||||
false,
|
false,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -17,10 +17,11 @@ data class VenueContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
): Request<ContentMessage<VenueContent>> = SendVenue(
|
): Request<ContentMessage<VenueContent>> = SendVenue(
|
||||||
chatId, venue, disableNotification, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
chatId, venue, disableNotification, protectContent, replyToMessageId, allowSendingWithoutReply, replyMarkup
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,9 @@ interface ResendableContent {
|
|||||||
fun createResend(
|
fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyToMessageId: MessageIdentifier? = null,
|
replyToMessageId: MessageIdentifier? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<out Message>
|
): Request<out Message>
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ data class AnimationContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -36,6 +37,7 @@ data class AnimationContent(
|
|||||||
media.width,
|
media.width,
|
||||||
media.height,
|
media.height,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -22,6 +22,7 @@ data class AudioContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -34,6 +35,7 @@ data class AudioContent(
|
|||||||
media.performer,
|
media.performer,
|
||||||
media.title,
|
media.title,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -25,6 +25,7 @@ data class DocumentContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -34,6 +35,7 @@ data class DocumentContent(
|
|||||||
media.thumb ?.fileId,
|
media.thumb ?.fileId,
|
||||||
textSources,
|
textSources,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -25,6 +25,7 @@ data class PhotoContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -33,6 +34,7 @@ data class PhotoContent(
|
|||||||
media.fileId,
|
media.fileId,
|
||||||
textSources,
|
textSources,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -18,6 +18,7 @@ data class StickerContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -25,6 +26,7 @@ data class StickerContent(
|
|||||||
chatId,
|
chatId,
|
||||||
media.fileId,
|
media.fileId,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -22,6 +22,7 @@ data class VideoContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -35,6 +36,7 @@ data class VideoContent(
|
|||||||
media.height,
|
media.height,
|
||||||
null,
|
null,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -18,6 +18,7 @@ data class VideoNoteContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -28,6 +29,7 @@ data class VideoNoteContent(
|
|||||||
media.duration,
|
media.duration,
|
||||||
media.width,
|
media.width,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -22,6 +22,7 @@ data class VoiceContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@ -31,6 +32,7 @@ data class VoiceContent(
|
|||||||
textSources,
|
textSources,
|
||||||
media.duration,
|
media.duration,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyToMessageId,
|
replyToMessageId,
|
||||||
allowSendingWithoutReply,
|
allowSendingWithoutReply,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
|
@ -16,6 +16,7 @@ data class InvoiceContent(
|
|||||||
override fun createResend(
|
override fun createResend(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
|
protectContent: Boolean,
|
||||||
replyToMessageId: MessageIdentifier?,
|
replyToMessageId: MessageIdentifier?,
|
||||||
allowSendingWithoutReply: Boolean?,
|
allowSendingWithoutReply: Boolean?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
|
@ -49,6 +49,10 @@ internal fun MultilevelTextSource.italicMarkdownV2(): String = markdownV2Default
|
|||||||
internal fun MultilevelTextSource.italicHTML(): String = htmlDefault(htmlItalicControl)
|
internal fun MultilevelTextSource.italicHTML(): String = htmlDefault(htmlItalicControl)
|
||||||
|
|
||||||
|
|
||||||
|
internal fun MultilevelTextSource.spoilerMarkdownV2(): String = markdownV2Default(markdownSpoilerControl)
|
||||||
|
internal fun MultilevelTextSource.spoilerHTML(): String = htmlDefault(htmlSpoilerControl, htmlSpoilerClosingControl)
|
||||||
|
|
||||||
|
|
||||||
internal fun MultilevelTextSource.strikethroughMarkdownV2(): String = markdownV2Default(markdownV2StrikethroughControl)
|
internal fun MultilevelTextSource.strikethroughMarkdownV2(): String = markdownV2Default(markdownV2StrikethroughControl)
|
||||||
internal fun MultilevelTextSource.strikethroughHTML(): String = htmlDefault(htmlStrikethroughControl)
|
internal fun MultilevelTextSource.strikethroughHTML(): String = htmlDefault(htmlStrikethroughControl)
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.utils.extensions.*
|
|||||||
|
|
||||||
const val markdownBoldControl = "*"
|
const val markdownBoldControl = "*"
|
||||||
const val markdownItalicControl = "_"
|
const val markdownItalicControl = "_"
|
||||||
|
const val markdownSpoilerControl = "||"
|
||||||
const val markdownCodeControl = "`"
|
const val markdownCodeControl = "`"
|
||||||
const val markdownPreControl = "```"
|
const val markdownPreControl = "```"
|
||||||
|
|
||||||
@ -18,6 +19,8 @@ const val markdownV2ItalicEndControl = "$markdownItalicControl$markdownV2ItalicU
|
|||||||
|
|
||||||
const val htmlBoldControl = "b"
|
const val htmlBoldControl = "b"
|
||||||
const val htmlItalicControl = "i"
|
const val htmlItalicControl = "i"
|
||||||
|
const val htmlSpoilerControl = "span class=\"tg-spoiler\""
|
||||||
|
const val htmlSpoilerClosingControl = "span"
|
||||||
const val htmlCodeControl = "code"
|
const val htmlCodeControl = "code"
|
||||||
const val htmlPreControl = "pre"
|
const val htmlPreControl = "pre"
|
||||||
const val htmlUnderlineControl = "u"
|
const val htmlUnderlineControl = "u"
|
||||||
@ -46,12 +49,13 @@ internal fun String.boldMarkdown(): String = markdownDefault(markdownBoldControl
|
|||||||
|
|
||||||
internal fun String.italicMarkdown(): String = markdownDefault(markdownItalicControl)
|
internal fun String.italicMarkdown(): String = markdownDefault(markdownItalicControl)
|
||||||
|
|
||||||
|
internal fun String.spoilerMarkdown(): String = regularMarkdown()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Crutch for support of strikethrough in default markdown. Simply add modifier, but it will not look like correct
|
* Crutch for support of strikethrough in default markdown. Simply add modifier, but it will not look like correct
|
||||||
*/
|
*/
|
||||||
|
|
||||||
internal fun String.strikethroughMarkdown(): String = map { it + "\u0336" }.joinToString("")
|
internal fun String.strikethroughMarkdown(): String = map { it + "\u0336" }.joinToString("")
|
||||||
internal fun String.strikethroughMarkdownV2(): String = markdownV2Default(markdownV2StrikethroughControl)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,8 +4,8 @@ import dev.inmo.tgbotapi.types.MessageEntity.textsources.*
|
|||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
const val testText = "It is simple hello world with #tag and @mention"
|
const val testText = "It is simple hello world with #tag and @mention"
|
||||||
const val formattedV2Text = "It *_is_ ~__simple__~* hello world with \\#tag and @mention"
|
const val formattedV2Text = "It *_is_ ~__simple__~* ||hello world|| with \\#tag and @mention"
|
||||||
const val formattedHtmlText = "It <b><i>is</i> <s><u>simple</u></s></b> hello world with #tag and @mention"
|
const val formattedHtmlText = "It <b><i>is</i> <s><u>simple</u></s></b> <span class=\"tg-spoiler\">hello world</span> with #tag and @mention"
|
||||||
internal val testTextEntities = listOf(
|
internal val testTextEntities = listOf(
|
||||||
RawMessageEntity(
|
RawMessageEntity(
|
||||||
"bold",
|
"bold",
|
||||||
@ -27,6 +27,11 @@ internal val testTextEntities = listOf(
|
|||||||
6,
|
6,
|
||||||
6
|
6
|
||||||
),
|
),
|
||||||
|
RawMessageEntity(
|
||||||
|
"spoiler",
|
||||||
|
13,
|
||||||
|
11
|
||||||
|
),
|
||||||
RawMessageEntity(
|
RawMessageEntity(
|
||||||
"hashtag",
|
"hashtag",
|
||||||
30,
|
30,
|
||||||
@ -43,9 +48,11 @@ fun TextSourcesList.testTextSources() {
|
|||||||
assertTrue (first() is RegularTextSource)
|
assertTrue (first() is RegularTextSource)
|
||||||
assertTrue (get(1) is BoldTextSource)
|
assertTrue (get(1) is BoldTextSource)
|
||||||
assertTrue (get(2) is RegularTextSource)
|
assertTrue (get(2) is RegularTextSource)
|
||||||
assertTrue (get(3) is HashTagTextSource)
|
assertTrue (get(3) is SpoilerTextSource)
|
||||||
assertTrue (get(4) is RegularTextSource)
|
assertTrue (get(4) is RegularTextSource)
|
||||||
assertTrue (get(5) is MentionTextSource)
|
assertTrue (get(5) is HashTagTextSource)
|
||||||
|
assertTrue (get(6) is RegularTextSource)
|
||||||
|
assertTrue (get(7) is MentionTextSource)
|
||||||
|
|
||||||
val boldSource = get(1) as BoldTextSource
|
val boldSource = get(1) as BoldTextSource
|
||||||
assertTrue (boldSource.subsources.first() is ItalicTextSource)
|
assertTrue (boldSource.subsources.first() is ItalicTextSource)
|
||||||
|
@ -42,7 +42,9 @@ class StringFormattingTests {
|
|||||||
bold(italic("is") +
|
bold(italic("is") +
|
||||||
" " +
|
" " +
|
||||||
strikethrough(underline("simple"))) +
|
strikethrough(underline("simple"))) +
|
||||||
" hello world with " +
|
" " +
|
||||||
|
spoiler("hello world") +
|
||||||
|
" with " +
|
||||||
hashtag("tag") +
|
hashtag("tag") +
|
||||||
" and " +
|
" and " +
|
||||||
mention("mention")
|
mention("mention")
|
||||||
|
@ -3,6 +3,7 @@ package dev.inmo.tgbotapi.types
|
|||||||
import dev.inmo.tgbotapi.TestsJsonFormat
|
import dev.inmo.tgbotapi.TestsJsonFormat
|
||||||
import dev.inmo.tgbotapi.extensions.utils.formatting.*
|
import dev.inmo.tgbotapi.extensions.utils.formatting.*
|
||||||
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourceSerializer
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.TextSourceSerializer
|
||||||
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler
|
||||||
import dev.inmo.tgbotapi.utils.extensions.makeString
|
import dev.inmo.tgbotapi.utils.extensions.makeString
|
||||||
import kotlinx.serialization.builtins.ListSerializer
|
import kotlinx.serialization.builtins.ListSerializer
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
@ -16,6 +17,11 @@ class TextSourcesTests {
|
|||||||
italic("It")
|
italic("It")
|
||||||
link("is example", "https://is.example")
|
link("is example", "https://is.example")
|
||||||
}
|
}
|
||||||
|
spoiler {
|
||||||
|
regular("and")
|
||||||
|
italic("that")
|
||||||
|
link("is spoiler", "https://is.example")
|
||||||
|
}
|
||||||
underline("of")
|
underline("of")
|
||||||
italic(
|
italic(
|
||||||
buildEntities {
|
buildEntities {
|
||||||
@ -32,6 +38,6 @@ class TextSourcesTests {
|
|||||||
)
|
)
|
||||||
assertEquals(testList, deserialized)
|
assertEquals(testList, deserialized)
|
||||||
assertEquals(testList.makeString(), deserialized.makeString())
|
assertEquals(testList.makeString(), deserialized.makeString())
|
||||||
assertEquals("It is example of complex text", testList.makeString())
|
assertEquals("It is example and that is spoiler of complex text", testList.makeString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -926,15 +926,16 @@ inline fun Message.requireChannelContentMessageImpl(): UnconnectedFromChannelGro
|
|||||||
this as UnconnectedFromChannelGroupContentMessageImpl<MessageContent>
|
this as UnconnectedFromChannelGroupContentMessageImpl<MessageContent>
|
||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun <T> Message.whenFromChannelGroupContentMessageImpl(block: (FromChannelGroupContentMessageImpl<MessageContent>) -> T) = asFromChannelGroupContentMessageImpl() ?.let(block)
|
@Deprecated("Renamed", ReplaceWith("whenConnectedFromChannelGroupContentMessage", "dev.inmo.tgbotapi.extensions.utils.whenConnectedFromChannelGroupContentMessage"))
|
||||||
|
inline fun <T> Message.whenFromChannelGroupContentMessageImpl(block: (ConnectedFromChannelGroupContentMessage<MessageContent>) -> T) = whenConnectedFromChannelGroupContentMessage(block)
|
||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun Message.asFromChannelGroupContentMessageImpl(): FromChannelGroupContentMessageImpl<MessageContent>? =
|
@Deprecated("Renamed", ReplaceWith("asConnectedFromChannelGroupContentMessage", "dev.inmo.tgbotapi.extensions.utils.asConnectedFromChannelGroupContentMessage"))
|
||||||
this as? FromChannelGroupContentMessageImpl<MessageContent>
|
inline fun Message.asFromChannelGroupContentMessageImpl(): ConnectedFromChannelGroupContentMessage<MessageContent>? = asConnectedFromChannelGroupContentMessage()
|
||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun Message.requireFromChannelGroupContentMessageImpl(): FromChannelGroupContentMessageImpl<MessageContent> =
|
@Deprecated("Renamed", ReplaceWith("requireConnectedFromChannelGroupContentMessage", "dev.inmo.tgbotapi.extensions.utils.requireConnectedFromChannelGroupContentMessage"))
|
||||||
this as FromChannelGroupContentMessageImpl<MessageContent>
|
inline fun Message.requireFromChannelGroupContentMessageImpl(): ConnectedFromChannelGroupContentMessage<MessageContent> = requireConnectedFromChannelGroupContentMessage()
|
||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun <T> Message.whenPassportMessage(block: (PassportMessage) -> T) = asPassportMessage() ?.let(block)
|
inline fun <T> Message.whenPassportMessage(block: (PassportMessage) -> T) = asPassportMessage() ?.let(block)
|
||||||
@ -1038,7 +1039,7 @@ inline fun <T> Message.whenConnectedFromChannelGroupContentMessage(block: (Conne
|
|||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun Message.asConnectedFromChannelGroupContentMessage(): ConnectedFromChannelGroupContentMessage<MessageContent>? =
|
inline fun Message.asConnectedFromChannelGroupContentMessage(): ConnectedFromChannelGroupContentMessage<MessageContent>? =
|
||||||
this as? ConnectedFromChannelGroupContentMessageImpl<MessageContent>
|
this as? ConnectedFromChannelGroupContentMessage<MessageContent>
|
||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun Message.requireConnectedFromChannelGroupContentMessage(): ConnectedFromChannelGroupContentMessage<MessageContent> =
|
inline fun Message.requireConnectedFromChannelGroupContentMessage(): ConnectedFromChannelGroupContentMessage<MessageContent> =
|
||||||
|
@ -99,6 +99,41 @@ inline fun EntitiesBuilder.bold(text: String) = add(dev.inmo.tgbotapi.types.Mess
|
|||||||
*/
|
*/
|
||||||
inline fun EntitiesBuilder.boldln(text: String) = bold(text) + newLine
|
inline fun EntitiesBuilder.boldln(text: String) = bold(text) + newLine
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add spoiler using [EntitiesBuilder.add] with [dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler]
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoiler(parts: TextSourcesList) = add(dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler(parts))
|
||||||
|
/**
|
||||||
|
* Version of [EntitiesBuilder.spoiler] with new line at the end
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoilerln(parts: TextSourcesList) = spoiler(parts) + newLine
|
||||||
|
/**
|
||||||
|
* Add spoiler using [EntitiesBuilder.add] with [dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler].
|
||||||
|
* Will reuse separator config from [buildEntities]
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoiler(noinline init: EntitiesBuilderBody) = add(dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler(buildEntities(separator, init)))
|
||||||
|
/**
|
||||||
|
* Version of [EntitiesBuilder.spoiler] with new line at the end.
|
||||||
|
* Will reuse separator config from [buildEntities]
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoilerln(noinline init: EntitiesBuilderBody) = spoiler(init) + newLine
|
||||||
|
/**
|
||||||
|
* Add spoiler using [EntitiesBuilder.add] with [dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler]
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoiler(vararg parts: TextSource) = add(dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler(*parts))
|
||||||
|
/**
|
||||||
|
* Version of [EntitiesBuilder.spoiler] with new line at the end
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoilerln(vararg parts: TextSource) = spoiler(*parts) + newLine
|
||||||
|
/**
|
||||||
|
* Add spoiler using [EntitiesBuilder.add] with [dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler]
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoiler(text: String) = add(dev.inmo.tgbotapi.types.MessageEntity.textsources.spoiler(text))
|
||||||
|
/**
|
||||||
|
* Version of [EntitiesBuilder.spoiler] with new line at the end
|
||||||
|
*/
|
||||||
|
inline fun EntitiesBuilder.spoilerln(text: String) = spoiler(text) + newLine
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add botCommand using [EntitiesBuilder.add] with [dev.inmo.tgbotapi.types.MessageEntity.textsources.botCommand]
|
* Add botCommand using [EntitiesBuilder.add] with [dev.inmo.tgbotapi.types.MessageEntity.textsources.botCommand]
|
||||||
|
@ -29,29 +29,35 @@ val SentMediaGroupUpdate.mediaGroupId: MediaGroupIdentifier
|
|||||||
fun List<CommonMessage<MediaGroupContent>>.createResend(
|
fun List<CommonMessage<MediaGroupContent>>.createResend(
|
||||||
chatId: ChatId,
|
chatId: ChatId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyTo: MessageIdentifier? = null
|
replyTo: MessageIdentifier? = null
|
||||||
) = SendMediaGroup<MediaGroupContent>(
|
) = SendMediaGroup<MediaGroupContent>(
|
||||||
chatId,
|
chatId,
|
||||||
map { it.content.toMediaGroupMemberInputMedia() },
|
map { it.content.toMediaGroupMemberInputMedia() },
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyTo
|
replyTo
|
||||||
)
|
)
|
||||||
|
|
||||||
fun List<CommonMessage<MediaGroupContent>>.createResend(
|
fun List<CommonMessage<MediaGroupContent>>.createResend(
|
||||||
chat: Chat,
|
chat: Chat,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyTo: MessageIdentifier? = null
|
replyTo: MessageIdentifier? = null
|
||||||
) = createResend(
|
) = createResend(
|
||||||
chat.id,
|
chat.id,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyTo
|
replyTo
|
||||||
)
|
)
|
||||||
|
|
||||||
fun SentMediaGroupUpdate.createResend(
|
fun SentMediaGroupUpdate.createResend(
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
replyTo: MessageIdentifier? = null
|
replyTo: MessageIdentifier? = null
|
||||||
) = data.createResend(
|
) = data.createResend(
|
||||||
chat,
|
chat,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
|
protectContent,
|
||||||
replyTo
|
replyTo
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user