mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-11-18 13:00:18 +00:00
Compare commits
52 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fa9c95f799 | |||
| dd6f7577ba | |||
| 7d47d0ab61 | |||
| 636c01acb9 | |||
| 479923a04a | |||
| ccfa6e7b6d | |||
| 65048648b8 | |||
| 50b2db8859 | |||
| 45bbcb5ec1 | |||
| dc463b5626 | |||
| d80e578a4c | |||
| b26d21a817 | |||
| 2052072e5d | |||
| 6fb3d3fcb1 | |||
| c39e9fc156 | |||
| 9c5793bec7 | |||
| fd9bff611b | |||
| bb66279044 | |||
| 24b48f2536 | |||
| 670c26c982 | |||
| 7ed5d9ceed | |||
| 787941fcaf | |||
| 6c9f1bc016 | |||
| e5bffa7c51 | |||
|
|
3fe26b057a | ||
| dccd15a5e9 | |||
| 3d14c93d89 | |||
| b8a6534b6a | |||
| f5529033ec | |||
| 482c375327 | |||
| abb8b3491d | |||
| 2953005e6d | |||
| 1f6ddd97e3 | |||
| bc8da1120e | |||
| e895c2f3a8 | |||
| f84180b3ff | |||
| c21c8c5a26 | |||
| 27416daeb8 | |||
| b5b7482c2f | |||
| a7f4ab36c6 | |||
| 7398e53b85 | |||
| be25f705ef | |||
| 5ee87ac78d | |||
| fbd53e1f2d | |||
| 9fe8df9e11 | |||
| a053c08346 | |||
| 6fa769bce3 | |||
| 27ac8ee797 | |||
| ce84e3c198 | |||
| c3a3e9bd44 | |||
| 7b6be48ba8 | |||
| e98d5c7a9c |
2
.github/workflows/packages_publishing.yml
vendored
2
.github/workflows/packages_publishing.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
rm gradle.properties
|
rm gradle.properties
|
||||||
mv gradle.properties.tmp gradle.properties
|
mv gradle.properties.tmp gradle.properties
|
||||||
- name: KotlinSymbolProcessing execution
|
- name: KotlinSymbolProcessing execution
|
||||||
run: ./gradlew ksp
|
run: ./gradlew kspCommonMainKotlinMetadata
|
||||||
- name: Build
|
- name: Build
|
||||||
run: ./gradlew build
|
run: ./gradlew build
|
||||||
- name: API compatibility check
|
- name: API compatibility check
|
||||||
|
|||||||
44
CHANGELOG.md
44
CHANGELOG.md
@@ -1,5 +1,49 @@
|
|||||||
# TelegramBotAPI changelog
|
# TelegramBotAPI changelog
|
||||||
|
|
||||||
|
## 20.0.0
|
||||||
|
|
||||||
|
**THIS UPDATE CONTAINS SUPPORT OF [BOTS API 7.11](https://core.telegram.org/bots/api-changelog#october-31-2024)**
|
||||||
|
|
||||||
|
* `All`:
|
||||||
|
* **ALL SEND METHODS GOT PARAMETER `allowPaidBroadcast` WHICH POTENTIALLY MAY SPEND MONEYS FROM BOT BALANCE**
|
||||||
|
|
||||||
|
## 19.0.0
|
||||||
|
|
||||||
|
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||||
|
|
||||||
|
**THIS UPDATE CONTAINS UPGRADE UP TO KTOR 3.0 (thanks to [@d1snin](https://github.com/d1snin))**
|
||||||
|
|
||||||
|
* `Version`:
|
||||||
|
* `Ktor`: `2.3.12` -> `3.0.1`
|
||||||
|
* `MicroUtils`: `0.22.7` -> `0.23.0`
|
||||||
|
|
||||||
|
## 18.2.3
|
||||||
|
|
||||||
|
* `Core`:
|
||||||
|
* Add default middleware `ExceptionsThrottlerTelegramBotMiddleware`
|
||||||
|
* Make `TelegramBotMiddlewaresPipelinesHandler` to be default `TelegramBotPipelinesHandler`
|
||||||
|
* Make `DefaultKtorRequestsExecutor` now uses `runCatching` instead of `runCatchingSafely`
|
||||||
|
* `onRequestResultPresented` lambda now accepts non-nullable `result`
|
||||||
|
|
||||||
|
## 18.2.2
|
||||||
|
|
||||||
|
* `Version`:
|
||||||
|
* `Kotlin`: `2.0.20` -> `2.0.21`
|
||||||
|
* `MicroUtils`: `0.22.4` -> `0.22.7`
|
||||||
|
* `Core`:
|
||||||
|
* Fixes in blockquotes serializations
|
||||||
|
* Now `RawMessageEntity` is public. It is still under `Warning` annotation and is subject of changes
|
||||||
|
* `BehaviourBuilder`:
|
||||||
|
* Add `CommonMessageFilterExcludeCommand` to filter commands in messages
|
||||||
|
* Add `minus` operation for `SimpleFilter`s
|
||||||
|
|
||||||
|
## 18.2.1
|
||||||
|
|
||||||
|
* `Version`:
|
||||||
|
* `Serialization`: `1.7.2` -> `1.7.3`
|
||||||
|
* `Coroutines`: `1.8.1` -> `1.9.0`
|
||||||
|
* `MicroUtils`: `0.22.2` -> `0.22.4`
|
||||||
|
|
||||||
## 18.2.0
|
## 18.2.0
|
||||||
|
|
||||||
**THIS UPDATE CONTAINS SUPPORT OF [BOTS API 7.10](https://core.telegram.org/bots/api-changelog#september-6-2024)**
|
**THIS UPDATE CONTAINS SUPPORT OF [BOTS API 7.10](https://core.telegram.org/bots/api-changelog#september-6-2024)**
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#september-6-2024)
|
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#october-31-2024)
|
||||||
|
|
||||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ kotlin.incremental=true
|
|||||||
kotlin.incremental.js=true
|
kotlin.incremental.js=true
|
||||||
|
|
||||||
library_group=dev.inmo
|
library_group=dev.inmo
|
||||||
library_version=18.2.0
|
library_version=20.0.0
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
[versions]
|
[versions]
|
||||||
|
|
||||||
kotlin = "2.0.20"
|
kotlin = "2.0.21"
|
||||||
kotlin-serialization = "1.7.2"
|
kotlin-serialization = "1.7.3"
|
||||||
kotlin-coroutines = "1.8.1"
|
kotlin-coroutines = "1.9.0"
|
||||||
|
|
||||||
javax-activation = "1.1.1"
|
javax-activation = "1.1.1"
|
||||||
|
|
||||||
korlibs = "5.4.0"
|
korlibs = "5.4.0"
|
||||||
uuid = "0.8.4"
|
uuid = "0.8.4"
|
||||||
ktor = "2.3.12"
|
ktor = "3.0.1"
|
||||||
|
|
||||||
ksp = "2.0.20-1.0.24"
|
ksp = "2.0.21-1.0.26"
|
||||||
kotlin-poet = "1.18.1"
|
kotlin-poet = "1.18.1"
|
||||||
|
|
||||||
microutils = "0.22.2"
|
microutils = "0.23.0"
|
||||||
kslog = "1.3.6"
|
kslog = "1.3.6"
|
||||||
|
|
||||||
versions = "0.51.0"
|
versions = "0.51.0"
|
||||||
|
|||||||
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-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
||||||
@@ -90,6 +91,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
businessConnectionId,
|
businessConnectionId,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
protectContent,
|
protectContent,
|
||||||
|
allowPaidBroadcast,
|
||||||
effectId,
|
effectId,
|
||||||
replyParameters,
|
replyParameters,
|
||||||
it.replyMarkup
|
it.replyMarkup
|
||||||
@@ -126,6 +128,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
||||||
@@ -147,6 +150,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
sentMessageFlow = sentMessageFlow
|
sentMessageFlow = sentMessageFlow
|
||||||
@@ -167,6 +171,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
sentMessageFlow: FlowCollector<ContentMessage<LiveLocationContent>>? = null
|
||||||
@@ -184,6 +189,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
sentMessageFlow = sentMessageFlow
|
sentMessageFlow = sentMessageFlow
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -106,20 +107,21 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
val liveTimeAsDouble = liveTimeMillis.toDouble()
|
val liveTimeAsDouble = liveTimeMillis.toDouble()
|
||||||
val locationMessage = execute(
|
val locationMessage = execute(
|
||||||
SendLiveLocation(
|
SendLiveLocation(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
ceil(liveTimeAsDouble / 1000).toInt(),
|
livePeriod = ceil(liveTimeAsDouble / 1000).toInt(),
|
||||||
initHorizontalAccuracy,
|
horizontalAccuracy = initHorizontalAccuracy,
|
||||||
initHeading,
|
heading = initHeading,
|
||||||
initProximityAlertRadius,
|
proximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -148,25 +150,27 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
scope,
|
scope = scope,
|
||||||
chat.id,
|
chatId = chat.id,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
initHorizontalAccuracy,
|
initHorizontalAccuracy = initHorizontalAccuracy,
|
||||||
initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -185,25 +189,27 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
scope,
|
scope = scope,
|
||||||
chatId,
|
chatId = chatId,
|
||||||
location.latitude,
|
latitude = location.latitude,
|
||||||
location.longitude,
|
longitude = location.longitude,
|
||||||
liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
initHorizontalAccuracy,
|
initHorizontalAccuracy = initHorizontalAccuracy,
|
||||||
initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -222,25 +228,27 @@ public suspend fun TelegramBot.startLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
scope,
|
scope = scope,
|
||||||
chat.id,
|
chatId = chat.id,
|
||||||
location.latitude,
|
latitude = location.latitude,
|
||||||
location.longitude,
|
longitude = location.longitude,
|
||||||
liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
initHorizontalAccuracy,
|
initHorizontalAccuracy = initHorizontalAccuracy,
|
||||||
initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -260,25 +268,27 @@ public suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
scope,
|
scope = scope,
|
||||||
to.chat,
|
chat = to.chat,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
initHorizontalAccuracy,
|
initHorizontalAccuracy = initHorizontalAccuracy,
|
||||||
initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -297,22 +307,24 @@ public suspend inline fun TelegramBot.replyWithLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = to.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): LiveLocationProvider = startLiveLocation(
|
): LiveLocationProvider = startLiveLocation(
|
||||||
scope,
|
scope = scope,
|
||||||
to.chat,
|
chat = to.chat,
|
||||||
location,
|
location = location,
|
||||||
liveTimeMillis,
|
liveTimeMillis = liveTimeMillis,
|
||||||
initHorizontalAccuracy,
|
initHorizontalAccuracy = initHorizontalAccuracy,
|
||||||
initHeading,
|
initHeading = initHeading,
|
||||||
initProximityAlertRadius,
|
initProximityAlertRadius = initProximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = ReplyParameters(to.metaInfo, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.abstracts.TextedWithTextSources
|
|||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.extensions.api.edit.caption.editMessageCaption
|
import dev.inmo.tgbotapi.extensions.api.edit.caption.editMessageCaption
|
||||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
||||||
|
import dev.inmo.tgbotapi.extensions.api.edit.media.addMessageMedia
|
||||||
import dev.inmo.tgbotapi.extensions.api.edit.media.editMessageMedia
|
import dev.inmo.tgbotapi.extensions.api.edit.media.editMessageMedia
|
||||||
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
|
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
|
||||||
import dev.inmo.tgbotapi.extensions.api.edit.text.editMessageText
|
import dev.inmo.tgbotapi.extensions.api.edit.text.editMessageText
|
||||||
@@ -173,6 +174,17 @@ public suspend fun TelegramBot.edit(
|
|||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<MediaContent> = editMessageMedia(message, media, businessConnectionId, replyMarkup)
|
): ContentMessage<MediaContent> = editMessageMedia(message, media, businessConnectionId, replyMarkup)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
|
* as a builder for that
|
||||||
|
*/
|
||||||
|
public suspend fun TelegramBot.addMedia(
|
||||||
|
message: ContentMessage<TextContent>,
|
||||||
|
media: TelegramFreeMedia,
|
||||||
|
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
|
): ContentMessage<MediaContent> = addMessageMedia(message, media, businessConnectionId, replyMarkup)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
* as a builder for that
|
* as a builder for that
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
|||||||
import dev.inmo.tgbotapi.types.chat.Chat
|
import dev.inmo.tgbotapi.types.chat.Chat
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||||
import dev.inmo.tgbotapi.types.message.content.MediaContent
|
import dev.inmo.tgbotapi.types.message.content.MediaContent
|
||||||
|
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||||
|
import kotlin.jvm.JvmName
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
@@ -48,3 +50,14 @@ public suspend fun TelegramBot.editMessageMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<MediaContent> = editMessageMedia(message.chat.id, message.messageId, media, businessConnectionId, replyMarkup)
|
): ContentMessage<MediaContent> = editMessageMedia(message.chat.id, message.messageId, media, businessConnectionId, replyMarkup)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
|
* as a builder for that
|
||||||
|
*/
|
||||||
|
public suspend fun TelegramBot.addMessageMedia(
|
||||||
|
message: ContentMessage<TextContent>,
|
||||||
|
media: TelegramFreeMedia,
|
||||||
|
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
|
||||||
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
|
): ContentMessage<MediaContent> = editMessageMedia(message.chat.id, message.messageId, media, businessConnectionId, replyMarkup)
|
||||||
|
|||||||
@@ -23,21 +23,23 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = execute(
|
): MessageId = execute(
|
||||||
CopyMessage(
|
CopyMessage(
|
||||||
fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageId,
|
messageId = messageId,
|
||||||
toChatId,
|
toChatId = toChatId,
|
||||||
text,
|
text = text,
|
||||||
parseMode,
|
parseMode = parseMode,
|
||||||
showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
replyParameters,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -55,9 +57,23 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(fromChat.id, messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChatId = fromChat.id,
|
||||||
|
messageId = messageId,
|
||||||
|
toChatId = toChatId,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -73,9 +89,23 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(fromChatId, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChatId = fromChatId,
|
||||||
|
messageId = messageId,
|
||||||
|
toChatId = toChat.id,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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,9 +121,23 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(fromChat.id, messageId, toChat.id, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChatId = fromChat.id,
|
||||||
|
messageId = messageId,
|
||||||
|
toChatId = toChat.id,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -109,20 +153,22 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = execute(
|
): MessageId = execute(
|
||||||
CopyMessage(
|
CopyMessage(
|
||||||
fromChatId,
|
fromChatId = fromChatId,
|
||||||
messageId,
|
messageId = messageId,
|
||||||
toChatId,
|
toChatId = toChatId,
|
||||||
entities,
|
entities = entities,
|
||||||
showCaptionAboveMedia,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
replyParameters,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -139,9 +185,22 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(fromChat.id, messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChatId = fromChat.id,
|
||||||
|
messageId = messageId,
|
||||||
|
toChatId = toChatId,
|
||||||
|
entities = entities,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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,9 +215,22 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(fromChatId, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChatId = fromChatId,
|
||||||
|
messageId = messageId,
|
||||||
|
toChatId = toChat.id,
|
||||||
|
entities = entities,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -173,9 +245,22 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(fromChat.id, messageId, toChat.id, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChatId = fromChat.id,
|
||||||
|
messageId = messageId,
|
||||||
|
toChatId = toChat.id,
|
||||||
|
entities = entities,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -190,9 +275,23 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(message.chat, message.messageId, toChatId, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChat = message.chat,
|
||||||
|
messageId = message.messageId,
|
||||||
|
toChatId = toChatId,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -207,9 +306,23 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(message.chat, message.messageId, toChat, text, parseMode, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChat = message.chat,
|
||||||
|
messageId = message.messageId,
|
||||||
|
toChat = toChat,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -223,9 +336,22 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(message.chat, message.messageId, toChatId, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
): MessageId = copyMessage(
|
||||||
|
fromChat = message.chat,
|
||||||
|
messageId = message.messageId,
|
||||||
|
toChatId = toChatId,
|
||||||
|
entities = entities,
|
||||||
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -239,243 +365,272 @@ public suspend inline fun TelegramBot.copyMessage(
|
|||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = copyMessage(message.chat, message.messageId, toChat, entities, showCaptionAboveMedia, threadId, disableNotification, protectContent, replyParameters, replyMarkup)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
fromChatId: ChatIdentifier,
|
|
||||||
messageId: MessageId,
|
|
||||||
text: String? = null,
|
|
||||||
parseMode: ParseMode? = null,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = execute(
|
|
||||||
CopyMessage(
|
|
||||||
fromChatId,
|
|
||||||
messageId,
|
|
||||||
toChatId,
|
|
||||||
text,
|
|
||||||
parseMode,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
fromChat: Chat,
|
|
||||||
messageId: MessageId,
|
|
||||||
text: String? = null,
|
|
||||||
parseMode: ParseMode? = null,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): MessageId = copyMessage(
|
): MessageId = copyMessage(
|
||||||
toChatId,
|
fromChat = message.chat,
|
||||||
fromChat.id,
|
messageId = message.messageId,
|
||||||
messageId,
|
toChat = toChat,
|
||||||
text,
|
entities = entities,
|
||||||
parseMode,
|
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
showCaptionAboveMedia,
|
threadId = threadId,
|
||||||
threadId,
|
disableNotification = disableNotification,
|
||||||
disableNotification,
|
protectContent = protectContent,
|
||||||
protectContent,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChat: Chat,
|
|
||||||
fromChatId: ChatIdentifier,
|
|
||||||
messageId: MessageId,
|
|
||||||
text: String? = null,
|
|
||||||
parseMode: ParseMode? = null,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = copyMessage(
|
|
||||||
toChat.id,
|
|
||||||
fromChatId,
|
|
||||||
messageId,
|
|
||||||
text,
|
|
||||||
parseMode,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChat: Chat,
|
|
||||||
fromChat: Chat,
|
|
||||||
messageId: MessageId,
|
|
||||||
text: String? = null,
|
|
||||||
parseMode: ParseMode? = null,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = copyMessage(
|
|
||||||
toChat.id,
|
|
||||||
fromChat.id,
|
|
||||||
messageId,
|
|
||||||
text,
|
|
||||||
parseMode,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
fromChatId: ChatIdentifier,
|
|
||||||
messageId: MessageId,
|
|
||||||
entities: TextSourcesList,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = execute(
|
|
||||||
CopyMessage(
|
|
||||||
fromChatId,
|
|
||||||
messageId,
|
|
||||||
toChatId,
|
|
||||||
entities,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
fromChat: Chat,
|
|
||||||
messageId: MessageId,
|
|
||||||
entities: TextSourcesList,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = copyMessage(
|
|
||||||
toChatId,
|
|
||||||
fromChat.id,
|
|
||||||
messageId,
|
|
||||||
entities,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChat: Chat,
|
|
||||||
fromChatId: ChatIdentifier,
|
|
||||||
messageId: MessageId,
|
|
||||||
entities: TextSourcesList,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = copyMessage(
|
|
||||||
toChat.id,
|
|
||||||
fromChatId,
|
|
||||||
messageId,
|
|
||||||
entities,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
|
||||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
|
||||||
*/
|
|
||||||
public suspend inline fun TelegramBot.copyMessage(
|
|
||||||
toChat: Chat,
|
|
||||||
fromChat: Chat,
|
|
||||||
messageId: MessageId,
|
|
||||||
entities: TextSourcesList,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChat.id.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
): MessageId = copyMessage(
|
|
||||||
toChat.id,
|
|
||||||
fromChat.id,
|
|
||||||
messageId,
|
|
||||||
entities,
|
|
||||||
showCaptionAboveMedia,
|
|
||||||
threadId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChatId: ChatIdentifier,
|
||||||
|
// fromChatId: ChatIdentifier,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// text: String? = null,
|
||||||
|
// parseMode: ParseMode? = null,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = execute(
|
||||||
|
// CopyMessage(
|
||||||
|
// fromChatId,
|
||||||
|
// messageId,
|
||||||
|
// toChatId,
|
||||||
|
// text,
|
||||||
|
// parseMode,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
// )
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChatId: ChatIdentifier,
|
||||||
|
// fromChat: Chat,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// text: String? = null,
|
||||||
|
// parseMode: ParseMode? = null,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = copyMessage(
|
||||||
|
// toChatId,
|
||||||
|
// fromChat.id,
|
||||||
|
// messageId,
|
||||||
|
// text,
|
||||||
|
// parseMode,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChat: Chat,
|
||||||
|
// fromChatId: ChatIdentifier,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// text: String? = null,
|
||||||
|
// parseMode: ParseMode? = null,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = copyMessage(
|
||||||
|
// toChat.id,
|
||||||
|
// fromChatId,
|
||||||
|
// messageId,
|
||||||
|
// text,
|
||||||
|
// parseMode,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChat: Chat,
|
||||||
|
// fromChat: Chat,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// text: String? = null,
|
||||||
|
// parseMode: ParseMode? = null,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = copyMessage(
|
||||||
|
// toChat.id,
|
||||||
|
// fromChat.id,
|
||||||
|
// messageId,
|
||||||
|
// text,
|
||||||
|
// parseMode,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChatId: ChatIdentifier,
|
||||||
|
// fromChatId: ChatIdentifier,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// entities: TextSourcesList,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = execute(
|
||||||
|
// CopyMessage(
|
||||||
|
// fromChatId,
|
||||||
|
// messageId,
|
||||||
|
// toChatId,
|
||||||
|
// entities,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
// )
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChatId: ChatIdentifier,
|
||||||
|
// fromChat: Chat,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// entities: TextSourcesList,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = copyMessage(
|
||||||
|
// toChatId,
|
||||||
|
// fromChat.id,
|
||||||
|
// messageId,
|
||||||
|
// entities,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChat: Chat,
|
||||||
|
// fromChatId: ChatIdentifier,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// entities: TextSourcesList,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = copyMessage(
|
||||||
|
// toChat.id,
|
||||||
|
// fromChatId,
|
||||||
|
// messageId,
|
||||||
|
// entities,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||||
|
// * [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||||
|
// */
|
||||||
|
//public suspend inline fun TelegramBot.copyMessage(
|
||||||
|
// toChat: Chat,
|
||||||
|
// fromChat: Chat,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// entities: TextSourcesList,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChat.id.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//): MessageId = copyMessage(
|
||||||
|
// toChat.id,
|
||||||
|
// fromChat.id,
|
||||||
|
// messageId,
|
||||||
|
// entities,
|
||||||
|
// showCaptionAboveMedia,
|
||||||
|
// threadId,
|
||||||
|
// disableNotification,
|
||||||
|
// protectContent,
|
||||||
|
// allowPaidBroadcast,
|
||||||
|
// replyParameters,
|
||||||
|
// replyMarkup
|
||||||
|
//)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId: MessageThreadId? = chatId.threadId,
|
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -25,6 +26,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -40,6 +42,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId: MessageThreadId? = chat.id.threadId,
|
messageThreadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -49,6 +52,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -65,6 +69,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId: MessageThreadId? = chatId.threadId,
|
messageThreadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -74,6 +79,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -90,6 +96,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId: MessageThreadId? = chat.id.threadId,
|
messageThreadId: MessageThreadId? = chat.id.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -99,6 +106,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
|||||||
messageThreadId = messageThreadId,
|
messageThreadId = messageThreadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -22,12 +22,24 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = execute(
|
): ContentMessage<ContactContent> = execute(
|
||||||
SendContact(
|
SendContact(
|
||||||
chatId, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
phoneNumber = phoneNumber,
|
||||||
|
firstName = firstName,
|
||||||
|
lastName = lastName,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -42,12 +54,22 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = execute(
|
): ContentMessage<ContactContent> = execute(
|
||||||
SendContact(
|
SendContact(
|
||||||
chatId, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
contact = contact,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -64,11 +86,23 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = sendContact(
|
): ContentMessage<ContactContent> = sendContact(
|
||||||
chat.id, phoneNumber, firstName, lastName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chat.id,
|
||||||
|
phoneNumber = phoneNumber,
|
||||||
|
firstName = firstName,
|
||||||
|
lastName = lastName,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -82,9 +116,19 @@ public suspend fun TelegramBot.sendContact(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<ContactContent> = sendContact(
|
): ContentMessage<ContactContent> = sendContact(
|
||||||
chat.id, contact, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chat.id,
|
||||||
|
contact = contact,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,11 +21,23 @@ public suspend fun TelegramBot.sendDice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<DiceContent> = execute(
|
): ContentMessage<DiceContent> = execute(
|
||||||
SendDice(chatId, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
SendDice(
|
||||||
|
chatId = chatId,
|
||||||
|
animationType = animationType,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +51,19 @@ public suspend fun TelegramBot.sendDice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<DiceContent> = sendDice(chat.id, animationType, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<DiceContent> = sendDice(
|
||||||
|
chatId = chat.id,
|
||||||
|
animationType = animationType,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -27,25 +27,27 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = execute(
|
): ContentMessage<LiveLocationContent> = execute(
|
||||||
SendLiveLocation(
|
SendLiveLocation(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
livePeriod,
|
livePeriod = livePeriod,
|
||||||
horizontalAccuracy,
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
heading,
|
heading = heading,
|
||||||
proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -64,24 +66,26 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
location.latitude,
|
latitude = location.latitude,
|
||||||
location.longitude,
|
longitude = location.longitude,
|
||||||
livePeriod,
|
livePeriod = livePeriod,
|
||||||
horizontalAccuracy,
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
heading,
|
heading = heading,
|
||||||
proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -100,24 +104,26 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
chat.id,
|
chatId = chat.id,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
livePeriod,
|
livePeriod = livePeriod,
|
||||||
horizontalAccuracy,
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
heading,
|
heading = heading,
|
||||||
proximityAlertRadius,
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -135,6 +141,7 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -150,6 +157,7 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -171,10 +179,27 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(chatId, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
|
chatId = chatId,
|
||||||
|
latitude = latitude,
|
||||||
|
longitude = longitude,
|
||||||
|
livePeriod = livePeriod,
|
||||||
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
|
heading = heading,
|
||||||
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -191,10 +216,27 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(chatId, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
|
chatId = chatId,
|
||||||
|
latitude = location.latitude,
|
||||||
|
longitude = location.longitude,
|
||||||
|
livePeriod = livePeriod,
|
||||||
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
|
heading = heading,
|
||||||
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -212,10 +254,27 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(chat.id, latitude, longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
|
chatId = chat.id,
|
||||||
|
latitude = latitude,
|
||||||
|
longitude = longitude,
|
||||||
|
livePeriod = livePeriod,
|
||||||
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
|
heading = heading,
|
||||||
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -232,7 +291,24 @@ public suspend fun TelegramBot.sendLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<LiveLocationContent> = sendLocation(chat.id, location.latitude, location.longitude, livePeriod, horizontalAccuracy, heading, proximityAlertRadius, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<LiveLocationContent> = sendLocation(
|
||||||
|
chatId = chat.id,
|
||||||
|
latitude = location.latitude,
|
||||||
|
longitude = location.longitude,
|
||||||
|
livePeriod = livePeriod,
|
||||||
|
horizontalAccuracy = horizontalAccuracy,
|
||||||
|
heading = heading,
|
||||||
|
proximityAlertRadius = proximityAlertRadius,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -27,22 +27,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = execute(
|
): ContentMessage<TextContent> = execute(
|
||||||
SendTextMessage(
|
SendTextMessage(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
text,
|
text = text,
|
||||||
parseMode,
|
parseMode = parseMode,
|
||||||
linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -59,11 +61,23 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
chatId, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,10 +93,24 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendTextMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
|
chatId = chat.id,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -98,10 +126,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(chat.id, text, parseMode, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
|
chatId = chat.id,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -115,11 +157,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = execute(
|
): ContentMessage<TextContent> = execute(
|
||||||
SendTextMessage(chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
SendTextMessage(
|
||||||
|
chatId = chatId,
|
||||||
|
entities = entities,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,11 +189,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
|
chatId = chatId,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -153,11 +221,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
|
chatId = chatId,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -171,11 +252,22 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
chatId, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
entities = entities,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -190,11 +282,24 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
|
chatId = chatId,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -209,11 +314,24 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendTextMessage(chatId, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
|
chatId = chatId,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -227,10 +345,23 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
|
chatId = chat.id,
|
||||||
|
entities = entities,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
* @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
@@ -244,11 +375,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
|
chat = chat,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -263,11 +407,24 @@ public suspend fun TelegramBot.sendMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendMessage(
|
||||||
|
chat = chat,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -282,10 +439,23 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<TextContent> = sendTextMessage(chat.id, entities, linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
|
chatId = chat.id,
|
||||||
|
entities = entities,
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
* @param replyMarkup Some [dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||||
@@ -299,11 +469,24 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
|
chat = chat,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -318,8 +501,21 @@ public suspend fun TelegramBot.sendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
builderBody: EntitiesBuilderBody
|
builderBody: EntitiesBuilderBody
|
||||||
): ContentMessage<TextContent> = sendTextMessage(chat, buildEntities(separator, builderBody), linkPreviewOptions, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<TextContent> = sendTextMessage(
|
||||||
|
chat = chat,
|
||||||
|
entities = buildEntities(separator, builderBody),
|
||||||
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -23,18 +23,20 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = execute(
|
): ContentMessage<StaticLocationContent> = execute(
|
||||||
SendStaticLocation(
|
SendStaticLocation(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -52,20 +54,22 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
location.latitude,
|
latitude = location.latitude,
|
||||||
location.longitude,
|
longitude = location.longitude,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,20 +84,22 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
chat.id,
|
chatId = chat.id,
|
||||||
latitude,
|
latitude = latitude,
|
||||||
longitude,
|
longitude = longitude,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -107,20 +113,22 @@ public suspend fun TelegramBot.sendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
chat.id,
|
chatId = chat.id,
|
||||||
location.latitude,
|
latitude = location.latitude,
|
||||||
location.longitude,
|
longitude = location.longitude,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -135,10 +143,23 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(chatId, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
|
chatId = chatId,
|
||||||
|
latitude = latitude,
|
||||||
|
longitude = longitude,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -151,10 +172,23 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(chatId, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
|
chatId = chatId,
|
||||||
|
latitude = location.latitude,
|
||||||
|
longitude = location.longitude,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -168,10 +202,23 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(chat.id, latitude, longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
|
chatId = chat.id,
|
||||||
|
latitude = latitude,
|
||||||
|
longitude = longitude,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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 +231,20 @@ public suspend fun TelegramBot.sendStaticLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StaticLocationContent> = sendLocation(chat.id, location.latitude, location.longitude, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StaticLocationContent> = sendLocation(
|
||||||
|
chatId = chat.id,
|
||||||
|
latitude = location.latitude,
|
||||||
|
longitude = location.longitude,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -47,6 +48,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -71,6 +73,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -88,6 +91,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -110,6 +114,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -127,6 +132,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -149,6 +155,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -166,6 +173,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -182,6 +190,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -193,6 +202,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -210,6 +220,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -220,6 +231,7 @@ public suspend fun TelegramBot.sendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -21,12 +21,22 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = execute(
|
): ContentMessage<GameContent> = execute(
|
||||||
SendGame(
|
SendGame(
|
||||||
chatId, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
gameShortName = gameShortName,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,11 +51,21 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = sendGame(
|
): ContentMessage<GameContent> = sendGame(
|
||||||
chat.id, gameShortName, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chat.id,
|
||||||
|
gameShortName = gameShortName,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,11 +79,21 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = sendGame(
|
): ContentMessage<GameContent> = sendGame(
|
||||||
chatId, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
gameShortName = game.title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,9 +107,19 @@ public suspend fun TelegramBot.sendGame(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<GameContent> = sendGame(
|
): ContentMessage<GameContent> = sendGame(
|
||||||
chat.id, game.title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chat.id,
|
||||||
|
gameShortName = game.title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -51,6 +52,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -75,6 +77,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -93,6 +96,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -117,6 +121,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -135,6 +140,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -158,6 +164,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -175,6 +182,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -199,6 +207,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -217,6 +226,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -240,6 +250,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -257,6 +268,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -280,6 +292,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -297,6 +310,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -319,6 +333,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -335,6 +350,7 @@ public suspend fun TelegramBot.sendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -30,26 +30,28 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = execute(
|
): ContentMessage<AudioContent> = execute(
|
||||||
SendAudio(
|
SendAudio(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
audio,
|
audio = audio,
|
||||||
thumb,
|
thumbnail = thumb,
|
||||||
text,
|
text = text,
|
||||||
parseMode,
|
parseMode = parseMode,
|
||||||
duration,
|
duration = duration,
|
||||||
performer,
|
performer = performer,
|
||||||
title,
|
title = title,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -70,10 +72,28 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(chat.id, audio, thumb, text, parseMode, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
|
chatId = chat.id,
|
||||||
|
audio = audio,
|
||||||
|
thumb = thumb,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
duration = duration,
|
||||||
|
performer = performer,
|
||||||
|
title = title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -89,10 +109,28 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, text, parseMode, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
|
chatId = chatId,
|
||||||
|
audio = audio.fileId,
|
||||||
|
thumb = audio.thumbnail ?.fileId,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
duration = audio.duration,
|
||||||
|
performer = audio.performer,
|
||||||
|
title = title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -108,10 +146,25 @@ public suspend fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(chat.id, audio, text, parseMode, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
|
chatId = chat.id,
|
||||||
|
audio = audio,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
title = title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,25 +183,27 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = execute(
|
): ContentMessage<AudioContent> = execute(
|
||||||
SendAudio(
|
SendAudio(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
audio,
|
audio = audio,
|
||||||
thumb,
|
thumbnail = thumb,
|
||||||
entities,
|
entities = entities,
|
||||||
duration,
|
duration = duration,
|
||||||
performer,
|
performer = performer,
|
||||||
title,
|
title = title,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -168,10 +223,27 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(chat.id, audio, thumb, entities, duration, performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
|
chatId = chat.id,
|
||||||
|
audio = audio,
|
||||||
|
thumb = thumb,
|
||||||
|
entities = entities,
|
||||||
|
duration = duration,
|
||||||
|
performer = performer,
|
||||||
|
title = title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -186,10 +258,27 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(chatId, audio.fileId, audio.thumbnail ?.fileId, entities, audio.duration, audio.performer, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
|
chatId = chatId,
|
||||||
|
audio = audio.fileId,
|
||||||
|
thumb = audio.thumbnail ?.fileId,
|
||||||
|
entities = entities,
|
||||||
|
duration = audio.duration,
|
||||||
|
performer = audio.performer,
|
||||||
|
title = title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -204,7 +293,21 @@ public suspend inline fun TelegramBot.sendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<AudioContent> = sendAudio(chat.id, audio, entities, title, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<AudioContent> = sendAudio(
|
||||||
|
chatId = chat.id,
|
||||||
|
audio = audio,
|
||||||
|
entities = entities,
|
||||||
|
title = title,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -27,25 +27,27 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = execute(
|
): ContentMessage<DocumentContent> = execute(
|
||||||
SendDocument(
|
SendDocument(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
document,
|
document = document,
|
||||||
thumb,
|
thumbnail = thumb,
|
||||||
text,
|
text = text,
|
||||||
parseMode,
|
parseMode = parseMode,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup,
|
replyParameters = replyParameters,
|
||||||
disableContentTypeDetection
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -63,11 +65,27 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = sendDocument(chat.id, document, thumb, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
): ContentMessage<DocumentContent> = sendDocument(
|
||||||
|
chatId = chat.id,
|
||||||
|
document = document,
|
||||||
|
thumb = thumb,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = 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
|
||||||
@@ -82,12 +100,26 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = sendDocument(
|
): ContentMessage<DocumentContent> = sendDocument(
|
||||||
chatId, document.fileId, document.thumbnail ?.fileId, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection
|
chatId = chatId,
|
||||||
|
document = document.fileId,
|
||||||
|
thumb = document.thumbnail ?.fileId,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,11 +135,26 @@ public suspend fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = sendDocument(chat.id, document, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
): ContentMessage<DocumentContent> = sendDocument(
|
||||||
|
chatId = chat.id,
|
||||||
|
document = document,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = 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
|
||||||
@@ -122,24 +169,26 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = execute(
|
): ContentMessage<DocumentContent> = execute(
|
||||||
SendDocument(
|
SendDocument(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
document,
|
document = document,
|
||||||
thumb,
|
thumbnail = thumb,
|
||||||
entities,
|
entities = entities,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup,
|
replyParameters = replyParameters,
|
||||||
disableContentTypeDetection
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -156,11 +205,26 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = sendDocument(chat.id, document, thumb, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
): ContentMessage<DocumentContent> = sendDocument(
|
||||||
|
chatId = chat.id,
|
||||||
|
document = document,
|
||||||
|
thumb = thumb,
|
||||||
|
entities = entities,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = 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
|
||||||
@@ -174,12 +238,25 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = sendDocument(
|
): ContentMessage<DocumentContent> = sendDocument(
|
||||||
chatId, document.fileId, document.thumbnail ?.fileId, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection
|
chatId = chatId,
|
||||||
|
document = document.fileId,
|
||||||
|
thumb = document.thumbnail ?.fileId,
|
||||||
|
entities = entities,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -194,8 +271,22 @@ public suspend inline fun TelegramBot.sendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
disableContentTypeDetection: Boolean? = null
|
disableContentTypeDetection: Boolean? = null
|
||||||
): ContentMessage<DocumentContent> = sendDocument(chat.id, document, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup, disableContentTypeDetection)
|
): ContentMessage<DocumentContent> = sendDocument(
|
||||||
|
chatId = chat.id,
|
||||||
|
document = document,
|
||||||
|
entities = entities,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup,
|
||||||
|
disableContentTypeDetection = disableContentTypeDetection
|
||||||
|
)
|
||||||
|
|||||||
@@ -22,11 +22,20 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
|
||||||
SendMediaGroup<MediaGroupPartContent>(
|
SendMediaGroup<MediaGroupPartContent>(
|
||||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,10 +50,19 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,10 +77,19 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,10 +104,19 @@ public suspend fun TelegramBot.sendMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,11 +129,20 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = execute(
|
): ContentMessage<MediaGroupContent<AudioContent>> = execute(
|
||||||
SendPlaylist(
|
SendPlaylist(
|
||||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -111,10 +156,19 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,10 +182,19 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -145,10 +208,19 @@ public suspend fun TelegramBot.sendPlaylist(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -161,11 +233,20 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
|
||||||
SendDocumentsGroup(
|
SendDocumentsGroup(
|
||||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -179,10 +260,19 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -196,10 +286,19 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -213,10 +312,19 @@ public suspend fun TelegramBot.sendDocumentsGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -229,11 +337,20 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
|
||||||
SendVisualMediaGroup(
|
SendVisualMediaGroup(
|
||||||
chatId, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -247,10 +364,19 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -264,10 +390,19 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||||
chatId, media.map { it.toMediaGroupMemberTelegramMedia() }, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chatId,
|
||||||
|
media = media.map { it.toMediaGroupMemberTelegramMedia() },
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -281,8 +416,17 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
|
||||||
chat.id, media, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters
|
chatId = chat.id,
|
||||||
|
media = media,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = execute(
|
): ContentMessage<PaidMediaInfoContent> = execute(
|
||||||
@@ -43,6 +44,7 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -64,6 +66,7 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
||||||
@@ -78,6 +81,7 @@ public suspend fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -98,6 +102,7 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = execute(
|
): ContentMessage<PaidMediaInfoContent> = execute(
|
||||||
@@ -112,6 +117,7 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -132,6 +138,7 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
|
||||||
@@ -145,6 +152,7 @@ public suspend inline fun TelegramBot.sendPaidMedia(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -43,6 +44,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -64,6 +66,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -78,6 +81,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -98,6 +102,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -112,6 +117,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -132,6 +138,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -146,6 +153,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -166,6 +174,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -180,6 +189,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -200,6 +210,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -214,6 +225,7 @@ public suspend fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -234,6 +246,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -248,6 +261,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -268,6 +282,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -281,6 +296,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -300,6 +316,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -313,6 +330,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -332,6 +350,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -345,6 +364,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -364,6 +384,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -377,6 +398,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -396,6 +418,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -409,6 +432,7 @@ public suspend inline fun TelegramBot.sendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -23,11 +23,24 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = execute(
|
): ContentMessage<StickerContent> = execute(
|
||||||
SendSticker(chatId, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
SendSticker(
|
||||||
|
chatId = chatId,
|
||||||
|
sticker = sticker,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
emoji = emoji,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,10 +55,23 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = sendSticker(chat.id, sticker, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StickerContent> = sendSticker(
|
||||||
|
chatId = chat.id,
|
||||||
|
sticker = sticker,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
emoji = emoji,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -59,10 +85,23 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = sendSticker(chatId, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StickerContent> = sendSticker(
|
||||||
|
chatId = chatId,
|
||||||
|
sticker = sticker.fileId,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
emoji = emoji,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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 +115,20 @@ public suspend fun TelegramBot.sendSticker(
|
|||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<StickerContent> = sendSticker(chat, sticker.fileId, threadId, businessConnectionId, emoji, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<StickerContent> = sendSticker(
|
||||||
|
chat = chat,
|
||||||
|
sticker = sticker.fileId,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
emoji = emoji,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -52,6 +53,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -73,6 +75,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -91,6 +94,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -115,6 +119,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -133,6 +138,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -154,6 +160,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -168,6 +175,7 @@ public suspend fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -191,6 +199,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -210,6 +219,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -230,6 +240,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -247,6 +258,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -270,6 +282,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -287,6 +300,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -307,6 +321,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -320,6 +335,7 @@ public suspend inline fun TelegramBot.sendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -25,23 +25,25 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = execute(
|
): ContentMessage<VideoNoteContent> = execute(
|
||||||
SendVideoNote(
|
SendVideoNote(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
videoNote,
|
videoNote = videoNote,
|
||||||
thumb,
|
thumbnail = thumb,
|
||||||
duration,
|
duration = duration,
|
||||||
size,
|
size = size,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -56,11 +58,24 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||||
chatId, videoNote.fileId, videoNote.thumbnail ?.fileId, videoNote.duration, videoNote.width, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
videoNote = videoNote.fileId,
|
||||||
|
thumb = videoNote.thumbnail ?.fileId,
|
||||||
|
duration = videoNote.duration,
|
||||||
|
size = videoNote.width,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,10 +92,25 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = sendVideoNote(chat.id, videoNote, thumb, duration, size, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||||
|
chatId = chat.id,
|
||||||
|
videoNote = videoNote,
|
||||||
|
thumb = thumb,
|
||||||
|
duration = duration,
|
||||||
|
size = size,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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,7 +123,19 @@ public suspend fun TelegramBot.sendVideoNote(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VideoNoteContent> = sendVideoNote(chat.id, videoNote, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<VideoNoteContent> = sendVideoNote(
|
||||||
|
chatId = chat.id,
|
||||||
|
videoNote = videoNote,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -27,23 +27,25 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = execute(
|
): ContentMessage<VoiceContent> = execute(
|
||||||
SendVoice(
|
SendVoice(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
voice,
|
voice = voice,
|
||||||
text,
|
text = text,
|
||||||
parseMode,
|
parseMode = parseMode,
|
||||||
duration,
|
duration = duration,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -61,10 +63,25 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(chat.id, voice, text, parseMode, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
|
chatId = chat.id,
|
||||||
|
voice = voice,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
duration = duration,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -79,11 +96,24 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
chatId, voice.fileId, text, parseMode, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
voice = voice.fileId,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
duration = voice.duration,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,10 +129,24 @@ public suspend fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(chat.id, voice, text, parseMode, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
|
chatId = chat.id,
|
||||||
|
voice = voice,
|
||||||
|
text = text,
|
||||||
|
parseMode = parseMode,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -118,6 +162,7 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -131,6 +176,7 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
duration = duration,
|
duration = duration,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -150,10 +196,24 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(chat.id, voice, entities, duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
|
chatId = chat.id,
|
||||||
|
voice = voice,
|
||||||
|
entities = entities,
|
||||||
|
duration = duration,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -167,11 +227,23 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
chatId, voice.fileId, entities, voice.duration, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup
|
chatId = chatId,
|
||||||
|
voice = voice.fileId,
|
||||||
|
entities = entities,
|
||||||
|
duration = voice.duration,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = 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
|
||||||
@@ -185,7 +257,20 @@ public suspend inline fun TelegramBot.sendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<VoiceContent> = sendVoice(chat.id, voice, entities, threadId, businessConnectionId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<VoiceContent> = sendVoice(
|
||||||
|
chatId = chat.id,
|
||||||
|
voice = voice,
|
||||||
|
entities = entities,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|||||||
@@ -37,11 +37,38 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = execute(
|
): ContentMessage<InvoiceContent> = execute(
|
||||||
SendInvoice(chatId, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
SendInvoice(
|
||||||
|
chatId = chatId,
|
||||||
|
title = title,
|
||||||
|
description = description,
|
||||||
|
payload = payload,
|
||||||
|
providerToken = providerToken,
|
||||||
|
currency = currency,
|
||||||
|
prices = prices,
|
||||||
|
maxTipAmount = maxTipAmount,
|
||||||
|
suggestedTipAmounts = suggestedTipAmounts ?.sorted(),
|
||||||
|
startParameter = startParameter,
|
||||||
|
providerData = providerData,
|
||||||
|
requireName = requireName,
|
||||||
|
requirePhoneNumber = requirePhoneNumber,
|
||||||
|
requireEmail = requireEmail,
|
||||||
|
requireShippingAddress = requireShippingAddress,
|
||||||
|
shouldSendPhoneNumberToProvider = shouldSendPhoneNumberToProvider,
|
||||||
|
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||||
|
priceDependOnShipAddress = priceDependOnShipAddress,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -69,10 +96,37 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
priceDependOnShipAddress: Boolean = false,
|
priceDependOnShipAddress: Boolean = false,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = sendInvoice(user.id, title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts, startParameter, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, null, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
): ContentMessage<InvoiceContent> = sendInvoice(
|
||||||
|
chatId = user.id,
|
||||||
|
title = title,
|
||||||
|
description = description,
|
||||||
|
payload = payload,
|
||||||
|
providerToken = providerToken,
|
||||||
|
currency = currency,
|
||||||
|
prices = prices,
|
||||||
|
maxTipAmount = maxTipAmount,
|
||||||
|
suggestedTipAmounts = suggestedTipAmounts,
|
||||||
|
startParameter = startParameter,
|
||||||
|
providerData = providerData,
|
||||||
|
requireName = requireName,
|
||||||
|
requirePhoneNumber = requirePhoneNumber,
|
||||||
|
requireEmail = requireEmail,
|
||||||
|
requireShippingAddress = requireShippingAddress,
|
||||||
|
shouldSendPhoneNumberToProvider = shouldSendPhoneNumberToProvider,
|
||||||
|
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||||
|
priceDependOnShipAddress = priceDependOnShipAddress,
|
||||||
|
threadId = null,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -90,11 +144,27 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
): ContentMessage<InvoiceContent> = execute(
|
): ContentMessage<InvoiceContent> = execute(
|
||||||
SendInvoice(chatId, title, description, payload, price, startParameter, providerData, threadId, disableNotification, protectContent, effectId, replyParameters, replyMarkup)
|
SendInvoice(
|
||||||
|
chatId = chatId,
|
||||||
|
title = title,
|
||||||
|
description = description,
|
||||||
|
payload = payload,
|
||||||
|
price = price,
|
||||||
|
startParameter = startParameter,
|
||||||
|
providerData = providerData,
|
||||||
|
threadId = threadId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,6 +181,7 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
providerData: String? = null,
|
providerData: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
@@ -125,6 +196,7 @@ public suspend fun TelegramBot.sendInvoice(
|
|||||||
threadId = null,
|
threadId = null,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -29,29 +29,31 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
question,
|
question = question,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
explanation,
|
explanation = explanation,
|
||||||
questionParseMode,
|
questionParseMode = questionParseMode,
|
||||||
explanationParseMode,
|
explanationParseMode = explanationParseMode,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate,
|
closeDate = closeDate,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -70,28 +72,30 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
questionEntities,
|
questionEntities = questionEntities,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
explanation,
|
explanation = explanation,
|
||||||
explanationParseMode,
|
explanationParseMode = explanationParseMode,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate,
|
closeDate = closeDate,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -110,28 +114,30 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
question,
|
question = question,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
questionParseMode,
|
questionParseMode = questionParseMode,
|
||||||
explanationTextSources,
|
explanationTextSources = explanationTextSources,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate,
|
closeDate = closeDate,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -150,27 +156,29 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
questionEntities,
|
questionEntities = questionEntities,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
explanationTextSources,
|
explanationTextSources = explanationTextSources,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate,
|
closeDate = closeDate,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -189,28 +197,30 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
question,
|
question = question,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
closeInfo,
|
closeInfo = closeInfo,
|
||||||
explanation,
|
explanation = explanation,
|
||||||
questionParseMode,
|
questionParseMode = questionParseMode,
|
||||||
explanationParseMode,
|
explanationParseMode = explanationParseMode,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -228,27 +238,29 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
questionEntities,
|
questionEntities = questionEntities,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
closeInfo,
|
closeInfo = closeInfo,
|
||||||
explanation,
|
explanation = explanation,
|
||||||
explanationParseMode,
|
explanationParseMode = explanationParseMode,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -266,27 +278,29 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
question,
|
question = question,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
closeInfo,
|
closeInfo = closeInfo,
|
||||||
questionParseMode,
|
questionParseMode = questionParseMode,
|
||||||
explanationTextSources,
|
explanationTextSources = explanationTextSources,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -303,25 +317,27 @@ public suspend fun TelegramBot.sendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
questionEntities,
|
questionEntities = questionEntities,
|
||||||
options,
|
options = options,
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
closeInfo,
|
closeInfo = closeInfo,
|
||||||
explanationTextSources,
|
explanationTextSources = explanationTextSources,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -27,27 +27,29 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendRegularPoll(
|
SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
question,
|
question = question,
|
||||||
options,
|
options = options,
|
||||||
questionParseMode,
|
questionParseMode = questionParseMode,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate,
|
closeDate = closeDate,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -64,26 +66,28 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendRegularPoll(
|
SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
questionEntities,
|
questionEntities = questionEntities,
|
||||||
options,
|
options = options,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
openPeriod,
|
openPeriod = openPeriod,
|
||||||
closeDate,
|
closeDate = closeDate,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -100,26 +104,28 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendRegularPoll(
|
SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
question,
|
question = question,
|
||||||
options,
|
options = options,
|
||||||
closeInfo,
|
closeInfo = closeInfo,
|
||||||
questionParseMode,
|
questionParseMode = questionParseMode,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -135,24 +141,26 @@ public suspend fun TelegramBot.sendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): ContentMessage<PollContent> = execute(
|
): ContentMessage<PollContent> = execute(
|
||||||
SendRegularPoll(
|
SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
questionEntities,
|
questionTextSources = questionEntities,
|
||||||
options,
|
options = options,
|
||||||
closeInfo,
|
closeInfo = closeInfo,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -852,6 +852,15 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/ChatMe
|
|||||||
public static final fun getChatMemberUnsubscribedFilter ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun getChatMemberUnsubscribedFilter ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/CommonMessageFilterExcludeCommandKt {
|
||||||
|
public static final fun CommonMessageFilterExcludeCommand (Ljava/lang/String;Z)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
|
public static synthetic fun CommonMessageFilterExcludeCommand$default (Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/CommonMessageFilterIncludeTextKt {
|
||||||
|
public static final fun CommonMessageFilterIncludeText (Lkotlin/text/Regex;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/MessageFilterByChatKt {
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/MessageFilterByChatKt {
|
||||||
public static final fun getCallbackQueryFilterByUser ()Lkotlin/jvm/functions/Function4;
|
public static final fun getCallbackQueryFilterByUser ()Lkotlin/jvm/functions/Function4;
|
||||||
public static final fun getChatJoinRequestFilterByChat ()Lkotlin/jvm/functions/Function4;
|
public static final fun getChatJoinRequestFilterByChat ()Lkotlin/jvm/functions/Function4;
|
||||||
@@ -1488,9 +1497,11 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFi
|
|||||||
public static final fun listAll (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun listAll (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
public static final fun listAny (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun listAny (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
public static final fun listNone (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun listNone (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
|
public static final fun minus (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
public static final fun not (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun not (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
public static final fun plus (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun plus (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
public static final fun times (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun times (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
|
public static final fun unaryMinus (Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/SubcontextUpdatesFilterOperationsKt {
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/SubcontextUpdatesFilterOperationsKt {
|
||||||
@@ -1501,11 +1512,11 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/Subconte
|
|||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/extensions/EnablePrivacyPolicyCommandKt {
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/extensions/EnablePrivacyPolicyCommandKt {
|
||||||
public static final field DefaultKTgBotAPIPrivacyCommand Ljava/lang/String;
|
public static final field DefaultKTgBotAPIPrivacyCommand Ljava/lang/String;
|
||||||
public static final fun onCommandPrivacy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun onCommandPrivacy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public static final fun onCommandPrivacy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun onCommandPrivacy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public static final fun onCommandPrivacy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun onCommandPrivacy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public static synthetic fun onCommandPrivacy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun onCommandPrivacy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
public static synthetic fun onCommandPrivacy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun onCommandPrivacy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
public static synthetic fun onCommandPrivacy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun onCommandPrivacy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.filters
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.CommonMessageFilter
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.not
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.textedContentOrNull
|
||||||
|
import dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use as initialFilter. Will exclude messages with [excludedCommand] if it is not null, if null - all messages with commands.
|
||||||
|
* If [textBeginOnly] set to false, all commands inside of message will be taken in attention.
|
||||||
|
*
|
||||||
|
* **It is supposed, that you will pass command name without `/` or `!`**
|
||||||
|
*
|
||||||
|
* @param excludedCommand Pass non-null value to search specific command or null (default) to search any command
|
||||||
|
* @param textBeginOnly Pass true (default) to check only start of message. Pass false to search in whole text of
|
||||||
|
* content
|
||||||
|
*/
|
||||||
|
fun CommonMessageFilterExcludeCommand(
|
||||||
|
excludedCommand: String? = null,
|
||||||
|
textBeginOnly: Boolean = true
|
||||||
|
): CommonMessageFilter<*> {
|
||||||
|
return !CommonMessageFilterIncludeText(
|
||||||
|
when {
|
||||||
|
excludedCommand == null -> BotCommandTextSource.CommandRegex
|
||||||
|
textBeginOnly -> Regex("^[/!]$excludedCommand(\\s|$)")
|
||||||
|
!textBeginOnly -> Regex("[/!]$excludedCommand(\\s|$)")
|
||||||
|
else -> error("Unreachable code has been reached. It is error and must not happen")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.filters
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.CommonMessageFilter
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.textedContentOrNull
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Includes messages only contains text with [textRegex]
|
||||||
|
*/
|
||||||
|
fun CommonMessageFilterIncludeText(
|
||||||
|
textRegex: Regex,
|
||||||
|
): CommonMessageFilter<*> {
|
||||||
|
return CommonMessageFilter {
|
||||||
|
it.content.textedContentOrNull() ?.text ?.contains(textRegex) == true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -59,3 +59,14 @@ infix operator fun <T> SimpleFilter<T>?.plus(other: SimpleFilter<T>?): SimpleFil
|
|||||||
operator fun <T> SimpleFilter<T>.not() = SimpleFilter<T> {
|
operator fun <T> SimpleFilter<T>.not() = SimpleFilter<T> {
|
||||||
!this(it)
|
!this(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Works as [not]
|
||||||
|
*/
|
||||||
|
operator fun <T> SimpleFilter<T>.unaryMinus() = not()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Making +! operation. In fact that means that [other] will be inversed with [not] and that added to [this] via
|
||||||
|
* [plus]
|
||||||
|
*/
|
||||||
|
operator fun <T> SimpleFilter<T>?.minus(other: SimpleFilter<T>?): SimpleFilter<T> = this + (other ?.not())
|
||||||
|
|||||||
@@ -50,12 +50,14 @@ suspend fun <BC : BehaviourContext> BC.onCommandPrivacy(
|
|||||||
requireOnlyCommandInMessage: Boolean = true,
|
requireOnlyCommandInMessage: Boolean = true,
|
||||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
||||||
) = onCommandPrivacy(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory) {
|
) = onCommandPrivacy(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory) {
|
||||||
execute(
|
execute(
|
||||||
SendTextMessage(
|
SendTextMessage(
|
||||||
it.chat.id,
|
it.chat.id,
|
||||||
textSources,
|
textSources,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = ReplyParameters(it.metaInfo)
|
replyParameters = ReplyParameters(it.metaInfo)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -73,6 +75,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandPrivacy(
|
|||||||
requireOnlyCommandInMessage: Boolean = true,
|
requireOnlyCommandInMessage: Boolean = true,
|
||||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
||||||
) = onCommandPrivacy(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory) {
|
) = onCommandPrivacy(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory) {
|
||||||
execute(
|
execute(
|
||||||
@@ -80,6 +83,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandPrivacy(
|
|||||||
it.chat.id,
|
it.chat.id,
|
||||||
text,
|
text,
|
||||||
parseMode,
|
parseMode,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = ReplyParameters(it.metaInfo)
|
replyParameters = ReplyParameters(it.metaInfo)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
|||||||
|
package dev.inmo.tgbotapi.abstracts.types
|
||||||
|
|
||||||
|
interface AllowPaidBroadcast {
|
||||||
|
val allowPaidBroadcast: Boolean
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.bot.ktor
|
|||||||
|
|
||||||
import dev.inmo.kslog.common.KSLog
|
import dev.inmo.kslog.common.KSLog
|
||||||
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.middlewares.TelegramBotMiddlewaresPipelinesHandler
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter
|
import dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
@@ -24,7 +25,7 @@ expect class KtorRequestsExecutor internal constructor(
|
|||||||
excludeDefaultFactories: Boolean,
|
excludeDefaultFactories: Boolean,
|
||||||
requestsLimiter: RequestLimiter,
|
requestsLimiter: RequestLimiter,
|
||||||
jsonFormatter: Json,
|
jsonFormatter: Json,
|
||||||
pipelineStepsHolder: KtorPipelineStepsHolder,
|
pipelineStepsHolder: TelegramBotPipelinesHandler,
|
||||||
logger: KSLog,
|
logger: KSLog,
|
||||||
diff: Unit // just a diff property to know where constructor and where calling function with defaults
|
diff: Unit // just a diff property to know where constructor and where calling function with defaults
|
||||||
) : BaseRequestsExecutor {
|
) : BaseRequestsExecutor {
|
||||||
@@ -39,7 +40,7 @@ fun KtorRequestsExecutor(
|
|||||||
excludeDefaultFactories: Boolean = false,
|
excludeDefaultFactories: Boolean = false,
|
||||||
requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter,
|
requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter,
|
||||||
jsonFormatter: Json = nonstrictJsonFormat,
|
jsonFormatter: Json = nonstrictJsonFormat,
|
||||||
pipelineStepsHolder: KtorPipelineStepsHolder = KtorPipelineStepsHolder,
|
pipelineStepsHolder: TelegramBotPipelinesHandler = TelegramBotMiddlewaresPipelinesHandler(),
|
||||||
logger: KSLog = DefaultKTgBotAPIKSLog,
|
logger: KSLog = DefaultKTgBotAPIKSLog,
|
||||||
) = KtorRequestsExecutor(
|
) = KtorRequestsExecutor(
|
||||||
telegramAPIUrlsKeeper = telegramAPIUrlsKeeper,
|
telegramAPIUrlsKeeper = telegramAPIUrlsKeeper,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package dev.inmo.tgbotapi.bot.ktor
|
package dev.inmo.tgbotapi.bot.ktor
|
||||||
|
|
||||||
import dev.inmo.kslog.common.KSLog
|
import dev.inmo.kslog.common.KSLog
|
||||||
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
|
||||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||||
import dev.inmo.tgbotapi.bot.ktor.base.*
|
import dev.inmo.tgbotapi.bot.ktor.base.*
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.middlewares.TelegramBotMiddlewaresPipelinesHandler
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter
|
import dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
||||||
import dev.inmo.tgbotapi.utils.*
|
import dev.inmo.tgbotapi.utils.*
|
||||||
@@ -27,7 +27,11 @@ class KtorRequestsExecutorBuilder(
|
|||||||
var requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter
|
var requestsLimiter: RequestLimiter = ExceptionsOnlyLimiter
|
||||||
var jsonFormatter: Json = nonstrictJsonFormat
|
var jsonFormatter: Json = nonstrictJsonFormat
|
||||||
var logger: KSLog = DefaultKTgBotAPIKSLog
|
var logger: KSLog = DefaultKTgBotAPIKSLog
|
||||||
var pipelineStepsHolder: KtorPipelineStepsHolder = KtorPipelineStepsHolder
|
var pipelineStepsHolder: TelegramBotPipelinesHandler = TelegramBotMiddlewaresPipelinesHandler()
|
||||||
|
|
||||||
|
fun includeMiddlewares(block: TelegramBotMiddlewaresPipelinesHandler.Builder.() -> Unit) {
|
||||||
|
pipelineStepsHolder = TelegramBotMiddlewaresPipelinesHandler.build(block)
|
||||||
|
}
|
||||||
|
|
||||||
fun build() = KtorRequestsExecutor(
|
fun build() = KtorRequestsExecutor(
|
||||||
telegramAPIUrlsKeeper,
|
telegramAPIUrlsKeeper,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.bot.ktor
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
|
|
||||||
interface KtorPipelineStepsHolder {
|
interface TelegramBotPipelinesHandler {
|
||||||
/**
|
/**
|
||||||
* Will be called when any exception will happen due to the [request] handling. If returns value - that value
|
* Will be called when any exception will happen due to the [request] handling. If returns value - that value
|
||||||
* will be returned from [dev.inmo.tgbotapi.bot.RequestsExecutor.execute] instead
|
* will be returned from [dev.inmo.tgbotapi.bot.RequestsExecutor.execute] instead
|
||||||
@@ -68,7 +68,10 @@ interface KtorPipelineStepsHolder {
|
|||||||
result: Result<T>,
|
result: Result<T>,
|
||||||
request: Request<T>,
|
request: Request<T>,
|
||||||
callsFactories: List<KtorCallFactory>
|
callsFactories: List<KtorCallFactory>
|
||||||
): T = result.getOrThrow()
|
): Result<T> = result
|
||||||
|
|
||||||
companion object : KtorPipelineStepsHolder
|
companion object : TelegramBotPipelinesHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated("Renamed", ReplaceWith("TelegramBotPipelinesHandler", "dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler"))
|
||||||
|
typealias KtorPipelineStepsHolder = TelegramBotPipelinesHandler
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.bot.ktor.base
|
package dev.inmo.tgbotapi.bot.ktor.base
|
||||||
|
|
||||||
import dev.inmo.kslog.common.*
|
import dev.inmo.kslog.common.*
|
||||||
import dev.inmo.micro_utils.coroutines.defaultSafelyExceptionHandler
|
|
||||||
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
||||||
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
||||||
import dev.inmo.tgbotapi.bot.exceptions.BotException
|
import dev.inmo.tgbotapi.bot.exceptions.BotException
|
||||||
@@ -9,15 +8,12 @@ import dev.inmo.tgbotapi.bot.exceptions.CommonBotException
|
|||||||
import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
|
import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
|
||||||
import dev.inmo.tgbotapi.bot.exceptions.newRequestException
|
import dev.inmo.tgbotapi.bot.exceptions.newRequestException
|
||||||
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
||||||
import dev.inmo.tgbotapi.bot.ktor.KtorPipelineStepsHolder
|
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
|
||||||
import dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutor
|
|
||||||
import dev.inmo.tgbotapi.bot.ktor.createTelegramBotDefaultKtorCallRequestsFactories
|
import dev.inmo.tgbotapi.bot.ktor.createTelegramBotDefaultKtorCallRequestsFactories
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter
|
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.types.Response
|
import dev.inmo.tgbotapi.types.Response
|
||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
import dev.inmo.tgbotapi.utils.nonstrictJsonFormat
|
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import io.ktor.client.plugins.*
|
import io.ktor.client.plugins.*
|
||||||
import io.ktor.client.statement.*
|
import io.ktor.client.statement.*
|
||||||
@@ -30,7 +26,7 @@ class DefaultKtorRequestsExecutor internal constructor(
|
|||||||
excludeDefaultFactories: Boolean,
|
excludeDefaultFactories: Boolean,
|
||||||
private val requestsLimiter: RequestLimiter,
|
private val requestsLimiter: RequestLimiter,
|
||||||
private val jsonFormatter: Json,
|
private val jsonFormatter: Json,
|
||||||
private val pipelineStepsHolder: KtorPipelineStepsHolder,
|
private val pipelineStepsHolder: TelegramBotPipelinesHandler,
|
||||||
private val logger: KSLog,
|
private val logger: KSLog,
|
||||||
diff: Unit
|
diff: Unit
|
||||||
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
||||||
@@ -51,7 +47,7 @@ class DefaultKtorRequestsExecutor internal constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun <T : Any> execute(request: Request<T>): T {
|
override suspend fun <T : Any> execute(request: Request<T>): T {
|
||||||
return runCatchingSafely {
|
return runCatching {
|
||||||
logger.v { "Start request $request" }
|
logger.v { "Start request $request" }
|
||||||
pipelineStepsHolder.onBeforeSearchCallFactory(request, callsFactories)
|
pipelineStepsHolder.onBeforeSearchCallFactory(request, callsFactories)
|
||||||
requestsLimiter.limit(request) {
|
requestsLimiter.limit(request) {
|
||||||
@@ -110,7 +106,7 @@ class DefaultKtorRequestsExecutor internal constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ?.let { Result.failure(it) } ?: it
|
} ?.let { Result.failure(it) } ?: it
|
||||||
pipelineStepsHolder.onRequestReturnResult(result, request, callsFactories).also {
|
pipelineStepsHolder.onRequestReturnResult(result, request, callsFactories).getOrThrow().also {
|
||||||
logger.v { "Result of handling $request: $it" }
|
logger.v { "Result of handling $request: $it" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ import dev.inmo.tgbotapi.utils.ByteReadChannelAllocator
|
|||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
import io.ktor.client.HttpClient
|
import io.ktor.client.HttpClient
|
||||||
import io.ktor.client.call.receive
|
|
||||||
import io.ktor.client.request.get
|
import io.ktor.client.request.get
|
||||||
import io.ktor.client.statement.HttpStatement
|
|
||||||
import io.ktor.client.statement.bodyAsChannel
|
import io.ktor.client.statement.bodyAsChannel
|
||||||
import io.ktor.utils.io.*
|
import io.ktor.utils.io.*
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import dev.inmo.tgbotapi.requests.DownloadFile
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
import io.ktor.client.HttpClient
|
import io.ktor.client.*
|
||||||
import io.ktor.client.request.get
|
import io.ktor.client.request.*
|
||||||
import io.ktor.client.statement.readBytes
|
import io.ktor.client.statement.*
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
|
||||||
@RiskFeature
|
@RiskFeature
|
||||||
@@ -17,13 +17,13 @@ object DownloadFileRequestCallFactory : KtorCallFactory {
|
|||||||
client: HttpClient,
|
client: HttpClient,
|
||||||
urlsKeeper: TelegramAPIUrlsKeeper,
|
urlsKeeper: TelegramAPIUrlsKeeper,
|
||||||
request: Request<T>,
|
request: Request<T>,
|
||||||
jsonFormatter: Json
|
jsonFormatter: Json,
|
||||||
): T? = (request as? DownloadFile) ?.let {
|
): T? = (request as? DownloadFile)?.let {
|
||||||
val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath)
|
val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath)
|
||||||
|
|
||||||
safely {
|
safely {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
client.get(fullUrl).readBytes() as T // always ByteArray
|
client.get(fullUrl).readRawBytes() as T // always ByteArray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,10 @@ import dev.inmo.kslog.common.KSLog
|
|||||||
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
||||||
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
|
||||||
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
||||||
import dev.inmo.tgbotapi.bot.ktor.KtorPipelineStepsHolder
|
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
|
||||||
import dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutor
|
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.ExceptionsOnlyLimiter
|
|
||||||
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
import dev.inmo.tgbotapi.bot.settings.limiters.RequestLimiter
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||||
import dev.inmo.tgbotapi.utils.nonstrictJsonFormat
|
|
||||||
import io.ktor.client.*
|
import io.ktor.client.*
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
import kotlinx.coroutines.flow.MutableStateFlow
|
||||||
import kotlinx.coroutines.flow.first
|
import kotlinx.coroutines.flow.first
|
||||||
@@ -41,16 +38,16 @@ internal expect inline fun platformClientCopy(client: HttpClient): HttpClient
|
|||||||
* @param requestExecutorsCount Amount of [DefaultKtorRequestsExecutor] which will be created and used under the
|
* @param requestExecutorsCount Amount of [DefaultKtorRequestsExecutor] which will be created and used under the
|
||||||
* hood
|
* hood
|
||||||
*/
|
*/
|
||||||
class MultipleClientKtorRequestsExecutor (
|
class MultipleClientKtorRequestsExecutor(
|
||||||
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
|
||||||
callsFactories: List<KtorCallFactory>,
|
callsFactories: List<KtorCallFactory>,
|
||||||
excludeDefaultFactories: Boolean,
|
excludeDefaultFactories: Boolean,
|
||||||
requestsLimiter: RequestLimiter,
|
requestsLimiter: RequestLimiter,
|
||||||
jsonFormatter: Json,
|
jsonFormatter: Json,
|
||||||
pipelineStepsHolder: KtorPipelineStepsHolder,
|
pipelineStepsHolder: TelegramBotPipelinesHandler,
|
||||||
requestExecutorsCount: Int,
|
requestExecutorsCount: Int,
|
||||||
logger: KSLog,
|
logger: KSLog,
|
||||||
clientFactory: () -> HttpClient
|
clientFactory: () -> HttpClient,
|
||||||
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
||||||
private val requestExecutors = (0 until requestExecutorsCount).map {
|
private val requestExecutors = (0 until requestExecutorsCount).map {
|
||||||
DefaultKtorRequestsExecutor(
|
DefaultKtorRequestsExecutor(
|
||||||
@@ -69,7 +66,7 @@ class MultipleClientKtorRequestsExecutor (
|
|||||||
private val clientAllocationMutex = Mutex()
|
private val clientAllocationMutex = Mutex()
|
||||||
private val takerFlow = freeClients.mapNotNull {
|
private val takerFlow = freeClients.mapNotNull {
|
||||||
clientAllocationMutex.withLock {
|
clientAllocationMutex.withLock {
|
||||||
freeClients.value.firstOrNull() ?.also {
|
freeClients.value.firstOrNull()?.also {
|
||||||
freeClients.value -= it
|
freeClients.value -= it
|
||||||
} ?: return@mapNotNull null
|
} ?: return@mapNotNull null
|
||||||
}
|
}
|
||||||
@@ -82,9 +79,9 @@ class MultipleClientKtorRequestsExecutor (
|
|||||||
excludeDefaultFactories: Boolean,
|
excludeDefaultFactories: Boolean,
|
||||||
requestsLimiter: RequestLimiter,
|
requestsLimiter: RequestLimiter,
|
||||||
jsonFormatter: Json,
|
jsonFormatter: Json,
|
||||||
pipelineStepsHolder: KtorPipelineStepsHolder,
|
pipelineStepsHolder: TelegramBotPipelinesHandler,
|
||||||
logger: KSLog,
|
logger: KSLog,
|
||||||
diff: Unit
|
diff: Unit,
|
||||||
) : this(
|
) : this(
|
||||||
telegramAPIUrlsKeeper,
|
telegramAPIUrlsKeeper,
|
||||||
callsFactories,
|
callsFactories,
|
||||||
@@ -92,7 +89,7 @@ class MultipleClientKtorRequestsExecutor (
|
|||||||
requestsLimiter,
|
requestsLimiter,
|
||||||
jsonFormatter,
|
jsonFormatter,
|
||||||
pipelineStepsHolder,
|
pipelineStepsHolder,
|
||||||
client.engineConfig.threadsCount,
|
requestExecutorsCount = 4, // default threads count; configurable through dispatcher property
|
||||||
logger,
|
logger,
|
||||||
{ platformClientCopy(client) }
|
{ platformClientCopy(client) }
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package dev.inmo.tgbotapi.bot.ktor.middlewares
|
||||||
|
|
||||||
|
import com.benasher44.uuid.uuid4
|
||||||
|
import dev.inmo.micro_utils.common.Warning
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param onRequestException Will be called when some exception happen during [Request] handling. Non-null result of
|
||||||
|
* lambda will be used as the result of request handling
|
||||||
|
* @param onBeforeSearchCallFactory Will be called when telegram bot starts to choose which [KtorCallFactory] will handle
|
||||||
|
* [Request]
|
||||||
|
* @param onBeforeCallFactoryMakeCall Will be called when telegram bot trying to use [KtorCallFactory] as potential
|
||||||
|
* handler for [Request]
|
||||||
|
* @param onAfterCallFactoryMakeCall Will be called when [KtorCallFactory] made call. Non-null result of
|
||||||
|
* lambda will be used as the result of request handling
|
||||||
|
* @param onRequestResultPresented Will be called when [KtorCallFactory] **or** [TelegramBotPipelinesHandler]/[TelegramBotMiddleware]
|
||||||
|
* returned non-null result. Non-null result of lambda will be used as the result of request handling
|
||||||
|
* @param onRequestResultAbsent Will be called when some there is no any result of [Request] handling. Non-null result of
|
||||||
|
* lambda will be used as the result of request handling
|
||||||
|
* @param onRequestReturnResult Latest lambda before result returning. Will be called after all previous stages.
|
||||||
|
* Non-null result of lambda will be used as the result of request handling
|
||||||
|
*/
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
open class TelegramBotMiddleware(
|
||||||
|
internal val onRequestException: (suspend (request: Request<*>, t: Throwable?) -> Any?)? = null,
|
||||||
|
internal val onBeforeSearchCallFactory: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit)? = null,
|
||||||
|
internal val onBeforeCallFactoryMakeCall: (suspend (request: Request<*>, potentialFactory: KtorCallFactory) -> Unit)? = null,
|
||||||
|
internal val onAfterCallFactoryMakeCall: (suspend (result: Any?, request: Request<*>, potentialFactory: KtorCallFactory) -> Any?)? = null,
|
||||||
|
internal val onRequestResultPresented: (suspend (result: Any, request: Request<*>, resultCallFactory: KtorCallFactory, callsFactories: List<KtorCallFactory>) -> Any?)? = null,
|
||||||
|
internal val onRequestResultAbsent: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Any?)? = null,
|
||||||
|
internal val onRequestReturnResult: (suspend (result: Result<*>, request: Request<*>, callsFactories: List<KtorCallFactory>) -> Result<Any?>?)? = null,
|
||||||
|
val id: String = uuid4().toString()
|
||||||
|
) : TelegramBotPipelinesHandler {
|
||||||
|
object ResultAbsence : Throwable()
|
||||||
|
override suspend fun <T : Any> onRequestException(request: Request<T>, t: Throwable): T? {
|
||||||
|
return onRequestException ?.invoke(request, t) as? T
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun onBeforeSearchCallFactory(request: Request<*>, callsFactories: List<KtorCallFactory>) {
|
||||||
|
onBeforeSearchCallFactory ?.invoke(request, callsFactories)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun onBeforeCallFactoryMakeCall(request: Request<*>, potentialFactory: KtorCallFactory) {
|
||||||
|
onBeforeCallFactoryMakeCall ?.invoke(request, potentialFactory)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onAfterCallFactoryMakeCall(
|
||||||
|
result: T?,
|
||||||
|
request: Request<T>,
|
||||||
|
potentialFactory: KtorCallFactory
|
||||||
|
): T? {
|
||||||
|
return onAfterCallFactoryMakeCall ?.invoke(result, request, potentialFactory) as? T
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onRequestResultPresented(
|
||||||
|
result: T,
|
||||||
|
request: Request<T>,
|
||||||
|
resultCallFactory: KtorCallFactory,
|
||||||
|
callsFactories: List<KtorCallFactory>
|
||||||
|
): T? {
|
||||||
|
return onRequestResultPresented ?.invoke(result, request, resultCallFactory, callsFactories) as? T
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onRequestResultAbsent(
|
||||||
|
request: Request<T>,
|
||||||
|
callsFactories: List<KtorCallFactory>
|
||||||
|
): T? {
|
||||||
|
return onRequestResultAbsent ?.invoke(request, callsFactories) as? T
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onRequestReturnResult(
|
||||||
|
result: Result<T>,
|
||||||
|
request: Request<T>,
|
||||||
|
callsFactories: List<KtorCallFactory>
|
||||||
|
): Result<T> {
|
||||||
|
return onRequestReturnResult ?.invoke(result, request, callsFactories) as? Result<T> ?: Result.failure(ResultAbsence)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
fun build(block: TelegramBotMiddlewareBuilder.() -> Unit): TelegramBotMiddleware = TelegramBotMiddlewareBuilder().apply(block).build()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package dev.inmo.tgbotapi.bot.ktor.middlewares
|
||||||
|
|
||||||
|
import com.benasher44.uuid.uuid4
|
||||||
|
import dev.inmo.micro_utils.common.Warning
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
|
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
class TelegramBotMiddlewareBuilder {
|
||||||
|
var onRequestException: (suspend (request: Request<*>, t: Throwable?) -> Any?)? = null
|
||||||
|
var onBeforeSearchCallFactory: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit)? = null
|
||||||
|
var onBeforeCallFactoryMakeCall: (suspend (request: Request<*>, potentialFactory: KtorCallFactory) -> Unit)? = null
|
||||||
|
var onAfterCallFactoryMakeCall: (suspend (result: Any?, request: Request<*>, potentialFactory: KtorCallFactory) -> Any?)? = null
|
||||||
|
var onRequestResultPresented: (suspend (result: Any, request: Request<*>, resultCallFactory: KtorCallFactory, callsFactories: List<KtorCallFactory>) -> Any?)? = null
|
||||||
|
var onRequestResultAbsent: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Any?)? = null
|
||||||
|
var onRequestReturnResult: (suspend (result: Result<*>, request: Request<*>, callsFactories: List<KtorCallFactory>) -> Result<Any?>?)? = null
|
||||||
|
var id: String = uuid4().toString()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Useful way to set [onRequestException]
|
||||||
|
*/
|
||||||
|
fun doOnRequestException(block: suspend (request: Request<*>, t: Throwable?) -> Any?) {
|
||||||
|
onRequestException = block
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Useful way to set [onBeforeSearchCallFactory]
|
||||||
|
*/
|
||||||
|
fun doOnBeforeSearchCallFactory(block: suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit) {
|
||||||
|
onBeforeSearchCallFactory = block
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Useful way to set [onBeforeCallFactoryMakeCall]
|
||||||
|
*/
|
||||||
|
fun doOnBeforeCallFactoryMakeCall(block: suspend (request: Request<*>, potentialFactory: KtorCallFactory) -> Unit) {
|
||||||
|
onBeforeCallFactoryMakeCall = block
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Useful way to set [onAfterCallFactoryMakeCall]
|
||||||
|
*/
|
||||||
|
fun doOnAfterCallFactoryMakeCall(block: suspend (result: Any?, request: Request<*>, potentialFactory: KtorCallFactory) -> Any?) {
|
||||||
|
onAfterCallFactoryMakeCall = block
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Useful way to set [onRequestResultPresented]
|
||||||
|
*/
|
||||||
|
fun doOnRequestResultPresented(block: suspend (result: Any, request: Request<*>, resultCallFactory: KtorCallFactory, callsFactories: List<KtorCallFactory>) -> Any?) {
|
||||||
|
onRequestResultPresented = block
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Useful way to set [onRequestResultAbsent]
|
||||||
|
*/
|
||||||
|
fun doOnRequestResultAbsent(block: suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Any?) {
|
||||||
|
onRequestResultAbsent = block
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Useful way to set [onRequestReturnResult]
|
||||||
|
*/
|
||||||
|
fun doOnRequestReturnResult(block: suspend (result: Result<*>, request: Request<*>, callsFactories: List<KtorCallFactory>) -> Result<Any?>?) {
|
||||||
|
onRequestReturnResult = block
|
||||||
|
}
|
||||||
|
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
fun build(): TelegramBotMiddleware {
|
||||||
|
return TelegramBotMiddleware(
|
||||||
|
onRequestException = onRequestException,
|
||||||
|
onBeforeSearchCallFactory = onBeforeSearchCallFactory,
|
||||||
|
onBeforeCallFactoryMakeCall = onBeforeCallFactoryMakeCall,
|
||||||
|
onAfterCallFactoryMakeCall = onAfterCallFactoryMakeCall,
|
||||||
|
onRequestResultPresented = onRequestResultPresented,
|
||||||
|
onRequestResultAbsent = onRequestResultAbsent,
|
||||||
|
onRequestReturnResult = onRequestReturnResult,
|
||||||
|
id = id
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
fun from(middleware: TelegramBotMiddleware, additionalSetup: TelegramBotMiddlewareBuilder.() -> Unit): TelegramBotMiddleware {
|
||||||
|
return TelegramBotMiddlewareBuilder().apply {
|
||||||
|
onRequestException = middleware.onRequestException
|
||||||
|
onBeforeSearchCallFactory = middleware.onBeforeSearchCallFactory
|
||||||
|
onBeforeCallFactoryMakeCall = middleware.onBeforeCallFactoryMakeCall
|
||||||
|
onAfterCallFactoryMakeCall = middleware.onAfterCallFactoryMakeCall
|
||||||
|
onRequestResultPresented = middleware.onRequestResultPresented
|
||||||
|
onRequestResultAbsent = middleware.onRequestResultAbsent
|
||||||
|
onRequestReturnResult = middleware.onRequestReturnResult
|
||||||
|
id = middleware.id
|
||||||
|
additionalSetup()
|
||||||
|
}.build()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package dev.inmo.tgbotapi.bot.ktor.middlewares
|
||||||
|
|
||||||
|
import dev.inmo.micro_utils.common.Warning
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.middlewares.builtins.ExceptionsThrottlerTelegramBotMiddleware
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
|
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
class TelegramBotMiddlewaresPipelinesHandler(
|
||||||
|
private val middlewares: List<TelegramBotMiddleware> = emptyList()
|
||||||
|
) : TelegramBotPipelinesHandler {
|
||||||
|
override suspend fun <T : Any> onRequestException(request: Request<T>, t: Throwable): T? {
|
||||||
|
return middlewares.firstNotNullOfOrNull {
|
||||||
|
it.onRequestException(request, t)
|
||||||
|
} ?: super.onRequestException(request, t)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun onBeforeSearchCallFactory(request: Request<*>, callsFactories: List<KtorCallFactory>) {
|
||||||
|
middlewares.forEach {
|
||||||
|
it.onBeforeSearchCallFactory(request, callsFactories)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun onBeforeCallFactoryMakeCall(request: Request<*>, potentialFactory: KtorCallFactory) {
|
||||||
|
middlewares.forEach {
|
||||||
|
it.onBeforeCallFactoryMakeCall(request, potentialFactory)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onAfterCallFactoryMakeCall(
|
||||||
|
result: T?,
|
||||||
|
request: Request<T>,
|
||||||
|
potentialFactory: KtorCallFactory
|
||||||
|
): T? {
|
||||||
|
return middlewares.firstNotNullOfOrNull {
|
||||||
|
it.onAfterCallFactoryMakeCall(result, request, potentialFactory)
|
||||||
|
} ?: super.onAfterCallFactoryMakeCall(result, request, potentialFactory)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onRequestResultPresented(
|
||||||
|
result: T,
|
||||||
|
request: Request<T>,
|
||||||
|
resultCallFactory: KtorCallFactory,
|
||||||
|
callsFactories: List<KtorCallFactory>
|
||||||
|
): T? {
|
||||||
|
return middlewares.firstNotNullOfOrNull {
|
||||||
|
it.onRequestResultPresented(result, request, resultCallFactory, callsFactories)
|
||||||
|
} ?: super.onRequestResultPresented(result, request, resultCallFactory, callsFactories)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onRequestResultAbsent(
|
||||||
|
request: Request<T>,
|
||||||
|
callsFactories: List<KtorCallFactory>
|
||||||
|
): T? {
|
||||||
|
return middlewares.firstNotNullOfOrNull {
|
||||||
|
it.onRequestResultAbsent(request, callsFactories)
|
||||||
|
} ?: super.onRequestResultAbsent(request, callsFactories)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun <T : Any> onRequestReturnResult(
|
||||||
|
result: Result<T>,
|
||||||
|
request: Request<T>,
|
||||||
|
callsFactories: List<KtorCallFactory>
|
||||||
|
): Result<T> {
|
||||||
|
return middlewares.firstNotNullOfOrNull {
|
||||||
|
it.onRequestReturnResult(result, request, callsFactories).takeIf {
|
||||||
|
it.onFailure { return@takeIf it !is TelegramBotMiddleware.ResultAbsence }
|
||||||
|
true
|
||||||
|
}
|
||||||
|
} ?: super.onRequestReturnResult(result, request, callsFactories)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
class Builder {
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
val middlewares = mutableListOf<TelegramBotMiddleware>()
|
||||||
|
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
fun addMiddleware(block: TelegramBotMiddlewareBuilder.() -> Unit) = middlewares.add(
|
||||||
|
TelegramBotMiddleware.build(block)
|
||||||
|
)
|
||||||
|
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
fun build(): TelegramBotMiddlewaresPipelinesHandler = TelegramBotMiddlewaresPipelinesHandler(
|
||||||
|
middlewares.toList()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@Warning("This API is experimental and subject of changes")
|
||||||
|
fun build(block: Builder.() -> Unit) = Builder().apply(block).build()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package dev.inmo.tgbotapi.bot.ktor.middlewares.builtins
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.bot.ktor.middlewares.TelegramBotMiddleware
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
|
import korlibs.time.milliseconds
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
import kotlinx.coroutines.sync.Mutex
|
||||||
|
import kotlinx.coroutines.sync.withLock
|
||||||
|
import kotlin.reflect.KClass
|
||||||
|
import kotlin.time.Duration
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see invoke
|
||||||
|
*/
|
||||||
|
object ExceptionsThrottlerTelegramBotMiddleware {
|
||||||
|
const val id: String = "ExceptionsThrottlerTelegramBotMiddleware"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates [TelegramBotMiddleware] and configures it with next parameters:
|
||||||
|
*
|
||||||
|
* * [TelegramBotMiddleware.onRequestException] will throttle after exception if exception has happened before
|
||||||
|
* * [TelegramBotMiddleware.onRequestReturnResult] will clear state of all exceptions happened with the [Request] if its
|
||||||
|
* handling has been completed successfully
|
||||||
|
*/
|
||||||
|
operator fun invoke(
|
||||||
|
exceptionDurationMultiplier: Float = 2f,
|
||||||
|
initialExceptionDuration: Duration = 125.milliseconds,
|
||||||
|
): TelegramBotMiddleware = TelegramBotMiddleware.build {
|
||||||
|
val exceptionsTimeouts = mutableMapOf<KClass<*>, Duration>()
|
||||||
|
val latestExceptionsRequestsTypes = mutableMapOf<KClass<*>, MutableSet<KClass<*>>>()
|
||||||
|
val mutex = Mutex()
|
||||||
|
onRequestException = onRequestException@{ request, t ->
|
||||||
|
t ?: return@onRequestException null
|
||||||
|
val kclass = t::class
|
||||||
|
val toSleep = mutex.withLock {
|
||||||
|
val latestDuration = exceptionsTimeouts[kclass]
|
||||||
|
exceptionsTimeouts[kclass] = latestDuration ?.times(exceptionDurationMultiplier.toDouble()) ?: initialExceptionDuration
|
||||||
|
latestExceptionsRequestsTypes.getOrPut(request::class) { mutableSetOf() }.add(kclass)
|
||||||
|
latestDuration
|
||||||
|
}
|
||||||
|
toSleep ?.let {
|
||||||
|
delay(it)
|
||||||
|
}
|
||||||
|
null
|
||||||
|
}
|
||||||
|
onRequestReturnResult = onRequestReturnResult@{ result, request, _ ->
|
||||||
|
if (result.isSuccess) {
|
||||||
|
mutex.withLock {
|
||||||
|
val exceptionKClass = latestExceptionsRequestsTypes.remove(request::class) ?: return@withLock
|
||||||
|
exceptionKClass.forEach {
|
||||||
|
exceptionsTimeouts.remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
null
|
||||||
|
}
|
||||||
|
id = ExceptionsThrottlerTelegramBotMiddleware.id
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,16 +24,74 @@ import kotlinx.serialization.*
|
|||||||
|
|
||||||
const val OrderChangingDeprecationWarn = "The order of parameters in this factory will be changed soon. To avoid unexpected behaviour, swap message id and target chat id parameters"
|
const val OrderChangingDeprecationWarn = "The order of parameters in this factory will be changed soon. To avoid unexpected behaviour, swap message id and target chat id parameters"
|
||||||
|
|
||||||
|
//fun CopyMessage(
|
||||||
|
// toChatId: ChatIdentifier,
|
||||||
|
// fromChatId: ChatIdentifier,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// text: String? = null,
|
||||||
|
// parseMode: ParseMode? = null,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//) = CopyMessage(
|
||||||
|
// toChatId = toChatId,
|
||||||
|
// fromChatId = fromChatId,
|
||||||
|
// messageId = messageId,
|
||||||
|
// text = text,
|
||||||
|
// parseMode = parseMode,
|
||||||
|
// rawEntities = null,
|
||||||
|
// showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
// threadId = threadId,
|
||||||
|
// disableNotification = disableNotification,
|
||||||
|
// protectContent = protectContent,
|
||||||
|
// allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
// replyParameters = replyParameters,
|
||||||
|
// replyMarkup = replyMarkup
|
||||||
|
//)
|
||||||
|
//
|
||||||
|
//fun CopyMessage(
|
||||||
|
// toChatId: ChatIdentifier,
|
||||||
|
// fromChatId: ChatIdentifier,
|
||||||
|
// messageId: MessageId,
|
||||||
|
// entities: List<TextSource>,
|
||||||
|
// showCaptionAboveMedia: Boolean = false,
|
||||||
|
// threadId: MessageThreadId? = toChatId.threadId,
|
||||||
|
// disableNotification: Boolean = false,
|
||||||
|
// protectContent: Boolean = false,
|
||||||
|
// allowPaidBroadcast: Boolean = false,
|
||||||
|
// replyParameters: ReplyParameters? = null,
|
||||||
|
// replyMarkup: KeyboardMarkup? = null
|
||||||
|
//) = CopyMessage(
|
||||||
|
// toChatId = toChatId,
|
||||||
|
// fromChatId = fromChatId,
|
||||||
|
// messageId = messageId,
|
||||||
|
// text = entities.makeString(),
|
||||||
|
// parseMode = null,
|
||||||
|
// rawEntities = entities.toRawMessageEntities(),
|
||||||
|
// showCaptionAboveMedia = showCaptionAboveMedia,
|
||||||
|
// threadId = threadId,
|
||||||
|
// disableNotification = disableNotification,
|
||||||
|
// protectContent = protectContent,
|
||||||
|
// allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
// replyParameters = replyParameters,
|
||||||
|
// replyMarkup = replyMarkup
|
||||||
|
//)
|
||||||
|
|
||||||
fun CopyMessage(
|
fun CopyMessage(
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
fromChatId: ChatIdentifier,
|
fromChatId: ChatIdentifier,
|
||||||
messageId: MessageId,
|
messageId: MessageId,
|
||||||
|
toChatId: ChatIdentifier,
|
||||||
text: String? = null,
|
text: String? = null,
|
||||||
parseMode: ParseMode? = null,
|
parseMode: ParseMode? = null,
|
||||||
showCaptionAboveMedia: Boolean = false,
|
showCaptionAboveMedia: Boolean = false,
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = CopyMessage(
|
) = CopyMessage(
|
||||||
@@ -47,59 +105,7 @@ fun CopyMessage(
|
|||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
replyParameters = replyParameters,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyMarkup = replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
fun CopyMessage(
|
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
fromChatId: ChatIdentifier,
|
|
||||||
messageId: MessageId,
|
|
||||||
entities: List<TextSource>,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
) = CopyMessage(
|
|
||||||
toChatId = toChatId,
|
|
||||||
fromChatId = fromChatId,
|
|
||||||
messageId = messageId,
|
|
||||||
text = entities.makeString(),
|
|
||||||
parseMode = null,
|
|
||||||
rawEntities = entities.toRawMessageEntities(),
|
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
|
||||||
threadId = threadId,
|
|
||||||
disableNotification = disableNotification,
|
|
||||||
protectContent = protectContent,
|
|
||||||
replyParameters = replyParameters,
|
|
||||||
replyMarkup = replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
fun CopyMessage(
|
|
||||||
fromChatId: ChatIdentifier,
|
|
||||||
messageId: MessageId,
|
|
||||||
toChatId: ChatIdentifier,
|
|
||||||
text: String? = null,
|
|
||||||
parseMode: ParseMode? = null,
|
|
||||||
showCaptionAboveMedia: Boolean = false,
|
|
||||||
threadId: MessageThreadId? = toChatId.threadId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
) = CopyMessage(
|
|
||||||
toChatId = toChatId,
|
|
||||||
fromChatId = fromChatId,
|
|
||||||
messageId = messageId,
|
|
||||||
text = text,
|
|
||||||
parseMode = parseMode,
|
|
||||||
rawEntities = null,
|
|
||||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
|
||||||
threadId = threadId,
|
|
||||||
disableNotification = disableNotification,
|
|
||||||
protectContent = protectContent,
|
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -113,6 +119,7 @@ fun CopyMessage(
|
|||||||
threadId: MessageThreadId? = toChatId.threadId,
|
threadId: MessageThreadId? = toChatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = CopyMessage(
|
) = CopyMessage(
|
||||||
@@ -126,6 +133,7 @@ fun CopyMessage(
|
|||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -152,6 +160,8 @@ data class CopyMessage internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.requests.send
|
package dev.inmo.tgbotapi.requests.send
|
||||||
|
|
||||||
import dev.inmo.tgbotapi.abstracts.types.DisableNotification
|
import dev.inmo.tgbotapi.abstracts.types.*
|
||||||
import dev.inmo.tgbotapi.abstracts.types.MessagesAction
|
|
||||||
import dev.inmo.tgbotapi.abstracts.types.OptionallyBusinessConnectionRequest
|
|
||||||
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
|
||||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
@@ -50,7 +47,7 @@ data class CopyMessages (
|
|||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
@SerialName(removeCaptionField)
|
@SerialName(removeCaptionField)
|
||||||
private val removeCaption: Boolean = false
|
private val removeCaption: Boolean = false,
|
||||||
): SimpleRequest<List<MessageId>>,
|
): SimpleRequest<List<MessageId>>,
|
||||||
MessagesAction,
|
MessagesAction,
|
||||||
ProtectContent,
|
ProtectContent,
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ data class SendContact(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -48,6 +50,7 @@ data class SendContact(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -60,6 +63,7 @@ data class SendContact(
|
|||||||
businessConnectionId,
|
businessConnectionId,
|
||||||
disableNotification,
|
disableNotification,
|
||||||
protectContent,
|
protectContent,
|
||||||
|
allowPaidBroadcast,
|
||||||
effectId,
|
effectId,
|
||||||
replyParameters,
|
replyParameters,
|
||||||
replyMarkup
|
replyMarkup
|
||||||
@@ -78,6 +82,7 @@ fun Contact.toRequest(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -88,6 +93,7 @@ fun Contact.toRequest(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ data class SendDice(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -33,30 +33,7 @@ fun SendLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
|
||||||
replyMarkup: KeyboardMarkup? = null
|
|
||||||
) = SendLocation.Static(
|
|
||||||
chatId,
|
|
||||||
latitude,
|
|
||||||
longitude,
|
|
||||||
threadId,
|
|
||||||
businessConnectionId,
|
|
||||||
disableNotification,
|
|
||||||
protectContent,
|
|
||||||
effectId,
|
|
||||||
replyParameters,
|
|
||||||
replyMarkup
|
|
||||||
)
|
|
||||||
|
|
||||||
fun SendStaticLocation(
|
|
||||||
chatId: ChatIdentifier,
|
|
||||||
latitude: Double,
|
|
||||||
longitude: Double,
|
|
||||||
threadId: MessageThreadId? = chatId.threadId,
|
|
||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
|
||||||
disableNotification: Boolean = false,
|
|
||||||
protectContent: Boolean = false,
|
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -68,6 +45,33 @@ fun SendStaticLocation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
|
effectId = effectId,
|
||||||
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
|
)
|
||||||
|
|
||||||
|
fun SendStaticLocation(
|
||||||
|
chatId: ChatIdentifier,
|
||||||
|
latitude: Double,
|
||||||
|
longitude: Double,
|
||||||
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
|
disableNotification: Boolean = false,
|
||||||
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
|
effectId: EffectId? = null,
|
||||||
|
replyParameters: ReplyParameters? = null,
|
||||||
|
replyMarkup: KeyboardMarkup? = null
|
||||||
|
) = SendLocation.Static(
|
||||||
|
chatId = chatId,
|
||||||
|
latitude = latitude,
|
||||||
|
longitude = longitude,
|
||||||
|
threadId = threadId,
|
||||||
|
businessConnectionId = businessConnectionId,
|
||||||
|
disableNotification = disableNotification,
|
||||||
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -85,6 +89,7 @@ fun SendLiveLocation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -100,6 +105,7 @@ fun SendLiveLocation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -145,6 +151,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -187,6 +195,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -233,6 +243,8 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
val disableNotification: Boolean = false,
|
val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
val protectContent: Boolean = false,
|
val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
val effectId: EffectId? = null,
|
val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -256,6 +268,7 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
businessConnectionId = surrogate.businessConnectionId,
|
businessConnectionId = surrogate.businessConnectionId,
|
||||||
disableNotification = surrogate.disableNotification,
|
disableNotification = surrogate.disableNotification,
|
||||||
protectContent = surrogate.protectContent,
|
protectContent = surrogate.protectContent,
|
||||||
|
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
||||||
effectId = surrogate.effectId,
|
effectId = surrogate.effectId,
|
||||||
replyParameters = surrogate.replyParameters,
|
replyParameters = surrogate.replyParameters,
|
||||||
replyMarkup = surrogate.replyMarkup
|
replyMarkup = surrogate.replyMarkup
|
||||||
@@ -272,6 +285,7 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
businessConnectionId = surrogate.businessConnectionId,
|
businessConnectionId = surrogate.businessConnectionId,
|
||||||
disableNotification = surrogate.disableNotification,
|
disableNotification = surrogate.disableNotification,
|
||||||
protectContent = surrogate.protectContent,
|
protectContent = surrogate.protectContent,
|
||||||
|
allowPaidBroadcast = surrogate.allowPaidBroadcast,
|
||||||
effectId = surrogate.effectId,
|
effectId = surrogate.effectId,
|
||||||
replyParameters = surrogate.replyParameters,
|
replyParameters = surrogate.replyParameters,
|
||||||
replyMarkup = surrogate.replyMarkup
|
replyMarkup = surrogate.replyMarkup
|
||||||
@@ -293,6 +307,7 @@ sealed interface SendLocation<T : LocationContent> : SendContentMessageRequest<C
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -30,22 +30,24 @@ fun SendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendTextMessage(
|
) = SendTextMessage(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
text,
|
text = text,
|
||||||
parseMode,
|
parseMode = parseMode,
|
||||||
null,
|
rawEntities = null,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
fun SendTextMessage(
|
fun SendTextMessage(
|
||||||
@@ -56,22 +58,24 @@ fun SendTextMessage(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendTextMessage(
|
) = SendTextMessage(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
entities.makeString(),
|
text = entities.makeString(),
|
||||||
null,
|
parseMode = null,
|
||||||
entities.toRawMessageEntities(),
|
rawEntities = entities.toRawMessageEntities(),
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
linkPreviewOptions,
|
linkPreviewOptions = linkPreviewOptions,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@@ -94,6 +98,8 @@ data class SendTextMessage internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ data class SendVenue(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -59,6 +61,7 @@ data class SendVenue(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -76,6 +79,7 @@ data class SendVenue(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -94,17 +98,19 @@ fun Venue.toRequest(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): SendVenue = SendVenue(
|
): SendVenue = SendVenue(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
this,
|
venue = this,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
effectId,
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters,
|
effectId = effectId,
|
||||||
replyMarkup
|
replyParameters = replyParameters,
|
||||||
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>,
|
|||||||
WithReplyParameters,
|
WithReplyParameters,
|
||||||
DisableNotification,
|
DisableNotification,
|
||||||
ProtectContent,
|
ProtectContent,
|
||||||
|
AllowPaidBroadcast,
|
||||||
OptionallyMessageThreadRequest
|
OptionallyMessageThreadRequest
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ data class SendGame (
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ fun SendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -59,6 +60,7 @@ fun SendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -88,6 +90,7 @@ fun SendAnimation(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -111,6 +114,7 @@ fun SendAnimation(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -161,6 +165,8 @@ data class SendAnimationData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ fun SendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -56,6 +57,7 @@ fun SendAudio(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -83,6 +85,7 @@ fun SendAudio(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -104,6 +107,7 @@ fun SendAudio(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -150,6 +154,8 @@ data class SendAudioData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ fun SendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@@ -59,6 +60,7 @@ fun SendDocument(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
@@ -93,6 +95,7 @@ fun SendDocument(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@@ -112,6 +115,7 @@ fun SendDocument(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup,
|
replyMarkup = replyMarkup,
|
||||||
@@ -162,6 +166,8 @@ data class SendDocumentData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
): Request<ContentMessage<MediaGroupContent<T>>> {
|
): Request<ContentMessage<MediaGroupContent<T>>> {
|
||||||
@@ -61,6 +62,7 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
@@ -88,6 +90,7 @@ inline fun SendPlaylist(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
) = SendMediaGroup<AudioContent>(
|
) = SendMediaGroup<AudioContent>(
|
||||||
@@ -97,6 +100,7 @@ inline fun SendPlaylist(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
@@ -114,6 +118,7 @@ inline fun SendDocumentsGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null
|
replyParameters: ReplyParameters? = null
|
||||||
) = SendMediaGroup<DocumentContent>(
|
) = SendMediaGroup<DocumentContent>(
|
||||||
@@ -123,6 +128,7 @@ inline fun SendDocumentsGroup(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
@@ -141,6 +147,7 @@ inline fun SendVisualMediaGroup(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
) = SendMediaGroup<VisualMediaGroupPartContent>(
|
) = SendMediaGroup<VisualMediaGroupPartContent>(
|
||||||
@@ -150,6 +157,7 @@ inline fun SendVisualMediaGroup(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters
|
replyParameters = replyParameters
|
||||||
)
|
)
|
||||||
@@ -182,6 +190,8 @@ data class SendMediaGroupData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ fun SendPaidMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<PaidMediaInfoContent>> {
|
): Request<ContentMessage<PaidMediaInfoContent>> {
|
||||||
@@ -50,6 +51,7 @@ fun SendPaidMedia(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -86,6 +88,7 @@ fun SendPaidMedia(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
): Request<ContentMessage<PaidMediaInfoContent>> {
|
): Request<ContentMessage<PaidMediaInfoContent>> {
|
||||||
@@ -102,6 +105,7 @@ fun SendPaidMedia(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
@@ -156,6 +160,8 @@ data class SendPaidMediaData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
override val replyParameters: ReplyParameters? = null,
|
override val replyParameters: ReplyParameters? = null,
|
||||||
@SerialName(replyMarkupField)
|
@SerialName(replyMarkupField)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ fun SendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -47,6 +48,7 @@ fun SendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -71,6 +73,7 @@ fun SendPhoto(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -87,6 +90,7 @@ fun SendPhoto(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -129,6 +133,8 @@ data class SendPhotoData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ fun SendSticker(
|
|||||||
emoji: String? = null,
|
emoji: String? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -32,6 +33,7 @@ fun SendSticker(
|
|||||||
emoji = emoji,
|
emoji = emoji,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -64,6 +66,8 @@ data class SendStickerByFileId internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ fun SendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -61,6 +62,7 @@ fun SendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -91,6 +93,7 @@ fun SendVideo(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -115,6 +118,7 @@ fun SendVideo(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -167,6 +171,8 @@ data class SendVideoData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ fun SendVideoNote(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -40,6 +41,7 @@ fun SendVideoNote(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -78,6 +80,8 @@ data class SendVideoNoteData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ fun SendVoice(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -48,6 +49,7 @@ fun SendVoice(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -72,6 +74,7 @@ fun SendVoice(
|
|||||||
duration: Long? = null,
|
duration: Long? = null,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -89,6 +92,7 @@ fun SendVoice(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -129,6 +133,8 @@ data class SendVoiceData internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ data class SendInvoice(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -111,6 +113,7 @@ data class SendInvoice(
|
|||||||
threadId: MessageThreadId? = chatId.threadId,
|
threadId: MessageThreadId? = chatId.threadId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: InlineKeyboardMarkup? = null
|
replyMarkup: InlineKeyboardMarkup? = null
|
||||||
@@ -127,6 +130,7 @@ data class SendInvoice(
|
|||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ fun SendPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendRegularPoll(
|
) = SendRegularPoll(
|
||||||
@@ -64,6 +65,7 @@ fun SendPoll(
|
|||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -79,17 +81,19 @@ fun SendPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = SendRegularPoll(
|
) = SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
textSources,
|
questionEntities = textSources,
|
||||||
options,
|
options = options,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
threadId = threadId,
|
threadId = threadId,
|
||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -105,75 +109,80 @@ fun Poll.createRequest(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
) = when (this) {
|
) = when (this) {
|
||||||
is RegularPoll -> SendRegularPoll(
|
is RegularPoll -> SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
textSources,
|
questionTextSources = textSources,
|
||||||
options.map { it.asInput() },
|
options = options.map { it.asInput() },
|
||||||
scheduledCloseInfo,
|
closeInfo = scheduledCloseInfo,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
allowMultipleAnswers,
|
allowMultipleAnswers = allowMultipleAnswers,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
is QuizPoll -> correctOptionId ?.let { correctOptionId ->
|
is QuizPoll -> correctOptionId ?.let { correctOptionId ->
|
||||||
SendQuizPoll(
|
SendQuizPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
textSources,
|
questionEntities = textSources,
|
||||||
options.map { it.asInput() },
|
options = options.map { it.asInput() },
|
||||||
correctOptionId,
|
correctOptionId = correctOptionId,
|
||||||
scheduledCloseInfo,
|
closeInfo = scheduledCloseInfo,
|
||||||
explanationTextSources,
|
explanationTextSources = explanationTextSources,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
} ?: SendRegularPoll(
|
} ?: SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
textSources,
|
questionTextSources = textSources,
|
||||||
options.map { it.asInput() },
|
options = options.map { it.asInput() },
|
||||||
scheduledCloseInfo,
|
closeInfo = scheduledCloseInfo,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
false,
|
allowMultipleAnswers = false,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
is UnknownPollType -> SendRegularPoll(
|
is UnknownPollType -> SendRegularPoll(
|
||||||
chatId,
|
chatId = chatId,
|
||||||
textSources,
|
questionTextSources = textSources,
|
||||||
options.map { it.asInput() },
|
options = options.map { it.asInput() },
|
||||||
scheduledCloseInfo,
|
closeInfo = scheduledCloseInfo,
|
||||||
isAnonymous,
|
isAnonymous = isAnonymous,
|
||||||
isClosed,
|
isClosed = isClosed,
|
||||||
false,
|
allowMultipleAnswers = false,
|
||||||
threadId,
|
threadId = threadId,
|
||||||
businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ class SendQuizPoll internal constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -86,6 +88,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -107,6 +110,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -127,6 +131,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -148,6 +153,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -168,6 +174,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -189,6 +196,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -208,6 +216,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -229,6 +238,7 @@ class SendQuizPoll internal constructor(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -264,6 +274,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -283,6 +294,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -302,6 +314,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -320,6 +333,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -339,6 +353,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -357,6 +372,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -375,6 +391,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -392,6 +409,7 @@ fun SendQuizPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ class SendRegularPoll private constructor(
|
|||||||
override val disableNotification: Boolean = false,
|
override val disableNotification: Boolean = false,
|
||||||
@SerialName(protectContentField)
|
@SerialName(protectContentField)
|
||||||
override val protectContent: Boolean = false,
|
override val protectContent: Boolean = false,
|
||||||
|
@SerialName(allowPaidBroadcastField)
|
||||||
|
override val allowPaidBroadcast: Boolean = false,
|
||||||
@SerialName(messageEffectIdField)
|
@SerialName(messageEffectIdField)
|
||||||
override val effectId: EffectId? = null,
|
override val effectId: EffectId? = null,
|
||||||
@SerialName(replyParametersField)
|
@SerialName(replyParametersField)
|
||||||
@@ -72,6 +74,7 @@ class SendRegularPoll private constructor(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -90,6 +93,7 @@ class SendRegularPoll private constructor(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -109,6 +113,7 @@ class SendRegularPoll private constructor(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -127,6 +132,7 @@ class SendRegularPoll private constructor(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -155,6 +161,7 @@ fun SendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -172,6 +179,7 @@ fun SendRegularPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -189,6 +197,7 @@ fun SendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -205,6 +214,7 @@ fun SendRegularPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -221,6 +231,7 @@ fun SendRegularPoll(
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null,
|
replyMarkup: KeyboardMarkup? = null,
|
||||||
@@ -237,6 +248,7 @@ fun SendRegularPoll(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ const val disableWebPagePreviewField = "disable_web_page_preview"
|
|||||||
const val linkPreviewOptionsField = "link_preview_options"
|
const val linkPreviewOptionsField = "link_preview_options"
|
||||||
const val disableNotificationField = "disable_notification"
|
const val disableNotificationField = "disable_notification"
|
||||||
const val protectContentField = "protect_content"
|
const val protectContentField = "protect_content"
|
||||||
|
const val allowPaidBroadcastField = "allow_paid_broadcast"
|
||||||
const val messageEffectIdField = "message_effect_id"
|
const val messageEffectIdField = "message_effect_id"
|
||||||
const val removeCaptionField = "remove_caption"
|
const val removeCaptionField = "remove_caption"
|
||||||
const val replyToMessageIdField = "reply_to_message_id"
|
const val replyToMessageIdField = "reply_to_message_id"
|
||||||
@@ -470,6 +471,7 @@ const val valueField = "value"
|
|||||||
const val creatorField = "creator"
|
const val creatorField = "creator"
|
||||||
const val subscriptionPeriodField = "subscription_period"
|
const val subscriptionPeriodField = "subscription_period"
|
||||||
const val subscriptionPriceField = "subscription_price"
|
const val subscriptionPriceField = "subscription_price"
|
||||||
|
const val copyTextField = "copy_text"
|
||||||
|
|
||||||
const val pointField = "point"
|
const val pointField = "point"
|
||||||
const val xShiftField = "x_shift"
|
const val xShiftField = "x_shift"
|
||||||
@@ -501,6 +503,7 @@ const val currencyField = "currency"
|
|||||||
const val startParameterField = "start_parameter"
|
const val startParameterField = "start_parameter"
|
||||||
const val totalAmountField = "total_amount"
|
const val totalAmountField = "total_amount"
|
||||||
const val invoicePayloadField = "invoice_payload"
|
const val invoicePayloadField = "invoice_payload"
|
||||||
|
const val requestCountField = "request_count"
|
||||||
const val paidMediaPayloadField = "paid_media_payload"
|
const val paidMediaPayloadField = "paid_media_payload"
|
||||||
const val shippingOptionIdField = "shipping_option_id"
|
const val shippingOptionIdField = "shipping_option_id"
|
||||||
const val shippingQueryIdField = "shipping_query_id"
|
const val shippingQueryIdField = "shipping_query_id"
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons
|
||||||
|
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class CopyTextButtonData(
|
||||||
|
val text: String,
|
||||||
|
)
|
||||||
@@ -141,6 +141,16 @@ data class URLInlineKeyboardButton(
|
|||||||
val url: String
|
val url: String
|
||||||
) : InlineKeyboardButton
|
) : InlineKeyboardButton
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `copy_text` button
|
||||||
|
*/
|
||||||
|
@Serializable
|
||||||
|
data class CopyTextButton(
|
||||||
|
override val text: String,
|
||||||
|
@SerialName(copyTextField)
|
||||||
|
val data: CopyTextButtonData
|
||||||
|
) : InlineKeyboardButton
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button with [WebAppInfo]. Web App will be launched when the button is pressed. The Web App will be able to send a
|
* Button with [WebAppInfo]. Web App will be launched when the button is pressed. The Web App will be able to send a
|
||||||
* `web_app_data` service message. **Available in private chats only**.
|
* `web_app_data` service message. **Available in private chats only**.
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ object InlineKeyboardButtonSerializer : KSerializer<InlineKeyboardButton> {
|
|||||||
json[switchInlineQueryCurrentChatField] != null -> SwitchInlineQueryCurrentChatInlineKeyboardButton.serializer()
|
json[switchInlineQueryCurrentChatField] != null -> SwitchInlineQueryCurrentChatInlineKeyboardButton.serializer()
|
||||||
json[switchInlineQueryChosenChatField] != null -> SwitchInlineQueryChosenChatInlineKeyboardButton.serializer()
|
json[switchInlineQueryChosenChatField] != null -> SwitchInlineQueryChosenChatInlineKeyboardButton.serializer()
|
||||||
json[urlField] != null -> URLInlineKeyboardButton.serializer()
|
json[urlField] != null -> URLInlineKeyboardButton.serializer()
|
||||||
|
json[copyTextField] != null -> CopyTextButton.serializer()
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,6 +51,7 @@ object InlineKeyboardButtonSerializer : KSerializer<InlineKeyboardButton> {
|
|||||||
is SwitchInlineQueryCurrentChatInlineKeyboardButton -> SwitchInlineQueryCurrentChatInlineKeyboardButton.serializer().serialize(encoder, value)
|
is SwitchInlineQueryCurrentChatInlineKeyboardButton -> SwitchInlineQueryCurrentChatInlineKeyboardButton.serializer().serialize(encoder, value)
|
||||||
is SwitchInlineQueryChosenChatInlineKeyboardButton -> SwitchInlineQueryChosenChatInlineKeyboardButton.serializer().serialize(encoder, value)
|
is SwitchInlineQueryChosenChatInlineKeyboardButton -> SwitchInlineQueryChosenChatInlineKeyboardButton.serializer().serialize(encoder, value)
|
||||||
is URLInlineKeyboardButton -> URLInlineKeyboardButton.serializer().serialize(encoder, value)
|
is URLInlineKeyboardButton -> URLInlineKeyboardButton.serializer().serialize(encoder, value)
|
||||||
|
is CopyTextButton -> CopyTextButton.serializer().serialize(encoder, value)
|
||||||
is WebAppInlineKeyboardButton -> WebAppInlineKeyboardButton.serializer().serialize(encoder, value)
|
is WebAppInlineKeyboardButton -> WebAppInlineKeyboardButton.serializer().serialize(encoder, value)
|
||||||
is CallbackGameInlineKeyboardButton -> CallbackGameInlineKeyboardButton.serializer().serialize(encoder, value)
|
is CallbackGameInlineKeyboardButton -> CallbackGameInlineKeyboardButton.serializer().serialize(encoder, value)
|
||||||
is UnknownInlineKeyboardButton -> JsonElement.serializer().serialize(encoder, value.rawData)
|
is UnknownInlineKeyboardButton -> JsonElement.serializer().serialize(encoder, value.rawData)
|
||||||
|
|||||||
@@ -36,6 +36,22 @@ inline fun loginInlineButton(
|
|||||||
loginUrl: LoginURL
|
loginUrl: LoginURL
|
||||||
) = LoginURLInlineKeyboardButton(text, loginUrl)
|
) = LoginURLInlineKeyboardButton(text, loginUrl)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates [CopyTextButton]
|
||||||
|
*/
|
||||||
|
inline fun copyTextButton(
|
||||||
|
text: String,
|
||||||
|
data: CopyTextButtonData
|
||||||
|
) = CopyTextButton(text, data)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates [CopyTextButton]
|
||||||
|
*/
|
||||||
|
inline fun copyTextButton(
|
||||||
|
text: String,
|
||||||
|
data: String
|
||||||
|
) = copyTextButton(text, CopyTextButtonData(data))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
* Creates [SwitchInlineQueryCurrentChatInlineKeyboardButton]
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dev.inmo.tgbotapi.types.message
|
package dev.inmo.tgbotapi.types.message
|
||||||
|
|
||||||
|
import dev.inmo.micro_utils.common.Warning
|
||||||
import dev.inmo.micro_utils.serialization.mapper.MapperSerializer
|
import dev.inmo.micro_utils.serialization.mapper.MapperSerializer
|
||||||
import dev.inmo.tgbotapi.types.CustomEmojiId
|
import dev.inmo.tgbotapi.types.CustomEmojiId
|
||||||
import dev.inmo.tgbotapi.types.chat.User
|
import dev.inmo.tgbotapi.types.chat.User
|
||||||
@@ -9,7 +10,8 @@ import kotlinx.serialization.Serializable
|
|||||||
import kotlinx.serialization.builtins.ListSerializer
|
import kotlinx.serialization.builtins.ListSerializer
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
internal data class RawMessageEntity(
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this class")
|
||||||
|
data class RawMessageEntity(
|
||||||
val type: String,
|
val type: String,
|
||||||
val offset: Int,
|
val offset: Int,
|
||||||
val length: Int,
|
val length: Int,
|
||||||
@@ -49,7 +51,8 @@ internal data class RawMessageEntity(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun RawMessageEntity.asTextSource(
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this extension")
|
||||||
|
fun RawMessageEntity.asTextSource(
|
||||||
source: String,
|
source: String,
|
||||||
subParts: List<Pair<Int, TextSource>>
|
subParts: List<Pair<Int, TextSource>>
|
||||||
): TextSource {
|
): TextSource {
|
||||||
@@ -92,6 +95,7 @@ private inline operator fun <T : Comparable<T>> ClosedRange<T>.contains(other: C
|
|||||||
return start <= other.start && endInclusive >= other.endInclusive
|
return start <= other.start && endInclusive >= other.endInclusive
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this extension")
|
||||||
internal fun List<Pair<Int, TextSource>>.fillWithRegulars(source: String): TextSourcesList {
|
internal fun List<Pair<Int, TextSource>>.fillWithRegulars(source: String): TextSourcesList {
|
||||||
var index = 0
|
var index = 0
|
||||||
val result = mutableListOf<TextSource>()
|
val result = mutableListOf<TextSource>()
|
||||||
@@ -174,7 +178,8 @@ private fun createTextSources(
|
|||||||
return resultList
|
return resultList
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun TextSource.toRawMessageEntities(offset: Int = 0): List<RawMessageEntity> {
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this extension")
|
||||||
|
fun TextSource.toRawMessageEntities(offset: Int = 0): List<RawMessageEntity> {
|
||||||
val source = source
|
val source = source
|
||||||
val length = source.length
|
val length = source.length
|
||||||
return listOfNotNull(
|
return listOfNotNull(
|
||||||
@@ -208,7 +213,8 @@ internal fun TextSource.toRawMessageEntities(offset: Int = 0): List<RawMessageEn
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal fun TextSourcesList.toRawMessageEntities(preOffset: Int = 0): List<RawMessageEntity> {
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this extension")
|
||||||
|
fun TextSourcesList.toRawMessageEntities(preOffset: Int = 0): List<RawMessageEntity> {
|
||||||
var i = preOffset
|
var i = preOffset
|
||||||
return flatMap { textSource ->
|
return flatMap { textSource ->
|
||||||
textSource.toRawMessageEntities(i).also {
|
textSource.toRawMessageEntities(i).also {
|
||||||
@@ -217,9 +223,12 @@ internal fun TextSourcesList.toRawMessageEntities(preOffset: Int = 0): List<RawM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun TextSourcesList.toRawMessageEntities(): List<RawMessageEntity> = toRawMessageEntities(0)
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this extension")
|
||||||
|
fun TextSourcesList.toRawMessageEntities(): List<RawMessageEntity> = toRawMessageEntities(0)
|
||||||
|
|
||||||
internal fun RawMessageEntities.asTextSources(sourceString: String): TextSourcesList =
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this extension")
|
||||||
|
fun RawMessageEntities.asTextSources(sourceString: String): TextSourcesList =
|
||||||
createTextSources(sourceString, this).fillWithRegulars(sourceString)
|
createTextSources(sourceString, this).fillWithRegulars(sourceString)
|
||||||
|
|
||||||
internal typealias RawMessageEntities = List<RawMessageEntity>
|
@Warning("This thing is subject of changes. Library do not guarantee stability of this typealias")
|
||||||
|
typealias RawMessageEntities = List<RawMessageEntity>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
|||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
|
import dev.inmo.tgbotapi.types.media.TelegramFreeMedia
|
||||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.*
|
import dev.inmo.tgbotapi.types.message.abstracts.*
|
||||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
@@ -154,6 +153,7 @@ sealed interface ResendableContent {
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyParameters: ReplyParameters? = null,
|
replyParameters: ReplyParameters? = null,
|
||||||
replyMarkup: KeyboardMarkup? = null
|
replyMarkup: KeyboardMarkup? = null
|
||||||
@@ -165,6 +165,7 @@ sealed interface ResendableContent {
|
|||||||
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
|
||||||
disableNotification: Boolean = false,
|
disableNotification: Boolean = false,
|
||||||
protectContent: Boolean = false,
|
protectContent: Boolean = false,
|
||||||
|
allowPaidBroadcast: Boolean = false,
|
||||||
effectId: EffectId? = null,
|
effectId: EffectId? = null,
|
||||||
replyToMessageId: MessageId?,
|
replyToMessageId: MessageId?,
|
||||||
allowSendingWithoutReply: Boolean? = null,
|
allowSendingWithoutReply: Boolean? = null,
|
||||||
@@ -175,6 +176,7 @@ sealed interface ResendableContent {
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyToMessageId ?.let {
|
replyParameters = replyToMessageId ?.let {
|
||||||
ReplyParameters(
|
ReplyParameters(
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ data class AnimationContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -45,6 +46,7 @@ data class AnimationContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ data class AudioContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -40,6 +41,7 @@ data class AudioContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ data class ContactContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -28,6 +29,7 @@ data class ContactContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ data class DiceContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -29,6 +30,7 @@ data class DiceContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ data class DocumentContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -40,6 +41,7 @@ data class DocumentContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ data class GameContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -29,6 +30,7 @@ data class GameContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ data class GiveawayContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ data class GiveawayPublicResultsContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ data class InvoiceContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package dev.inmo.tgbotapi.types.message.content
|
|||||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
import dev.inmo.tgbotapi.requests.send.SendLiveLocation
|
import dev.inmo.tgbotapi.requests.send.SendLiveLocation
|
||||||
import dev.inmo.tgbotapi.requests.send.SendStaticLocation
|
import dev.inmo.tgbotapi.requests.send.SendStaticLocation
|
||||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||||
@@ -101,6 +100,7 @@ data class LiveLocationContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -116,6 +116,7 @@ data class LiveLocationContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
@@ -136,6 +137,7 @@ data class StaticLocationContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -147,6 +149,7 @@ data class StaticLocationContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ data class MediaGroupContent<T : MediaGroupPartContent>(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -47,6 +48,7 @@ data class MediaGroupContent<T : MediaGroupPartContent>(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ data class PaidMediaInfoContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -51,6 +52,7 @@ data class PaidMediaInfoContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ data class PhotoContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -43,6 +44,7 @@ data class PhotoContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ data class PollContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -28,6 +29,7 @@ data class PollContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ data class StickerContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
@@ -30,6 +31,7 @@ data class StickerContent(
|
|||||||
businessConnectionId = businessConnectionId,
|
businessConnectionId = businessConnectionId,
|
||||||
disableNotification = disableNotification,
|
disableNotification = disableNotification,
|
||||||
protectContent = protectContent,
|
protectContent = protectContent,
|
||||||
|
allowPaidBroadcast = allowPaidBroadcast,
|
||||||
effectId = effectId,
|
effectId = effectId,
|
||||||
replyParameters = replyParameters,
|
replyParameters = replyParameters,
|
||||||
replyMarkup = replyMarkup
|
replyMarkup = replyMarkup
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ data class StoryContent(
|
|||||||
businessConnectionId: BusinessConnectionId?,
|
businessConnectionId: BusinessConnectionId?,
|
||||||
disableNotification: Boolean,
|
disableNotification: Boolean,
|
||||||
protectContent: Boolean,
|
protectContent: Boolean,
|
||||||
|
allowPaidBroadcast: Boolean,
|
||||||
effectId: EffectId?,
|
effectId: EffectId?,
|
||||||
replyParameters: ReplyParameters?,
|
replyParameters: ReplyParameters?,
|
||||||
replyMarkup: KeyboardMarkup?
|
replyMarkup: KeyboardMarkup?
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user