mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-11-16 03:50:24 +00:00
Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d66d4b4209 | |||
| 9d54820fd7 | |||
| 1876df2c2d | |||
| d818592cd3 | |||
| c29737b6b3 | |||
| 46243a21eb | |||
| d5f45ead59 | |||
| 5a696cdac0 | |||
| 80955eeb55 | |||
| 6ee93e2d68 | |||
| d4490dec75 | |||
| 7d3e9325f1 | |||
| 31a66eb8e6 | |||
| b3b9070cd6 | |||
| 3504776344 | |||
| f22f69534a | |||
| a9c1d7b33c | |||
|
|
376ef0750c | ||
| cdf93e0d12 | |||
| 8c7261fda9 | |||
| 82acc8cb1f | |||
| 4ec1532597 | |||
| 13bfe681d8 | |||
| 5bbbcdb529 | |||
| 7f9d6ce626 | |||
| 71b944f9cc | |||
| d9d68749f1 | |||
| 561aad2274 | |||
| 6a3e95c488 | |||
| a09b3809e2 | |||
| 427b5775a2 | |||
| d222987fc7 | |||
| d211afa26a | |||
| 9952b6c6ae | |||
| 840c6b02a4 | |||
| a6f91d5600 | |||
| 8ec0c8804b | |||
| 2d08c447bc | |||
| 9a0793d81c | |||
| a95f556a5c | |||
| f774b11de4 | |||
|
|
5164903d05 | ||
| adaedb8040 | |||
| 9b4b60eb33 | |||
| b90f8ec389 | |||
| e95550a6eb | |||
| 696219df24 | |||
| 27241fad32 | |||
| a034fa18d7 | |||
| adcaffe115 | |||
| 6388d8db13 | |||
| 2964586cb9 | |||
| e3cb1e4faf | |||
| d7f14020d8 | |||
| 397197023e | |||
| 12dc93313a | |||
| 625760afae | |||
| 795328afdf | |||
| 57175b7698 | |||
| 2d05a334eb | |||
| 0b6d9e47b9 | |||
| 4cdae11adc | |||
| 04b2d1dbd6 | |||
| 4343d6d161 | |||
| 6824f2c992 | |||
| 9cde4927ce | |||
| 819982473a | |||
| 5559923339 | |||
| c7d08df3bf | |||
| 41a142addb | |||
| 652765bf46 | |||
| 32010cf1c7 | |||
| 1c6359f041 | |||
| 4ac5e405ac | |||
| bc00e1f28a | |||
| 191e4cff00 | |||
| de91cc5382 | |||
| 96b872953b | |||
| 433b0989ee | |||
| eddd60ebb1 | |||
| 8b63ed7fa9 | |||
| 85539a9d58 | |||
| ad4bac82dc | |||
| 300be87ffd | |||
| 05f46d08c8 | |||
| eb72ff1c94 | |||
| 6b3fabdb30 | |||
| 402e695f99 | |||
| a87560bc40 | |||
| 6d300de470 | |||
| 3658403f01 | |||
| 082aeab700 | |||
| 4eb6fa7835 | |||
| ddf34aad3f | |||
| c818a44044 | |||
| d578f6af90 | |||
| 5ce4e4cbc0 | |||
| 41e369cea5 | |||
| f85d4a36e1 | |||
| fb3b8a7415 | |||
| 609c2b5fad | |||
| 2c602e4434 | |||
| 1a3c9bca1d | |||
|
|
43496505a7 | ||
| 4a0c0bdc40 |
88
CHANGELOG.md
88
CHANGELOG.md
@@ -1,5 +1,93 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 23.2.1
|
||||
|
||||
* `Core`:
|
||||
* Fix of `year` field in `Birthdate`
|
||||
|
||||
## 23.2.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 8.3](https://core.telegram.org/bots/api-changelog#february-12-2025)**
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.24.5` -> `0.24.6`
|
||||
* `Ktor`: `3.0.3` -> `3.1.0`
|
||||
|
||||
## 23.1.2
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.1.0` -> `2.1.10`
|
||||
* `Serialization`: `1.7.3` -> `1.8.0`
|
||||
* `MicroUtils`: `0.24.4` -> `0.24.5`
|
||||
* `KSLog`: `1.4.0` -> `1.4.1`
|
||||
|
||||
## 23.1.1
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.24.0` -> `0.24.4`
|
||||
* `Core`:
|
||||
* Replace `removeFirst` with `removeAt(0)` in `createTextSources`
|
||||
|
||||
## 23.1.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 8.2](https://core.telegram.org/bots/api-changelog#january-1-2025)**
|
||||
|
||||
## 23.0.0
|
||||
|
||||
* `Version`:
|
||||
* `Coroutines`: `1.9.0` -> `1.10.1`
|
||||
* `MicroUtils`: `0.23.2` -> `0.24.0`
|
||||
* `KSLog`: `1.3.6` -> `1.4.0`
|
||||
* `Ktor`: `3.0.2` -> `3.0.3`
|
||||
* `Core`:
|
||||
* All old factory methods for `TextSource`s took suffix `TextSource`. For example: `regular` -> `regularTextSource`.
|
||||
That has been for excluding names resolution ambiguity with extensions for `EntitiesBuilder`
|
||||
|
||||
## 22.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||
|
||||
**IN THIS UPDATE HAS BEEN REWORKED EVENTS API IN WEBAPPS**
|
||||
|
||||
**THIS UPDATE ADDING SUPPORT OF [BOT API 8.0](https://core.telegram.org/bots/api-changelog#november-17-2024) AND [BOT API 8.1](https://core.telegram.org/bots/api-changelog#december-4-2024)**
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.23.1` -> `0.23.2`
|
||||
* `Ktor`: `3.0.1` -> `3.0.2`
|
||||
|
||||
## 21.0.1
|
||||
|
||||
* `Core`:
|
||||
* Improvements in `Update.sourceUser` extension
|
||||
* Add extension `PrivateChat.toUser`
|
||||
* Builder methods of `TextSource`s (like `pre` which returns `PreTextSource`) lost suppression of `redundant inline`
|
||||
due to its redundancy
|
||||
* Add `mention` builders for `EntitiesBuilder` with `UserId` as variant instead of `User`
|
||||
* `BehaviourBuilder`:
|
||||
* Add support of several rounds for `CombinedSubcontextInitialAction`. Now it will try hard to execute all its
|
||||
`SubAction` while all actions will not be completed successfully OR all left actions will not complete with errors
|
||||
|
||||
## 21.0.0
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.0.21` -> `2.1.0`
|
||||
* `MicroUtils`: `0.23.0` -> `0.23.1`
|
||||
* `BehaviourBuilder`:
|
||||
* Add special `val data: BehaviourContextData` into all realizations of `BehaviourContext`
|
||||
* Add `CombinedSubcontextInitialAction` and functions
|
||||
`buildSubcontextInitialAction`/`buildSubcontextInitialActionWithSubActions`
|
||||
* Add `subcontextInitialAction` for all the functions-builders of `BehaviourContext` and
|
||||
`additionalSubcontextInitialAction` to all triggers
|
||||
|
||||
## 20.0.1
|
||||
|
||||
* `Core`:
|
||||
* Fix of logger propagation (fix of [#860](https://github.com/InsanusMokrassar/ktgbotapi/issues/860))
|
||||
* Add opportunity to modify keyboards (fix of [#761](https://github.com/InsanusMokrassar/ktgbotapi/issues/761))
|
||||
* Fields of `OrderInfo` became nullable (fix of [#917](https://github.com/InsanusMokrassar/ktgbotapi/issues/917))
|
||||
* Add default `toString` to `ChatType` (fix of [#919](https://github.com/InsanusMokrassar/ktgbotapi/issues/919))
|
||||
* Fix of method in `CreateInvoiceLink` (merging of [#920](https://github.com/InsanusMokrassar/ktgbotapi/issues/920), made by [byteduck-exploit](https://github.com/byteduck-exploit))
|
||||
|
||||
## 20.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS SUPPORT OF [BOTS API 7.11](https://core.telegram.org/bots/api-changelog#october-31-2024)**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#october-31-2024)
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#february-12-2025)
|
||||
|
||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
|
||||
@@ -55,7 +55,7 @@ Object callback = {
|
||||
|
||||
sourceLink {
|
||||
localDirectory.set(file("../"))
|
||||
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/ktgbotapi/tree/master"))
|
||||
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/ktgbotapi"))
|
||||
remoteLineSuffix.set("#L")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=20.0.0
|
||||
library_version=23.2.1
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "2.0.21"
|
||||
kotlin-serialization = "1.7.3"
|
||||
kotlin-coroutines = "1.9.0"
|
||||
kotlin = "2.1.10"
|
||||
kotlin-serialization = "1.8.0"
|
||||
kotlin-coroutines = "1.10.1"
|
||||
|
||||
javax-activation = "1.1.1"
|
||||
|
||||
korlibs = "5.4.0"
|
||||
uuid = "0.8.4"
|
||||
ktor = "3.0.1"
|
||||
ktor = "3.1.0"
|
||||
|
||||
ksp = "2.0.21-1.0.26"
|
||||
ksp = "2.1.10-1.0.29"
|
||||
kotlin-poet = "1.18.1"
|
||||
|
||||
microutils = "0.23.0"
|
||||
kslog = "1.3.6"
|
||||
microutils = "0.24.6"
|
||||
kslog = "1.4.1"
|
||||
|
||||
versions = "0.51.0"
|
||||
|
||||
github-release-plugin = "2.5.2"
|
||||
dokka = "1.9.20"
|
||||
dokka = "2.0.0"
|
||||
|
||||
validator = "0.16.3"
|
||||
validator = "0.17.0"
|
||||
|
||||
[libraries]
|
||||
|
||||
@@ -57,6 +57,10 @@ microutils-serialization-mapper = { module = "dev.inmo:micro_utils.serialization
|
||||
microutils-languageCodes = { module = "dev.inmo:micro_utils.language_codes", version.ref = "microutils" }
|
||||
microutils-ktor-common = { module = "dev.inmo:micro_utils.ktor.common", version.ref = "microutils" }
|
||||
microutils-fsm-common = { module = "dev.inmo:micro_utils.fsm.common", version.ref = "microutils" }
|
||||
microutils-ksp-sealed = { module = "dev.inmo:micro_utils.ksp.sealed", version.ref = "microutils" }
|
||||
microutils-ksp-sealed-generator = { module = "dev.inmo:micro_utils.ksp.sealed.generator", version.ref = "microutils" }
|
||||
microutils-ksp-variations = { module = "dev.inmo:micro_utils.ksp.variations", version.ref = "microutils" }
|
||||
microutils-ksp-variations-generator = { module = "dev.inmo:micro_utils.ksp.variations.generator", version.ref = "microutils" }
|
||||
|
||||
kslog = { module = "dev.inmo:kslog", version.ref = "kslog" }
|
||||
|
||||
|
||||
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
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
|
||||
@@ -96,7 +96,6 @@ public synthetic class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$$se
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$Companion {
|
||||
@@ -104,18 +103,18 @@ public final class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$Compani
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/ForwardMessageKt {
|
||||
public static final fun forwardMessage-Jtj_99M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-Jtj_99M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-Jtj_99M$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-Jtj_99M$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-G0NMK-w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-G0NMK-w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-G0NMK-w$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-G0NMK-w$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/ForwardMessagesKt {
|
||||
@@ -898,6 +897,15 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/media/EditInlineMessage
|
||||
public static synthetic fun editMessageMedia-FrLM24I$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/edit/payments/EditUserStarSubscriptionKt {
|
||||
public static final fun cancelUserStarSubscription-0SkZb-I (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun cancelUserStarSubscription-AASCvMI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun editUserStarSubscription-0x-hEcU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun editUserStarSubscription-TFuYNzM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun enableUserStarSubscription-0SkZb-I (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun enableUserStarSubscription-AASCvMI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditChatMessageReplyMarkupKt {
|
||||
public static final fun editMessageReplyMarkup-iJMbh4A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editMessageReplyMarkup-iJMbh4A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
@@ -1076,6 +1084,46 @@ public final class dev/inmo/tgbotapi/extensions/api/get/GetUserProfilePhotosKt {
|
||||
public static synthetic fun getUserProfilePhotos-4iNBclM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/Integer;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/GetAvailableGiftsKt {
|
||||
public static final fun getAvailableGifts (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariationKt {
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt {
|
||||
public static final fun sendGift-1FWvrZc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGift-1FWvrZc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendGift-CrS58cM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGift-CrS58cM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGiftToChat-0SDnvgk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGiftToChat-GROm3fU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariationKt {
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/inline/SavePreparedInlineMessageKt {
|
||||
public static final fun savePreparedInlineMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun savePreparedInlineMessage$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun savePreparedInlineMessage-W2FzMBY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun savePreparedInlineMessage-W2FzMBY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/passport/SetPassportDataErrorsKt {
|
||||
public static final fun setPassportDataErrors (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/passport/PassportData;Ldev/inmo/tgbotapi/utils/passport/Decryptor;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setPassportDataErrors (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1085,30 +1133,30 @@ public final class dev/inmo/tgbotapi/extensions/api/passport/SetPassportDataErro
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/CopyMessageKt {
|
||||
public static final fun copyMessage-4vY2rXA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-4vY2rXA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-4vY2rXA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-4vY2rXA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-OcVbe1s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-OcVbe1s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-OcVbe1s$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-OcVbe1s$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-KRJ1h7Y (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-KRJ1h7Y (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-KRJ1h7Y$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-KRJ1h7Y$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-TZVTCXQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-TZVTCXQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-TZVTCXQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-TZVTCXQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/CopyMessagesKt {
|
||||
@@ -2071,10 +2119,6 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendStickerKt {
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVideoKt {
|
||||
public static final fun sendVideo-2mDteE4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-2mDteE4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-CoeeeEM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-CoeeeEM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-CoeeeEM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
@@ -2083,10 +2127,14 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVideoKt {
|
||||
public static final fun sendVideo-ETv3X88 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-ETv3X88$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-ETv3X88$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-cRpLNPQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-cRpLNPQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-cRpLNPQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-cRpLNPQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-Ff7hz4g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-Ff7hz4g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-Ff7hz4g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-Ff7hz4g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-bKa3ifY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-bKa3ifY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-bKa3ifY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-bKa3ifY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVideoNoteKt {
|
||||
@@ -2121,9 +2169,9 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVoiceKt {
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLinkKt {
|
||||
public static final fun createInvoiceLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun createInvoiceLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun createInvoiceLink$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun createInvoiceLink$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun createInvoiceLink-1vVIECE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/time/Duration;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun createInvoiceLink-1vVIECE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/time/Duration;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPaymentKt {
|
||||
@@ -2172,6 +2220,15 @@ public final class dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPollKt
|
||||
public static synthetic fun sendRegularPoll-smr50Sk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;ZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/set/SetUserEmojiStatusKt {
|
||||
public static final fun setUserEmojiStatus-8OHYyMQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setUserEmojiStatus-OZgzbMQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setUserEmojiStatus-SrqJ0BM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setUserEmojiStatus-SrqJ0BM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun setUserEmojiStatus-bic5Y5o (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setUserEmojiStatus-bic5Y5o$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/stickers/AddStickerToSetKt {
|
||||
public static final fun addStickerToSet (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/types/StickerFormat;Ljava/util/List;Ldev/inmo/tgbotapi/types/stickers/MaskPosition;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun addStickerToSet (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/types/StickerFormat;Ljava/util/List;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -2271,6 +2328,20 @@ public final class dev/inmo/tgbotapi/extensions/api/utils/UpdatesHandlingKt {
|
||||
public static synthetic fun updateHandlerWithMediaGroupsAdaptation$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JILjava/lang/Object;)Lkotlin/jvm/functions/Function2;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/verifications/VerifyChatKt {
|
||||
public static final fun verifyChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun verifyChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyChat$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyChat$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/verifications/VerifyUserKt {
|
||||
public static final fun verifyUser (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyUser$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun verifyUser-nc95W0g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyUser-nc95W0g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/webhook/DeleteWebhookKt {
|
||||
public static final fun deleteWebhook (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
id "org.jetbrains.dokka"
|
||||
id "com.google.devtools.ksp"
|
||||
}
|
||||
|
||||
project.description = "API extensions with \"Telegram Bot API\"-like extensions for TelegramBot and RequestsExecutor"
|
||||
@@ -14,6 +15,7 @@ kotlin {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api project(":tgbotapi.core")
|
||||
api libs.microutils.ksp.variations
|
||||
}
|
||||
}
|
||||
configureEach {
|
||||
@@ -22,3 +24,8 @@ kotlin {
|
||||
}
|
||||
explicitApi()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
add("kspCommonMainMetadata", libs.microutils.ksp.variations.generator)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.requests.ForwardMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
||||
@@ -15,10 +16,11 @@ public suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = execute(
|
||||
ForwardMessage(fromChatId, toChatId, messageId, threadId, disableNotification, protectContent)
|
||||
ForwardMessage(fromChatId, toChatId, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
@@ -26,40 +28,45 @@ public suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChatId, messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChatId, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChat: Chat,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChatId, toChat.id, messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChatId, toChat.id, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
fromChat: Chat,
|
||||
toChat: Chat,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChat.id, messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChat.id, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: AccessibleMessage,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChatId, message.messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChatId, message.messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
toChat: Chat,
|
||||
message: AccessibleMessage,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChat, message.messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChat, message.messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.payments
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.payments.EditUserStarSubscription
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId
|
||||
|
||||
public suspend fun TelegramBot.editUserStarSubscription(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
isCanceled: Boolean
|
||||
): Boolean = execute(
|
||||
EditUserStarSubscription(
|
||||
userId = userId,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = isCanceled
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.editUserStarSubscription(
|
||||
user: User,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
isCanceled: Boolean
|
||||
): Boolean = editUserStarSubscription(
|
||||
userId = user.id,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = isCanceled
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.cancelUserStarSubscription(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
userId = userId,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = true
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.cancelUserStarSubscription(
|
||||
user: User,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
user = user,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = true
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.enableUserStarSubscription(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
userId = userId,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = false
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.enableUserStarSubscription(
|
||||
user: User,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
user = user,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = false
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.gifts.GetAvailableGifts
|
||||
import dev.inmo.tgbotapi.types.gifts.Gifts
|
||||
|
||||
public suspend fun TelegramBot.getAvailableGifts(): Gifts = execute(GetAvailableGifts)
|
||||
@@ -0,0 +1,118 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.gifts.SendGift
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
@GenerationVariant(
|
||||
User::class,
|
||||
"id",
|
||||
"user"
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
): Boolean = execute(
|
||||
SendGift.toUser(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
@GenerationVariant(
|
||||
PublicChat::class,
|
||||
"id",
|
||||
"chat"
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
): Boolean = execute(
|
||||
SendGift.toChat(
|
||||
chatId = chatId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
@GenerationVariant(
|
||||
User::class,
|
||||
"id",
|
||||
"user"
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList,
|
||||
upgradableToUnique: Boolean = false,
|
||||
): Boolean = execute(
|
||||
SendGift.toUser(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
textSources = textSources,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
@GenerationVariant(
|
||||
PublicChat::class,
|
||||
"id",
|
||||
"chat"
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList,
|
||||
upgradableToUnique: Boolean = false,
|
||||
): Boolean = execute(
|
||||
SendGift.toChat(
|
||||
chatId = chatId,
|
||||
giftId = giftId,
|
||||
textSources = textSources,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,73 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: SendGift.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import kotlin.Boolean
|
||||
import kotlin.String
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
userId = with(user) {id}, giftId = giftId, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGift(
|
||||
userId = with(user) {id}, giftId = giftId, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
userId = userId, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGift(
|
||||
userId = userId, giftId = with(gift) {id}, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
user = user, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGift(
|
||||
user = user, giftId = with(gift) {id}, text = text, parseMode = parseMode, upgradableToUnique =
|
||||
upgradableToUnique
|
||||
)
|
||||
@@ -0,0 +1,73 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: SendGift.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import kotlin.Boolean
|
||||
import kotlin.String
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = with(chat) {id}, giftId = giftId, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = with(chat) {id}, giftId = giftId, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = chatId, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = chatId, giftId = with(gift) {id}, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
chat = chat, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGiftToChat(
|
||||
chat = chat, giftId = with(gift) {id}, text = text, parseMode = parseMode, upgradableToUnique =
|
||||
upgradableToUnique
|
||||
)
|
||||
@@ -0,0 +1,45 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.inline
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.answers.InlineQueryAnswersResultsSerializer
|
||||
import dev.inmo.tgbotapi.requests.inline.SavePreparedInlineMessage
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.prepared.PreparedInlineMessage
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
public suspend fun TelegramBot.savePreparedInlineMessage(
|
||||
userId: UserId,
|
||||
result: InlineQueryResult,
|
||||
allowSendToUsers: Boolean = false,
|
||||
allowSendToBots: Boolean = false,
|
||||
allowSendToGroups: Boolean = false,
|
||||
allowSendToChannels: Boolean = false,
|
||||
): PreparedInlineMessage = execute(
|
||||
SavePreparedInlineMessage(
|
||||
userId = userId,
|
||||
result = result,
|
||||
allowSendToUsers = allowSendToUsers,
|
||||
allowSendToBots = allowSendToBots,
|
||||
allowSendToGroups = allowSendToGroups,
|
||||
allowSendToChannels = allowSendToChannels
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.savePreparedInlineMessage(
|
||||
user: User,
|
||||
result: InlineQueryResult,
|
||||
allowSendToUsers: Boolean = false,
|
||||
allowSendToBots: Boolean = false,
|
||||
allowSendToGroups: Boolean = false,
|
||||
allowSendToChannels: Boolean = false,
|
||||
): PreparedInlineMessage = savePreparedInlineMessage(
|
||||
userId = user.id,
|
||||
result = result,
|
||||
allowSendToUsers = allowSendToUsers,
|
||||
allowSendToBots = allowSendToBots,
|
||||
allowSendToGroups = allowSendToGroups,
|
||||
allowSendToChannels = allowSendToChannels
|
||||
)
|
||||
@@ -21,6 +21,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -35,6 +36,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -55,6 +57,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -68,6 +71,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -87,6 +91,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -100,6 +105,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -119,6 +125,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -132,6 +139,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -151,6 +159,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -164,6 +173,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -183,6 +193,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -195,6 +206,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -213,6 +225,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -225,6 +238,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -243,6 +257,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -255,6 +270,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -273,6 +289,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -286,6 +303,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -304,6 +322,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -317,6 +336,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -334,6 +354,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -346,6 +367,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -363,6 +385,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -375,6 +398,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -25,6 +25,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -45,6 +47,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
@@ -87,6 +91,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = video.cover ?.fileId,
|
||||
startTimestamp = video.startTimestamp,
|
||||
duration = video.duration,
|
||||
width = video.width,
|
||||
height = video.height,
|
||||
@@ -112,6 +118,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -131,6 +139,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
@@ -192,6 +202,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -211,6 +223,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
@@ -251,6 +265,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = video.cover ?.fileId,
|
||||
startTimestamp = video.startTimestamp,
|
||||
duration = video.duration,
|
||||
width = video.width,
|
||||
height = video.height,
|
||||
@@ -275,6 +291,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -293,6 +311,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
|
||||
@@ -2,9 +2,11 @@ package dev.inmo.tgbotapi.extensions.api.send.payments
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
||||
import korlibs.time.TimeSpan
|
||||
|
||||
public suspend fun TelegramBot.createInvoiceLink(
|
||||
title: String,
|
||||
@@ -24,7 +26,25 @@ public suspend fun TelegramBot.createInvoiceLink(
|
||||
shouldSendEmailToProvider: Boolean = false,
|
||||
priceDependOnShipAddress: Boolean = false
|
||||
): String = execute(
|
||||
CreateInvoiceLink(title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
|
||||
CreateInvoiceLink(
|
||||
title = title,
|
||||
description = description,
|
||||
payload = payload,
|
||||
providerToken = providerToken,
|
||||
currency = currency,
|
||||
prices = prices,
|
||||
subscriptionPeriod = null,
|
||||
maxTipAmount = maxTipAmount,
|
||||
suggestedTipAmounts = suggestedTipAmounts ?.sorted(),
|
||||
providerData = providerData,
|
||||
requireName = requireName,
|
||||
requirePhoneNumber = requirePhoneNumber,
|
||||
requireEmail = requireEmail,
|
||||
requireShippingAddress = requireShippingAddress,
|
||||
shouldSendPhoneNumberToProvider = shouldSendPhoneNumberToProvider,
|
||||
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||
priceDependOnShipAddress = priceDependOnShipAddress
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -35,6 +55,8 @@ public suspend fun TelegramBot.createInvoiceLink(
|
||||
description: String,
|
||||
payload: String,
|
||||
prices: List<LabeledPrice>,
|
||||
businessConnectionId: BusinessConnectionId? = null,
|
||||
subscriptionPeriod: TimeSpan? = null,
|
||||
maxTipAmount: Int? = null,
|
||||
suggestedTipAmounts: List<Int>? = null,
|
||||
providerData: String? = null,
|
||||
@@ -46,5 +68,24 @@ public suspend fun TelegramBot.createInvoiceLink(
|
||||
shouldSendEmailToProvider: Boolean = false,
|
||||
priceDependOnShipAddress: Boolean = false
|
||||
): String = execute(
|
||||
CreateInvoiceLink(title, description, payload, null, Currency.XTR, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
|
||||
CreateInvoiceLink(
|
||||
title = title,
|
||||
description = description,
|
||||
payload = payload,
|
||||
providerToken = null,
|
||||
currency = Currency.XTR,
|
||||
businessConnectionId = businessConnectionId,
|
||||
prices = prices,
|
||||
subscriptionPeriod = subscriptionPeriod,
|
||||
maxTipAmount = maxTipAmount,
|
||||
suggestedTipAmounts = suggestedTipAmounts ?.sorted(),
|
||||
providerData = providerData,
|
||||
requireName = requireName,
|
||||
requirePhoneNumber = requirePhoneNumber,
|
||||
requireEmail = requireEmail,
|
||||
requireShippingAddress = requireShippingAddress,
|
||||
shouldSendPhoneNumberToProvider = shouldSendPhoneNumberToProvider,
|
||||
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||
priceDependOnShipAddress = priceDependOnShipAddress
|
||||
)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.set
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.set.SetUserEmojiStatus
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import korlibs.time.DateTime
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
userId: UserId,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: TelegramDate? = null
|
||||
): Boolean = execute(
|
||||
SetUserEmojiStatus(
|
||||
userId = userId,
|
||||
customEmojiId = customEmojiId,
|
||||
expirationDate = expirationDate
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
user: User,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: TelegramDate? = null
|
||||
): Boolean = setUserEmojiStatus(
|
||||
user.id,
|
||||
customEmojiId,
|
||||
expirationDate
|
||||
)
|
||||
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
userId: UserId,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: DateTime
|
||||
): Boolean = setUserEmojiStatus(
|
||||
userId,
|
||||
customEmojiId,
|
||||
expirationDate.toTelegramDate()
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
user: User,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: DateTime
|
||||
): Boolean = setUserEmojiStatus(
|
||||
user.id,
|
||||
customEmojiId,
|
||||
expirationDate
|
||||
)
|
||||
@@ -0,0 +1,39 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.verifications.VerifyChat
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chatIdField
|
||||
import dev.inmo.tgbotapi.types.customDescriptionField
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.verifyChat(
|
||||
chatId: ChatIdentifier,
|
||||
description: String? = null
|
||||
): Boolean = execute(
|
||||
VerifyChat(
|
||||
chatId = chatId,
|
||||
description = description
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* This method may call [verifyUser] in case when [chat] is [PrivateChat]
|
||||
*/
|
||||
public suspend fun TelegramBot.verifyChat(
|
||||
chat: Chat,
|
||||
description: String? = null
|
||||
): Boolean = when (chat) {
|
||||
is PrivateChat -> verifyUser(
|
||||
chat = chat,
|
||||
description = description
|
||||
)
|
||||
is UnknownExtendedChat,
|
||||
is UnknownChatType,
|
||||
is BusinessChat,
|
||||
is PublicChat -> verifyChat(
|
||||
chatId = chat.id,
|
||||
description = description
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.verifications.VerifyChat
|
||||
import dev.inmo.tgbotapi.requests.verifications.VerifyUser
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.verifyUser(
|
||||
userId: UserId,
|
||||
description: String? = null
|
||||
): Boolean = execute(
|
||||
VerifyUser(
|
||||
userId = userId,
|
||||
description = description
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.verifyUser(
|
||||
chat: Chat,
|
||||
description: String? = null
|
||||
): Boolean = verifyUser(
|
||||
userId = chat.id.toChatId(),
|
||||
description = description
|
||||
)
|
||||
@@ -2,24 +2,22 @@ public abstract interface class dev/inmo/tgbotapi/extensions/behaviour_builder/B
|
||||
public static final field Companion Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$Companion;
|
||||
public abstract fun add (Lkotlin/reflect/KClass;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public abstract fun addStrict (Lkotlin/reflect/KClass;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public abstract fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public abstract fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public abstract fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public abstract fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public abstract fun getStateInitialAction ()Lkotlin/jvm/functions/Function3;
|
||||
public abstract fun start (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$Companion {
|
||||
public final fun invoke (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
public static synthetic fun invoke$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$Companion;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
public final fun getDATA_FSM_KEY ()Ljava/lang/String;
|
||||
public final fun invoke (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
public static synthetic fun invoke$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$Companion;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/util/List;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$DefaultImpls {
|
||||
public static synthetic fun add$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Lkotlin/reflect/KClass;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;ILjava/lang/Object;)V
|
||||
public static fun addStrict (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Lkotlin/reflect/KClass;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public static fun copy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public static fun copy (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public static fun getAllowedUpdates (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Ljava/util/List;
|
||||
public static fun getBot (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static fun getChannelPostMediaGroupsFlow (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Lkotlinx/coroutines/flow/Flow;
|
||||
@@ -34,14 +32,19 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourConte
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSMBuilderKt {
|
||||
public static final fun buildBehaviourWithFSM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSMAndStartLongPolling (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSMAndStartLongPolling (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSMAndStartLongPolling$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSMAndStartLongPolling$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSMAndStartLongPolling (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun buildBehaviourWithFSMAndStartLongPolling (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSMAndStartLongPolling$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun buildBehaviourWithFSMAndStartLongPolling$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/flow/Flow;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSMKt {
|
||||
public static final fun fsmOrNull (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;)Ldev/inmo/micro_utils/fsm/common/StatesMachine;
|
||||
public static final fun fsmOrThrow (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;)Ldev/inmo/micro_utils/fsm/common/StatesMachine;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler : dev/inmo/micro_utils/fsm/common/StatesHandler {
|
||||
@@ -62,18 +65,17 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithF
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM : dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext, dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM {
|
||||
public fun <init> (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun add (Lkotlin/reflect/KClass;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public fun addStrict (Lkotlin/reflect/KClass;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public fun close ()V
|
||||
public synthetic fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;
|
||||
public synthetic fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
public synthetic fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;
|
||||
public synthetic fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
public fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public fun execute (Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public final fun fsm ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehaviourContextWithFSM;
|
||||
public fun getAllUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getAllowedUpdates ()Ljava/util/List;
|
||||
public fun getAsUpdateReceiver ()Lkotlin/jvm/functions/Function2;
|
||||
@@ -91,6 +93,7 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
|
||||
public fun getChatMessageReactionsCountUpdatedUpdateFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getChosenInlineResultsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getCoroutineContext ()Lkotlin/coroutines/CoroutineContext;
|
||||
public fun getData ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextData;
|
||||
public fun getDeleteBusinessMessageUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getEditBusinessMessageUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getEditedChannelPostMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
@@ -108,6 +111,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
|
||||
public fun getPreCheckoutQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getScope ()Lkotlinx/coroutines/CoroutineScope;
|
||||
public fun getShippingQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getStateInitialAction ()Lkotlin/jvm/functions/Function3;
|
||||
public fun getSubcontextInitialAction ()Lkotlin/jvm/functions/Function3;
|
||||
public fun getTriggersHolder ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;
|
||||
public fun getUnknownUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun handleState (Ldev/inmo/micro_utils/fsm/common/StatesMachine;Ldev/inmo/micro_utils/fsm/common/State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -119,9 +124,9 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/TelegramBotWithFSMKt {
|
||||
public static final fun telegramBotWithBehaviourAndFSM (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSM$default (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun telegramBotWithBehaviourAndFSMAndStartLongPolling (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSMAndStartLongPolling$default (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun telegramBotWithBehaviourAndFSM (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSM$default (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun telegramBotWithBehaviourAndFSMAndStartLongPolling (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSMAndStartLongPolling$default (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import dev.inmo.micro_utils.fsm.common.*
|
||||
import dev.inmo.micro_utils.fsm.common.utils.StateHandlingErrorHandler
|
||||
import dev.inmo.micro_utils.fsm.common.utils.defaultStateHandlingErrorHandler
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextWithFSM.Companion.DATA_FSM_KEY
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder
|
||||
import kotlinx.coroutines.*
|
||||
@@ -22,6 +23,11 @@ import kotlin.reflect.KClass
|
||||
* @see buildBehaviourWithFSM
|
||||
*/
|
||||
interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T> {
|
||||
/**
|
||||
* Will be called BEFORE handling of [State] will be started
|
||||
*/
|
||||
val stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T>
|
||||
|
||||
suspend fun start() = start(this)
|
||||
|
||||
/**
|
||||
@@ -49,7 +55,8 @@ interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T
|
||||
broadcastChannelsSize: Int,
|
||||
onBufferOverflow: BufferOverflow,
|
||||
upstreamUpdatesFlow: Flow<Update>?,
|
||||
triggersHolder: TriggersHolder
|
||||
triggersHolder: TriggersHolder,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>
|
||||
): BehaviourContextWithFSM<T>
|
||||
|
||||
fun copy(
|
||||
@@ -58,35 +65,11 @@ interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T
|
||||
broadcastChannelsSize: Int = 100,
|
||||
onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,
|
||||
upstreamUpdatesFlow: Flow<Update>? = null,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = this.stateInitialAction,
|
||||
onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler()
|
||||
): BehaviourContextWithFSM<T> = copy(
|
||||
bot,
|
||||
scope,
|
||||
broadcastChannelsSize,
|
||||
onBufferOverflow,
|
||||
upstreamUpdatesFlow,
|
||||
triggersHolder
|
||||
)
|
||||
|
||||
fun copy(
|
||||
bot: TelegramBot = this.bot,
|
||||
scope: CoroutineScope = this.scope,
|
||||
broadcastChannelsSize: Int = 100,
|
||||
onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,
|
||||
upstreamUpdatesFlow: Flow<Update>? = null,
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler(),
|
||||
updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>? = null
|
||||
): BehaviourContextWithFSM<T> = copy(
|
||||
bot,
|
||||
scope,
|
||||
broadcastChannelsSize,
|
||||
onBufferOverflow,
|
||||
upstreamUpdatesFlow,
|
||||
triggersHolder,
|
||||
onStateHandlingErrorHandler
|
||||
)
|
||||
): BehaviourContextWithFSM<T>
|
||||
|
||||
companion object {
|
||||
operator fun <T : State> invoke(
|
||||
@@ -94,8 +77,11 @@ interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T
|
||||
handlers: List<BehaviourWithFSMStateHandlerHolder<*, T>>,
|
||||
statesManager: StatesManager<T>,
|
||||
fallbackHandler: BehaviourWithFSMStateHandlerHolder<T, T>? = null,
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler()
|
||||
) = DefaultBehaviourContextWithFSM<T>(behaviourContext, statesManager, handlers, fallbackHandler, onStateHandlingErrorHandler)
|
||||
) = DefaultBehaviourContextWithFSM<T>(behaviourContext, statesManager, handlers, fallbackHandler, stateInitialAction, onStateHandlingErrorHandler)
|
||||
|
||||
val DATA_FSM_KEY = "ktgbotapi_fsm"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +117,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
private val statesManager: StatesManager<T>,
|
||||
private val handlers: List<BehaviourWithFSMStateHandlerHolder<*, T>>,
|
||||
private val fallbackHandler: BehaviourWithFSMStateHandlerHolder<T, T>? = null,
|
||||
override val stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
private val onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler()
|
||||
) : BehaviourContext by behaviourContext, BehaviourContextWithFSM<T> {
|
||||
private val updatesFlows = mutableMapOf<Any, DefaultBehaviourContextWithFSM<T>>()
|
||||
@@ -140,6 +127,10 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
protected val statesJobs = mutableMapOf<T, Job>()
|
||||
protected val statesJobsMutex = Mutex()
|
||||
|
||||
init {
|
||||
data[DATA_FSM_KEY] = this
|
||||
}
|
||||
|
||||
override suspend fun launchStateHandling(state: T, handlers: List<CheckableHandlerHolder<in T, T>>): T? {
|
||||
return launchStateHandling(state, handlers, onStateHandlingErrorHandler)
|
||||
}
|
||||
@@ -151,7 +142,9 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
override suspend fun StatesMachine<in T>.handleState(state: T): T? {
|
||||
return getSubContext(
|
||||
state.context
|
||||
).launchStateHandling(
|
||||
).apply {
|
||||
stateInitialAction(state)
|
||||
}.launchStateHandling(
|
||||
state,
|
||||
actualHandlersList
|
||||
)
|
||||
@@ -247,13 +240,23 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
broadcastChannelsSize: Int,
|
||||
onBufferOverflow: BufferOverflow,
|
||||
upstreamUpdatesFlow: Flow<Update>?,
|
||||
triggersHolder: TriggersHolder
|
||||
triggersHolder: TriggersHolder,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>
|
||||
): DefaultBehaviourContextWithFSM<T> = BehaviourContextWithFSM(
|
||||
behaviourContext.copy(bot, scope, broadcastChannelsSize, onBufferOverflow, upstreamUpdatesFlow, triggersHolder),
|
||||
handlers,
|
||||
statesManager,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler
|
||||
behaviourContext = behaviourContext.copy(
|
||||
bot = bot,
|
||||
scope = scope,
|
||||
broadcastChannelsSize = broadcastChannelsSize,
|
||||
onBufferOverflow = onBufferOverflow,
|
||||
upstreamUpdatesFlow = upstreamUpdatesFlow,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
triggersHolder = triggersHolder
|
||||
),
|
||||
handlers = handlers,
|
||||
statesManager = statesManager,
|
||||
fallbackHandler = fallbackHandler,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler,
|
||||
stateInitialAction = stateInitialAction
|
||||
)
|
||||
|
||||
override fun copy(
|
||||
@@ -262,13 +265,40 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
broadcastChannelsSize: Int,
|
||||
onBufferOverflow: BufferOverflow,
|
||||
upstreamUpdatesFlow: Flow<Update>?,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>,
|
||||
triggersHolder: TriggersHolder,
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T>,
|
||||
onStateHandlingErrorHandler: StateHandlingErrorHandler<T>
|
||||
): DefaultBehaviourContextWithFSM<T> = BehaviourContextWithFSM(
|
||||
behaviourContext.copy(bot, scope, broadcastChannelsSize, onBufferOverflow, upstreamUpdatesFlow, triggersHolder),
|
||||
handlers,
|
||||
statesManager,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler
|
||||
): BehaviourContextWithFSM<T> = BehaviourContextWithFSM(
|
||||
behaviourContext = behaviourContext.copy(
|
||||
bot = bot,
|
||||
scope = scope,
|
||||
broadcastChannelsSize = broadcastChannelsSize,
|
||||
onBufferOverflow = onBufferOverflow,
|
||||
upstreamUpdatesFlow = upstreamUpdatesFlow,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
triggersHolder = triggersHolder
|
||||
),
|
||||
handlers = handlers,
|
||||
statesManager = statesManager,
|
||||
fallbackHandler = fallbackHandler,
|
||||
stateInitialAction = stateInitialAction,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler
|
||||
)
|
||||
|
||||
fun fsm() = this
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracting from [BehaviourContext.data] exists [StatesMachine] by key [DATA_FSM_KEY], which usually some [BehaviourContextWithFSM].
|
||||
* In case if value absent in [BehaviourContext.data] will return null
|
||||
*/
|
||||
fun <T : State> BehaviourContext.fsmOrNull(): StatesMachine<T>? = data[DATA_FSM_KEY] as? StatesMachine<T>
|
||||
|
||||
/**
|
||||
* Extracting from [BehaviourContext.data] exists [StatesMachine] by key [DATA_FSM_KEY], which usually some [BehaviourContextWithFSM].
|
||||
* In case if value absent in [BehaviourContext.data] will throw [NullPointerException]
|
||||
*
|
||||
* @throws NullPointerException
|
||||
*/
|
||||
fun <T : State> BehaviourContext.fsmOrThrow(): StatesMachine<T> = fsmOrNull<T>()!!
|
||||
|
||||
@@ -33,17 +33,21 @@ suspend fun <T : State> TelegramBot.buildBehaviourWithFSM(
|
||||
presetHandlers: List<BehaviourWithFSMStateHandlerHolder<*, T>> = listOf(),
|
||||
fallbackHandler: BehaviourWithFSMStateHandlerHolder<T, T>? = null,
|
||||
onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler(),
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): DefaultBehaviourContextWithFSM<T> = BehaviourContextWithFSM(
|
||||
DefaultBehaviourContext(
|
||||
this,
|
||||
defaultExceptionsHandler ?.let { scope + ContextSafelyExceptionHandler(it) } ?: scope,
|
||||
upstreamUpdatesFlow = upstreamUpdatesFlow
|
||||
behaviourContext = DefaultBehaviourContext(
|
||||
bot = this,
|
||||
scope = defaultExceptionsHandler ?.let { scope + ContextSafelyExceptionHandler(it) } ?: scope,
|
||||
upstreamUpdatesFlow = upstreamUpdatesFlow,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
),
|
||||
presetHandlers,
|
||||
statesManager,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler
|
||||
handlers = presetHandlers,
|
||||
statesManager = statesManager,
|
||||
fallbackHandler = fallbackHandler,
|
||||
stateInitialAction = stateInitialAction,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler
|
||||
).apply { block() }
|
||||
|
||||
/**
|
||||
@@ -67,16 +71,20 @@ suspend fun <T : State> TelegramBot.buildBehaviourWithFSMAndStartLongPolling(
|
||||
autoDisableWebhooks: Boolean = true,
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): Pair<DefaultBehaviourContextWithFSM<T>, Job> = buildBehaviourWithFSM(
|
||||
upstreamUpdatesFlow,
|
||||
scope,
|
||||
defaultExceptionsHandler,
|
||||
statesManager,
|
||||
presetHandlers,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler,
|
||||
block
|
||||
upstreamUpdatesFlow = upstreamUpdatesFlow,
|
||||
scope = scope,
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
statesManager = statesManager,
|
||||
presetHandlers = presetHandlers,
|
||||
fallbackHandler = fallbackHandler,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
stateInitialAction = stateInitialAction,
|
||||
block = block
|
||||
).run {
|
||||
this to scope.launch {
|
||||
start()
|
||||
@@ -110,16 +118,20 @@ suspend fun <T : State> TelegramBot.buildBehaviourWithFSM(
|
||||
presetHandlers: List<BehaviourWithFSMStateHandlerHolder<*, T>> = listOf(),
|
||||
fallbackHandler: BehaviourWithFSMStateHandlerHolder<T, T>? = null,
|
||||
onStateHandlingErrorHandler: StateHandlingErrorHandler<T> = defaultStateHandlingErrorHandler(),
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): DefaultBehaviourContextWithFSM<T> = BehaviourContextWithFSM(
|
||||
DefaultBehaviourContext(
|
||||
this,
|
||||
defaultExceptionsHandler ?.let { scope + ContextSafelyExceptionHandler(it) } ?: scope,
|
||||
upstreamUpdatesFlow = flowUpdatesFilter.allUpdatesFlow
|
||||
upstreamUpdatesFlow = flowUpdatesFilter.allUpdatesFlow,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
),
|
||||
presetHandlers,
|
||||
statesManager,
|
||||
fallbackHandler,
|
||||
stateInitialAction,
|
||||
onStateHandlingErrorHandler
|
||||
).apply { block() }
|
||||
|
||||
@@ -149,27 +161,31 @@ suspend fun <T : State> TelegramBot.buildBehaviourWithFSMAndStartLongPolling(
|
||||
autoDisableWebhooks: Boolean = true,
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
) = FlowsUpdatesFilter().let {
|
||||
buildBehaviourWithFSM(
|
||||
it,
|
||||
scope,
|
||||
defaultExceptionsHandler,
|
||||
statesManager,
|
||||
presetHandlers,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler,
|
||||
block
|
||||
flowUpdatesFilter = it,
|
||||
scope = scope,
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
statesManager = statesManager,
|
||||
presetHandlers = presetHandlers,
|
||||
fallbackHandler = fallbackHandler,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
stateInitialAction = stateInitialAction,
|
||||
block = block
|
||||
).run {
|
||||
start()
|
||||
longPolling(
|
||||
flowsUpdatesFilter,
|
||||
timeoutSeconds,
|
||||
scope,
|
||||
autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis,
|
||||
defaultExceptionsHandler
|
||||
updatesFilter = flowsUpdatesFilter,
|
||||
timeoutSeconds = timeoutSeconds,
|
||||
scope = scope,
|
||||
autoDisableWebhooks = autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions = autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis = mediaGroupsDebounceTimeMillis,
|
||||
exceptionsHandler = defaultExceptionsHandler
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdatesByLongPolling
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
@@ -53,6 +54,8 @@ suspend fun <T : State> telegramBotWithBehaviourAndFSM(
|
||||
autoDisableWebhooks: Boolean = true,
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): TelegramBot = telegramBot(
|
||||
token,
|
||||
@@ -61,18 +64,20 @@ suspend fun <T : State> telegramBotWithBehaviourAndFSM(
|
||||
builder
|
||||
).apply {
|
||||
buildBehaviourWithFSMAndStartLongPolling(
|
||||
flowsUpdatesFilter.allUpdatesFlow,
|
||||
scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler,
|
||||
statesManager,
|
||||
presetHandlers,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler,
|
||||
timeoutSeconds,
|
||||
autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis,
|
||||
block
|
||||
upstreamUpdatesFlow = flowsUpdatesFilter.allUpdatesFlow,
|
||||
scope = scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
statesManager = statesManager,
|
||||
presetHandlers = presetHandlers,
|
||||
fallbackHandler = fallbackHandler,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler,
|
||||
timeoutSeconds = timeoutSeconds,
|
||||
autoDisableWebhooks = autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions = autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis = mediaGroupsDebounceTimeMillis,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
stateInitialAction = stateInitialAction,
|
||||
block = block
|
||||
)
|
||||
}
|
||||
|
||||
@@ -106,6 +111,8 @@ suspend fun <T : State> telegramBotWithBehaviourAndFSMAndStartLongPolling(
|
||||
autoDisableWebhooks: Boolean = true,
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): Pair<TelegramBot, Job> {
|
||||
return telegramBot(
|
||||
@@ -115,17 +122,19 @@ suspend fun <T : State> telegramBotWithBehaviourAndFSMAndStartLongPolling(
|
||||
builder
|
||||
).let {
|
||||
it to it.buildBehaviourWithFSMAndStartLongPolling (
|
||||
scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler,
|
||||
statesManager,
|
||||
presetHandlers,
|
||||
fallbackHandler,
|
||||
onStateHandlingErrorHandler,
|
||||
timeoutSeconds,
|
||||
autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis,
|
||||
block
|
||||
scope = scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
statesManager = statesManager,
|
||||
presetHandlers = presetHandlers,
|
||||
fallbackHandler = fallbackHandler,
|
||||
onStateHandlingErrorHandler = onStateHandlingErrorHandler,
|
||||
timeoutSeconds = timeoutSeconds,
|
||||
autoDisableWebhooks = autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions = autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis = mediaGroupsDebounceTimeMillis,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
stateInitialAction = stateInitialAction,
|
||||
block = block
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.kslog.common.e
|
||||
import dev.inmo.micro_utils.coroutines.ContextSafelyExceptionHandler
|
||||
import dev.inmo.micro_utils.coroutines.ExceptionHandler
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.extensions.DefaultKTgBotAPIPrivacyCommand
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.longPolling
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdatesByLongPolling
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import kotlinx.coroutines.*
|
||||
|
||||
/**
|
||||
@@ -32,17 +30,19 @@ suspend fun TelegramBot.buildBehaviour(
|
||||
flowUpdatesFilter: FlowsUpdatesFilter = FlowsUpdatesFilter(),
|
||||
scope: CoroutineScope = defaultCoroutineScopeProvider(),
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
): BehaviourContext = BehaviourContext(
|
||||
this,
|
||||
scope.let {
|
||||
if (defaultExceptionsHandler == null) {
|
||||
it
|
||||
} else {
|
||||
it + ContextSafelyExceptionHandler(defaultExceptionsHandler)
|
||||
}
|
||||
bot = this,
|
||||
scope = scope.let {
|
||||
if (defaultExceptionsHandler == null) {
|
||||
it
|
||||
} else {
|
||||
it + ContextSafelyExceptionHandler(defaultExceptionsHandler)
|
||||
}
|
||||
},
|
||||
flowUpdatesFilter
|
||||
flowsUpdatesFilter = flowUpdatesFilter,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
).apply {
|
||||
block()
|
||||
}
|
||||
@@ -66,11 +66,13 @@ suspend fun TelegramBot.buildBehaviourWithLongPolling(
|
||||
autoDisableWebhooks: Boolean = true,
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
): Job {
|
||||
val behaviourContext = buildBehaviour(
|
||||
scope = scope,
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
block = block
|
||||
)
|
||||
return longPolling(
|
||||
|
||||
@@ -52,13 +52,24 @@ interface BehaviourContext : FlowsUpdatesFilter, TelegramBot, CoroutineScope {
|
||||
|
||||
val triggersHolder: TriggersHolder
|
||||
|
||||
/**
|
||||
* Data filled by [subcontextInitialAction] or in any other way
|
||||
*/
|
||||
val data: BehaviourContextData
|
||||
|
||||
/**
|
||||
* Will be called on any initial subcontext action before some consumer will be called
|
||||
*/
|
||||
val subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>
|
||||
|
||||
fun copy(
|
||||
bot: TelegramBot = this.bot,
|
||||
scope: CoroutineScope = this.scope,
|
||||
broadcastChannelsSize: Int = 100,
|
||||
onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,
|
||||
upstreamUpdatesFlow: Flow<Update>? = null,
|
||||
triggersHolder: TriggersHolder = TriggersHolder()
|
||||
triggersHolder: TriggersHolder = TriggersHolder(),
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = this.subcontextInitialAction
|
||||
): BehaviourContext
|
||||
}
|
||||
|
||||
@@ -68,7 +79,8 @@ class DefaultBehaviourContext(
|
||||
broadcastChannelsSize: Int = 100,
|
||||
onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,
|
||||
private val upstreamUpdatesFlow: Flow<Update>? = null,
|
||||
override val triggersHolder: TriggersHolder = TriggersHolder()
|
||||
override val triggersHolder: TriggersHolder = TriggersHolder(),
|
||||
override val subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {}
|
||||
) : AbstractFlowsUpdatesFilter(), TelegramBot by bot, CoroutineScope by scope, BehaviourContext {
|
||||
|
||||
private val additionalUpdatesSharedFlow = MutableSharedFlow<Update>(0, broadcastChannelsSize, onBufferOverflow)
|
||||
@@ -92,14 +104,27 @@ class DefaultBehaviourContext(
|
||||
}.accumulatorFlow(WeakScope(scope))
|
||||
override val asUpdateReceiver: UpdateReceiver<Update> = additionalUpdatesSharedFlow::emit
|
||||
|
||||
override val data: BehaviourContextData = BehaviourContextData()
|
||||
|
||||
override fun copy(
|
||||
bot: TelegramBot,
|
||||
scope: CoroutineScope,
|
||||
broadcastChannelsSize: Int,
|
||||
onBufferOverflow: BufferOverflow,
|
||||
upstreamUpdatesFlow: Flow<Update>?,
|
||||
triggersHolder: TriggersHolder
|
||||
): DefaultBehaviourContext = DefaultBehaviourContext(bot, scope, broadcastChannelsSize, onBufferOverflow, upstreamUpdatesFlow, triggersHolder)
|
||||
triggersHolder: TriggersHolder,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>
|
||||
): DefaultBehaviourContext = DefaultBehaviourContext(
|
||||
bot = bot,
|
||||
scope = scope,
|
||||
broadcastChannelsSize = broadcastChannelsSize,
|
||||
onBufferOverflow = onBufferOverflow,
|
||||
upstreamUpdatesFlow = upstreamUpdatesFlow,
|
||||
triggersHolder = triggersHolder,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
).apply {
|
||||
data.include(this@DefaultBehaviourContext.data)
|
||||
}
|
||||
}
|
||||
|
||||
fun BehaviourContext(
|
||||
@@ -107,15 +132,17 @@ fun BehaviourContext(
|
||||
scope: CoroutineScope,
|
||||
flowsUpdatesFilter: FlowsUpdatesFilter = FlowsUpdatesFilter(),
|
||||
triggersHolder: TriggersHolder = TriggersHolder(),
|
||||
) = DefaultBehaviourContext(bot, scope, upstreamUpdatesFlow = flowsUpdatesFilter.allUpdatesFlow, triggersHolder = triggersHolder)
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {}
|
||||
) = DefaultBehaviourContext(bot, scope, upstreamUpdatesFlow = flowsUpdatesFilter.allUpdatesFlow, triggersHolder = triggersHolder, subcontextInitialAction = subcontextInitialAction)
|
||||
|
||||
inline fun <T> BehaviourContext(
|
||||
bot: TelegramBot,
|
||||
scope: CoroutineScope,
|
||||
flowsUpdatesFilter: FlowsUpdatesFilter = FlowsUpdatesFilter(),
|
||||
triggersHolder: TriggersHolder = TriggersHolder(),
|
||||
noinline subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
crossinline block: BehaviourContext.() -> T
|
||||
) = DefaultBehaviourContext(bot, scope, upstreamUpdatesFlow = flowsUpdatesFilter.allUpdatesFlow, triggersHolder = triggersHolder).run(block)
|
||||
) = DefaultBehaviourContext(bot, scope, upstreamUpdatesFlow = flowsUpdatesFilter.allUpdatesFlow, triggersHolder = triggersHolder, subcontextInitialAction = subcontextInitialAction).run(block)
|
||||
|
||||
/**
|
||||
* Creates new [BehaviourContext] using its [BehaviourContext.copy] method
|
||||
@@ -126,10 +153,12 @@ fun <BC : BehaviourContext> BC.createSubContext(
|
||||
scope: CoroutineScope = LinkedSupervisorScope(),
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = this.subcontextInitialAction,
|
||||
) = copy(
|
||||
scope = scope,
|
||||
upstreamUpdatesFlow = updatesUpstreamFlow,
|
||||
triggersHolder = triggersHolder
|
||||
triggersHolder = triggersHolder,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
) as BC
|
||||
|
||||
/**
|
||||
@@ -155,13 +184,19 @@ suspend fun <T, BC : BehaviourContext> BC.doInContext(
|
||||
suspend fun <T, BC : BehaviourContext> BC.createSubContextAndDoSynchronouslyWithUpdatesFilter(
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
additionalSubcontextInitialAction: (CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>)? = null,
|
||||
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
|
||||
): T {
|
||||
return supervisorScope {
|
||||
createSubContext(
|
||||
scope = this@supervisorScope,
|
||||
triggersHolder = triggersHolder,
|
||||
updatesUpstreamFlow = updatesUpstreamFlow
|
||||
updatesUpstreamFlow = updatesUpstreamFlow,
|
||||
subcontextInitialAction = if (additionalSubcontextInitialAction == null) {
|
||||
subcontextInitialAction
|
||||
} else {
|
||||
{ subcontextInitialAction(it); additionalSubcontextInitialAction(it) }
|
||||
}
|
||||
).behaviourContextReceiver()
|
||||
}
|
||||
}
|
||||
@@ -175,15 +210,17 @@ suspend fun <T, BC : BehaviourContext> BC.createSubContextAndDoAsynchronouslyWit
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
context: CoroutineContext = EmptyCoroutineContext,
|
||||
start: CoroutineStart = CoroutineStart.DEFAULT,
|
||||
additionalSubcontextInitialAction: (CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>)? = null,
|
||||
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
|
||||
): Deferred<T> = async(
|
||||
context,
|
||||
start
|
||||
) {
|
||||
createSubContextAndDoSynchronouslyWithUpdatesFilter(
|
||||
triggersHolder,
|
||||
updatesUpstreamFlow,
|
||||
behaviourContextReceiver
|
||||
triggersHolder = triggersHolder,
|
||||
updatesUpstreamFlow = updatesUpstreamFlow,
|
||||
additionalSubcontextInitialAction = additionalSubcontextInitialAction,
|
||||
behaviourContextReceiver = behaviourContextReceiver
|
||||
)
|
||||
}
|
||||
|
||||
@@ -202,8 +239,14 @@ suspend fun <T, BC : BehaviourContext> BC.createSubContextAndDoAsynchronouslyWit
|
||||
suspend fun <T, BC : BehaviourContext> BC.createSubContextAndDoWithUpdatesFilter(
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
additionalSubcontextInitialAction: (CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>)? = null,
|
||||
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
|
||||
): Deferred<T> = createSubContextAndDoAsynchronouslyWithUpdatesFilter(triggersHolder, updatesUpstreamFlow, behaviourContextReceiver = behaviourContextReceiver)
|
||||
): Deferred<T> = createSubContextAndDoAsynchronouslyWithUpdatesFilter(
|
||||
triggersHolder = triggersHolder,
|
||||
updatesUpstreamFlow = updatesUpstreamFlow,
|
||||
additionalSubcontextInitialAction = additionalSubcontextInitialAction,
|
||||
behaviourContextReceiver = behaviourContextReceiver
|
||||
)
|
||||
|
||||
/**
|
||||
* This method will cancel ALL subsequent contexts, expectations and waiters
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
data class BehaviourContextData(
|
||||
private val data: MutableMap<String, Any?> = mutableMapOf()
|
||||
) : MutableMap<String, Any?> by data {
|
||||
fun mergedWith(other: BehaviourContextData): BehaviourContextData = BehaviourContextData(
|
||||
data.toMutableMap().apply {
|
||||
putAll(other.data)
|
||||
}
|
||||
)
|
||||
|
||||
fun include(other: BehaviourContextData) {
|
||||
data.putAll(other.data)
|
||||
}
|
||||
|
||||
operator fun plus(other: BehaviourContextData): BehaviourContextData = mergedWith(other)
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.kslog.common.error
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
/**
|
||||
* Contains [SubAction]s which will be used in [subcontextInitialAction] in order they has been passed in [subactions].
|
||||
*
|
||||
* Its [subcontextInitialAction] will iterate over incoming [subactions] until all will be completed successfully OR
|
||||
* none will be successful during round of running:
|
||||
*
|
||||
* * Run all
|
||||
* * Exclude from current running successful items
|
||||
* * Do again if there are some items to run
|
||||
*/
|
||||
class CombinedSubcontextInitialAction(
|
||||
val subactions: List<SubAction>,
|
||||
private val logger: KSLog = KSLog("CombinedSubcontextInitialAction_${subactions.size}")
|
||||
) {
|
||||
/**
|
||||
* Represents interface-like variant of [CustomBehaviourContextAndTypeReceiver] useful for [BehaviourContext]
|
||||
* builders
|
||||
*/
|
||||
fun interface SubAction {
|
||||
suspend operator fun BehaviourContext.invoke(update: Update)
|
||||
|
||||
class Callback(private val action: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>) : SubAction {
|
||||
override suspend fun BehaviourContext.invoke(update: Update) {
|
||||
action(update)
|
||||
}
|
||||
}
|
||||
}
|
||||
val subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = { update ->
|
||||
val leftSubActions = subactions.toMutableSet()
|
||||
val successSubActions = mutableSetOf<SubAction>()
|
||||
while (leftSubActions.isNotEmpty()) {
|
||||
leftSubActions.forEach { subaction ->
|
||||
with(subaction) {
|
||||
runCatching {
|
||||
invoke(update)
|
||||
}.onFailure {
|
||||
logger.error(it) {
|
||||
"Unable to execute $subaction for update $update. Will try on next round"
|
||||
}
|
||||
}.onSuccess {
|
||||
successSubActions.add(subaction)
|
||||
}
|
||||
}
|
||||
}
|
||||
leftSubActions.removeAll(successSubActions)
|
||||
if (successSubActions.isEmpty()) {
|
||||
logger.error {
|
||||
"Some SubActions have been unable to complete successfully:${leftSubActions.joinToString("\n") { it.toString() }}"
|
||||
}
|
||||
break
|
||||
}
|
||||
successSubActions.clear()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build [CombinedSubcontextInitialAction] with [block] and return callback, which appropriate for [BehaviourContext]
|
||||
* builders with `subcontextInitialAction` argument
|
||||
*/
|
||||
inline fun buildSubcontextInitialActionWithSubActions(
|
||||
block: MutableList<CombinedSubcontextInitialAction.SubAction>.() -> Unit
|
||||
): CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> {
|
||||
val list = mutableListOf<CombinedSubcontextInitialAction.SubAction>()
|
||||
list.block()
|
||||
return CombinedSubcontextInitialAction(
|
||||
list.toList()
|
||||
).subcontextInitialAction
|
||||
}
|
||||
|
||||
/**
|
||||
* Build [CombinedSubcontextInitialAction] with [block] and return callback, which appropriate for [BehaviourContext]
|
||||
* builders with `subcontextInitialAction` argument
|
||||
*/
|
||||
inline fun buildSubcontextInitialAction(
|
||||
block: MutableList<CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>>.() -> Unit
|
||||
): CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> {
|
||||
val list = mutableListOf<CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update>>()
|
||||
list.block()
|
||||
return CombinedSubcontextInitialAction(
|
||||
list.map {
|
||||
CombinedSubcontextInitialAction.SubAction.Callback(it)
|
||||
}
|
||||
).subcontextInitialAction
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.startGettingOfUpdatesByLongPolling
|
||||
import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMediaGroupsAdaptation
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
||||
import kotlinx.coroutines.*
|
||||
@@ -33,6 +34,7 @@ suspend fun telegramBotWithBehaviour(
|
||||
builder: KtorRequestsExecutorBuilder.() -> Unit = {},
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||
testServer: Boolean = false,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
): TelegramBot = telegramBot(
|
||||
token,
|
||||
@@ -41,10 +43,11 @@ suspend fun telegramBotWithBehaviour(
|
||||
builder
|
||||
).apply {
|
||||
buildBehaviour(
|
||||
flowsUpdatesFilter,
|
||||
scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler,
|
||||
block
|
||||
flowUpdatesFilter = flowsUpdatesFilter,
|
||||
scope = scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
block = block
|
||||
)
|
||||
}
|
||||
|
||||
@@ -76,6 +79,7 @@ suspend fun telegramBotWithBehaviourAndLongPolling(
|
||||
autoDisableWebhooks: Boolean = true,
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
): Pair<TelegramBot, Job> {
|
||||
return telegramBot(
|
||||
@@ -85,13 +89,14 @@ suspend fun telegramBotWithBehaviourAndLongPolling(
|
||||
builder
|
||||
).let {
|
||||
it to it.buildBehaviourWithLongPolling(
|
||||
scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler,
|
||||
timeoutSeconds,
|
||||
autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis,
|
||||
block
|
||||
scope = scope ?: CoroutineScope(coroutineContext),
|
||||
defaultExceptionsHandler = defaultExceptionsHandler,
|
||||
timeoutSeconds = timeoutSeconds,
|
||||
autoDisableWebhooks = autoDisableWebhooks,
|
||||
autoSkipTimeoutExceptions = autoSkipTimeoutExceptions,
|
||||
mediaGroupsDebounceTimeMillis = mediaGroupsDebounceTimeMillis,
|
||||
subcontextInitialAction = subcontextInitialAction,
|
||||
block = block
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,9 @@ suspend fun <BC : BehaviourContext> BC.onBusinessConnection(
|
||||
initialFilter: SimpleFilter<BusinessConnection>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BusinessConnection, Any>? = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BusinessConnection>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessConnection>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.businessConnectionUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -51,8 +52,9 @@ suspend fun <BC : BehaviourContext> BC.onBusinessConnectionEnabled(
|
||||
initialFilter: SimpleFilter<BusinessConnection.Enabled>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection.Enabled, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BusinessConnection.Enabled, Any>? = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BusinessConnection.Enabled>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessConnection.Enabled>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.businessConnectionUpdateOrNull() ?.data ?.enabledOrNull()) ?.let(::listOfNotNull)
|
||||
}
|
||||
/**
|
||||
@@ -72,8 +74,9 @@ suspend fun <BC : BehaviourContext> BC.onBusinessConnectionDisabled(
|
||||
initialFilter: SimpleFilter<BusinessConnection.Disabled>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection.Disabled, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BusinessConnection.Disabled, Any>? = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BusinessConnection.Disabled>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessConnection.Disabled>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.businessConnectionUpdateOrNull() ?.data ?.disabledOrNull()) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : CallbackQuery> B
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.callbackQueryUpdateOrNull() ?.data as? T) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -41,6 +42,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : DataCallbackQuer
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>
|
||||
): Job {
|
||||
val newInitialFilter = SimpleFilter<DataCallbackQuery> {
|
||||
@@ -51,6 +53,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : DataCallbackQuer
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
}.onFailure {
|
||||
@@ -84,11 +87,13 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in DataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DataCallbackQuery>
|
||||
) = onDataCallbackQueryCounted(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -112,6 +117,7 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in DataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DataCallbackQuery>
|
||||
) = onDataCallbackQuery(
|
||||
initialFilter = initialFilter * {
|
||||
@@ -119,6 +125,7 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -141,12 +148,14 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in DataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DataCallbackQuery>
|
||||
) = onDataCallbackQuery(
|
||||
Regex(data),
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -167,11 +176,13 @@ suspend fun <BC : BehaviourContext> BC.onGameShortNameCallbackQuery(
|
||||
initialFilter: SimpleFilter<GameShortNameCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GameShortNameCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in GameShortNameCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, GameShortNameCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, GameShortNameCallbackQuery>
|
||||
) = onCallbackQuery(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -192,11 +203,13 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineMessageIdCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineMessageIdCallbackQuery>
|
||||
) = onCallbackQuery(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -217,11 +230,13 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineMessageIdDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineMessageIdDataCallbackQuery>
|
||||
) = onDataCallbackQueryCounted(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -245,6 +260,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineMessageIdDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineMessageIdDataCallbackQuery>
|
||||
) = onInlineMessageIdDataCallbackQuery(
|
||||
initialFilter = initialFilter * {
|
||||
@@ -252,6 +268,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -274,12 +291,14 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineMessageIdDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineMessageIdDataCallbackQuery>
|
||||
) = onInlineMessageIdDataCallbackQuery(
|
||||
Regex(data),
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -300,11 +319,13 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdGameShortNameCallbackQue
|
||||
initialFilter: SimpleFilter<InlineMessageIdGameShortNameCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdGameShortNameCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdGameShortNameCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineMessageIdGameShortNameCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineMessageIdGameShortNameCallbackQuery>
|
||||
) = onCallbackQuery(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -325,11 +346,13 @@ suspend fun <BC : BehaviourContext> BC.onMessageCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MessageCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MessageCallbackQuery>
|
||||
) = onCallbackQuery(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -350,11 +373,13 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MessageDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MessageDataCallbackQuery>
|
||||
) = onDataCallbackQueryCounted(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -378,6 +403,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MessageDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MessageDataCallbackQuery>
|
||||
) = onMessageDataCallbackQuery(
|
||||
initialFilter = initialFilter * {
|
||||
@@ -385,6 +411,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -407,12 +434,14 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MessageDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MessageDataCallbackQuery>
|
||||
) = onMessageDataCallbackQuery(
|
||||
Regex(data),
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -433,11 +462,13 @@ suspend fun <BC : BehaviourContext> BC.onMessageGameShortNameCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageGameShortNameCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageGameShortNameCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageGameShortNameCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MessageGameShortNameCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MessageGameShortNameCallbackQuery>
|
||||
) = onCallbackQuery(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -458,10 +489,12 @@ suspend fun <BC : BehaviourContext> BC.onUnknownCallbackQueryType(
|
||||
initialFilter: SimpleFilter<UnknownCallbackQueryType>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, UnknownCallbackQueryType, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in UnknownCallbackQueryType, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, UnknownCallbackQueryType>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, UnknownCallbackQueryType>
|
||||
) = onCallbackQuery(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -29,11 +29,13 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in DataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DataCallbackQuery>
|
||||
) = onCallbackQuery (
|
||||
initialFilter * !SimpleFilter<MessageDataCallbackQuery> { triggersHolder.handleableCallbackQueriesDataHolder.isHandled(it) },
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -55,11 +57,13 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledInlineMessageIdDataCallbackQue
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineMessageIdDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineMessageIdDataCallbackQuery>
|
||||
) = onCallbackQuery (
|
||||
initialFilter * !SimpleFilter<InlineMessageIdDataCallbackQuery> { triggersHolder.handleableCallbackQueriesDataHolder.isHandled(it) },
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -81,10 +85,12 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledMessageDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MessageDataCallbackQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MessageDataCallbackQuery>
|
||||
) = onCallbackQuery(
|
||||
initialFilter * !SimpleFilter<MessageDataCallbackQuery> { triggersHolder.handleableCallbackQueriesDataHolder.isHandled(it) },
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -29,7 +29,8 @@ suspend fun <BC : BehaviourContext> BC.onChatBoostRemoved(
|
||||
initialFilter: SimpleFilter<ChatBoostRemoved>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatBoostRemoved, Update>? = null,
|
||||
markerFactory: MarkerFactory<ChatBoostRemoved, Any>? = ByIdChatBoostRemovedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatBoostRemoved>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatBoostRemoved>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.chatBoostRemovedUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ suspend fun <BC : BehaviourContext> BC.onChatBoostUpdated(
|
||||
initialFilter: SimpleFilter<ChatBoostUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatBoostUpdated, Update>? = null,
|
||||
markerFactory: MarkerFactory<ChatBoostUpdated, Any>? = ByIdChatBoostUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatBoostUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatBoostUpdated>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.chatBoostUpdatedUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ suspend fun <BC : BehaviourContext> BC.onChatJoinRequest(
|
||||
initialFilter: SimpleFilter<ChatJoinRequest>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatJoinRequest, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChatJoinRequest, Any>? = ByChatChatJoinRequestMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatJoinRequest>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatJoinRequest>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.chatJoinRequestUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -17,8 +17,9 @@ internal suspend inline fun <BC : BehaviourContext, reified U : ChatMemberUpdate
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
((it as? U) ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -40,11 +41,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberUpdated(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -65,11 +68,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberUpdated(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -90,11 +95,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberUpdated(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -115,11 +122,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberJoined(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberJoinedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -140,11 +149,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberLeft(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberLeftFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -165,11 +176,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberSubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberSubscribedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -190,11 +203,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberSubscriptionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberSubscriptionChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -215,11 +230,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberUnsubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberUnsubscribedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -240,11 +257,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotPromoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberGotPromotedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -265,11 +284,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotPromotionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberGotPromotionChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -290,11 +311,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotDemoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberGotDemotedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -315,11 +338,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberBecameOwner(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberBecameOwnerFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -340,11 +365,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberCeasedOwnership(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberCeasedOwnershipFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -365,11 +392,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotRestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberGotRestrictedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -390,11 +419,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotRestrictionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberGotRestrictionsChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -415,11 +446,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotUnrestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberGotUnrestrictedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -440,11 +473,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberKicked(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, ChatMemberUpdatedUpdate>(
|
||||
chatMemberKickedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -465,11 +500,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberJoined(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberJoinedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -490,11 +527,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberLeft(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberLeftFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -515,11 +554,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberSubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberSubscribedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -540,11 +581,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberSubscriptionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberSubscriptionChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -565,11 +608,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberUnsubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberUnsubscribedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -590,11 +635,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberGotPromotedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -615,11 +662,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromotionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberGotPromotionChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -640,11 +689,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotDemoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberGotDemotedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -665,11 +716,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberBecameOwner(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberBecameOwnerFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -690,11 +743,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberCeasedOwnership(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberCeasedOwnershipFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -715,11 +770,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberGotRestrictedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -740,11 +797,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestrictionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberGotRestrictionsChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -765,11 +824,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotUnrestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberGotUnrestrictedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -790,11 +851,13 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberKicked(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, CommonChatMemberUpdatedUpdate>(
|
||||
chatMemberKickedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -815,11 +878,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberJoined(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberJoinedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -840,11 +905,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberLeft(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberLeftFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -865,11 +932,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberSubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberSubscribedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -890,11 +959,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberSubscriptionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberSubscriptionChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -915,11 +986,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberUnsubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberUnsubscribedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -940,11 +1013,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotPromoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberGotPromotedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -965,11 +1040,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotPromotionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberGotPromotionChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -990,11 +1067,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotDemoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberGotDemotedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -1015,11 +1094,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberBecameOwner(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberBecameOwnerFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -1040,11 +1121,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberCeasedOwnership(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberCeasedOwnershipFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -1065,11 +1148,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotRestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberGotRestrictedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -1090,11 +1175,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotRestrictionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberGotRestrictionsChangedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -1115,11 +1202,13 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotUnrestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberGotUnrestrictedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -1140,10 +1229,12 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberKicked(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMemberUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMemberUpdated>
|
||||
) = onChatMemberUpdatedInternal<BC, MyChatMemberUpdatedUpdate>(
|
||||
chatMemberKickedFilter * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -33,7 +33,8 @@ suspend fun <BC : BehaviourContext> BC.onChatMessageReactionsCountUpdated(
|
||||
initialFilter: SimpleFilter<ChatMessageReactionsCountUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMessageReactionsCountUpdated, Update>? = null,
|
||||
markerFactory: MarkerFactory<ChatMessageReactionsCountUpdated, Any>? = ByChatIdChatMessageReactionsCountUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMessageReactionsCountUpdated>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMessageReactionsCountUpdated>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.chatMessageReactionsCountUpdatedUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -16,8 +16,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChatMessageReact
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByChatIdChatMessageReactionUpdatedMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.chatMessageReactionUpdatedUpdateOrNull() ?.data as? T) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -38,11 +39,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedByUser(
|
||||
initialFilter: SimpleFilter<ChatMessageReactionUpdated.ByUser>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMessageReactionUpdated.ByUser, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChatMessageReactionUpdated.ByUser, Any>? = ByChatIdChatMessageReactionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMessageReactionUpdated.ByUser>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMessageReactionUpdated.ByUser>
|
||||
) = onChatMessageReactionUpdated(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -63,11 +66,13 @@ suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedByChat(
|
||||
initialFilter: SimpleFilter<ChatMessageReactionUpdated.ByChat>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMessageReactionUpdated.ByChat, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChatMessageReactionUpdated.ByChat, Any>? = ByChatIdChatMessageReactionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMessageReactionUpdated.ByChat>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMessageReactionUpdated.ByChat>
|
||||
) = onChatMessageReactionUpdated(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -88,10 +93,12 @@ suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedUnknown(
|
||||
initialFilter: SimpleFilter<ChatMessageReactionUpdated.Unknown>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMessageReactionUpdated.Unknown, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChatMessageReactionUpdated.Unknown, Any>? = ByChatIdChatMessageReactionUpdatedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatMessageReactionUpdated.Unknown>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatMessageReactionUpdated.Unknown>
|
||||
) = onChatMessageReactionUpdated(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -14,8 +14,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChosenInlineResu
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.chosenInlineResultUpdateOrNull() ?.data as? T) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -36,11 +37,13 @@ suspend fun <BC : BehaviourContext> BC.onChosenInlineResult(
|
||||
initialFilter: SimpleFilter<ChosenInlineResult>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChosenInlineResult, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChosenInlineResult, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChosenInlineResult>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChosenInlineResult>
|
||||
) = onChosenInlineResultBase(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -61,11 +64,13 @@ suspend fun <BC : BehaviourContext> BC.onLocationChosenInlineResult(
|
||||
initialFilter: SimpleFilter<LocationChosenInlineResult>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationChosenInlineResult, Update>? = null,
|
||||
markerFactory: MarkerFactory<in LocationChosenInlineResult, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LocationChosenInlineResult>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LocationChosenInlineResult>
|
||||
) = onChosenInlineResultBase(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -86,10 +91,12 @@ suspend fun <BC : BehaviourContext> BC.onBaseChosenInlineResult(
|
||||
initialFilter: SimpleFilter<BaseChosenInlineResult>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BaseChosenInlineResult, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BaseChosenInlineResult, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BaseChosenInlineResult>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BaseChosenInlineResult>
|
||||
) = onChosenInlineResultBase(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -26,6 +26,7 @@ internal suspend fun <BC : BehaviourContext> BC.commandUncounted(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = onText(
|
||||
CommonMessageFilter<TextContent> { message ->
|
||||
@@ -44,6 +45,7 @@ internal suspend fun <BC : BehaviourContext> BC.commandUncounted(
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -53,6 +55,7 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = runCatchingSafely {
|
||||
commandUncounted(
|
||||
@@ -61,6 +64,7 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
}.onFailure {
|
||||
@@ -87,8 +91,9 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
) = command(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = command(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -101,8 +106,9 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
) = command(botCommand.command, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = command(botCommand.command, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -115,8 +121,9 @@ suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = command(commandRegex, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
): Job = command(commandRegex, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -129,8 +136,9 @@ suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = onCommand(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
): Job = onCommand(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -143,8 +151,9 @@ suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = onCommand(botCommand.command, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
): Job = onCommand(botCommand.command, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -156,6 +165,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Array<String>>
|
||||
) = command(
|
||||
@@ -182,6 +192,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Array<String>>
|
||||
) = commandWithArgs(
|
||||
@@ -203,6 +214,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Array<String>>
|
||||
) = commandWithArgs(
|
||||
@@ -224,6 +236,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>
|
||||
@@ -251,6 +264,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>
|
||||
@@ -274,6 +288,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>
|
||||
@@ -297,6 +312,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Array<String>>
|
||||
): Job = commandWithArgs(
|
||||
@@ -318,6 +334,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Array<String>>
|
||||
): Job = onCommandWithArgs(
|
||||
@@ -339,6 +356,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Array<String>>
|
||||
): Job = onCommandWithArgs(
|
||||
@@ -360,6 +378,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>
|
||||
@@ -383,6 +402,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>
|
||||
@@ -406,6 +426,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
|
||||
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>
|
||||
|
||||
@@ -27,6 +27,7 @@ suspend fun <BC : BehaviourContext> BC.unhandledCommand(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = onText(
|
||||
CommonMessageFilter<TextContent> { message ->
|
||||
@@ -46,6 +47,7 @@ suspend fun <BC : BehaviourContext> BC.unhandledCommand(
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -60,8 +62,9 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledCommand(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = unhandledCommand(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
): Job = unhandledCommand(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -73,6 +76,7 @@ suspend fun <BC : BehaviourContext> BC.unhandledCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Map<String, Array<String>>>
|
||||
) = onUnhandledCommand(
|
||||
requireOnlyCommandInMessage = false,
|
||||
@@ -96,5 +100,6 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, Map<String, Array<String>>>
|
||||
): Job = unhandledCommandWithArgs(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
): Job = unhandledCommandWithArgs(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -24,8 +24,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MessageContent>
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
when (it) {
|
||||
is BaseSentMessageUpdate -> it.data.whenCommonMessage(::listOfNotNull)
|
||||
else -> null
|
||||
@@ -52,11 +53,13 @@ suspend fun <BC : BehaviourContext> BC.onContentMessage(
|
||||
initialFilter: CommonMessageFilter<MessageContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MessageContent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MessageContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MessageContent>>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -77,11 +80,13 @@ suspend fun <BC : BehaviourContext> BC.onContact(
|
||||
initialFilter: CommonMessageFilter<ContactContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ContactMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ContactMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ContactMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ContactMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -102,11 +107,13 @@ suspend fun <BC : BehaviourContext> BC.onDice(
|
||||
initialFilter: CommonMessageFilter<DiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DiceMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DiceMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -127,11 +134,13 @@ suspend fun <BC : BehaviourContext> BC.onGame(
|
||||
initialFilter: CommonMessageFilter<GameContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GameMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GameMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, GameMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, GameMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -152,11 +161,13 @@ suspend fun <BC : BehaviourContext> BC.onLocation(
|
||||
initialFilter: CommonMessageFilter<LocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in LocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LocationMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LocationMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -177,11 +188,13 @@ suspend fun <BC : BehaviourContext> BC.onLiveLocation(
|
||||
initialFilter: CommonMessageFilter<LiveLocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LiveLocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in LiveLocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LiveLocationMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LiveLocationMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -202,11 +215,13 @@ suspend fun <BC : BehaviourContext> BC.onStaticLocation(
|
||||
initialFilter: CommonMessageFilter<StaticLocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StaticLocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StaticLocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, StaticLocationMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, StaticLocationMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -227,11 +242,13 @@ suspend fun <BC : BehaviourContext> BC.onPoll(
|
||||
initialFilter: CommonMessageFilter<PollContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PollMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PollMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PollMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PollMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -252,11 +269,13 @@ suspend fun <BC : BehaviourContext> BC.onText(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -277,11 +296,13 @@ suspend fun <BC : BehaviourContext> BC.onStory(
|
||||
initialFilter: CommonMessageFilter<StoryContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StoryMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StoryMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, StoryMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, StoryMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -302,11 +323,13 @@ suspend fun <BC : BehaviourContext> BC.onTextedContent(
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextedMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextedMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextedMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextedMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -327,11 +350,13 @@ suspend fun <BC : BehaviourContext> BC.onVenue(
|
||||
initialFilter: CommonMessageFilter<VenueContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VenueMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VenueMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VenueMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VenueMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -352,11 +377,13 @@ suspend fun <BC : BehaviourContext> BC.onAudioMediaGroup(
|
||||
initialFilter: CommonMessageFilter<AudioMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, AudioMediaGroupMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, AudioMediaGroupMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -377,11 +404,13 @@ suspend fun <BC : BehaviourContext> BC.onDocumentMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<DocumentMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DocumentMediaGroupMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DocumentMediaGroupMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -402,11 +431,13 @@ suspend fun <BC : BehaviourContext> BC.onTextedMediaContent(
|
||||
initialFilter: CommonMessageFilter<TextedMediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextedMediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextedMediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextedMediaMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextedMediaMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -427,11 +458,13 @@ suspend fun <BC : BehaviourContext> BC.onMediaCollection(
|
||||
initialFilter: CommonMessageFilter<MediaCollectionContent<TelegramMediaFile>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaCollectionMessage<TelegramMediaFile>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaCollectionMessage<TelegramMediaFile>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaCollectionMessage<TelegramMediaFile>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaCollectionMessage<TelegramMediaFile>>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -452,11 +485,13 @@ suspend fun <BC : BehaviourContext> BC.onMedia(
|
||||
initialFilter: CommonMessageFilter<MediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -477,11 +512,13 @@ suspend fun <BC : BehaviourContext> BC.onAnimation(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AnimationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AnimationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, AnimationMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, AnimationMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -502,11 +539,13 @@ suspend fun <BC : BehaviourContext> BC.onAudio(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, AudioMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, AudioMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -527,11 +566,13 @@ suspend fun <BC : BehaviourContext> BC.onDocument(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DocumentMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DocumentMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -552,11 +593,13 @@ suspend fun <BC : BehaviourContext> BC.onPhoto(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PhotoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PhotoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PhotoMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PhotoMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -577,11 +620,13 @@ suspend fun <BC : BehaviourContext> BC.onSticker(
|
||||
initialFilter: CommonMessageFilter<StickerContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StickerMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StickerMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, StickerMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, StickerMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -602,11 +647,13 @@ suspend fun <BC : BehaviourContext> BC.onVideo(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VideoMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VideoMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -627,11 +674,13 @@ suspend fun <BC : BehaviourContext> BC.onVideoNote(
|
||||
initialFilter: CommonMessageFilter<VideoNoteContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoNoteMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoNoteMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VideoNoteMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VideoNoteMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -652,11 +701,13 @@ suspend fun <BC : BehaviourContext> BC.onVoice(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VoiceMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VoiceMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -677,11 +728,13 @@ suspend fun <BC : BehaviourContext> BC.onInvoice(
|
||||
initialFilter: CommonMessageFilter<InvoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InvoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in InvoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InvoiceMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InvoiceMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -702,11 +755,13 @@ suspend fun <BC : BehaviourContext> BC.onVisualContent(
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VisualMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VisualMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VisualMediaGroupMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VisualMediaGroupMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -727,11 +782,13 @@ suspend fun <BC : BehaviourContext> BC.onMediaContent(
|
||||
initialFilter: CommonMessageFilter<MediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -752,11 +809,13 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayContent(
|
||||
initialFilter: CommonMessageFilter<GiveawayContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ScheduledGiveawayContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ScheduledGiveawayContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ScheduledGiveawayContentMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ScheduledGiveawayContentMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -778,11 +837,13 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayPublicResultsContent(
|
||||
initialFilter: CommonMessageFilter<GiveawayPublicResultsContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GiveawayPublicResultsContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GiveawayPublicResultsContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, GiveawayPublicResultsContentMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, GiveawayPublicResultsContentMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -805,8 +866,9 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayWinners(
|
||||
initialFilter: CommonMessageFilter<GiveawayPublicResultsContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GiveawayPublicResultsContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GiveawayPublicResultsContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, GiveawayPublicResultsContentMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, GiveawayPublicResultsContentMessage>
|
||||
) = onGiveawayPublicResultsContent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onGiveawayPublicResultsContent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -828,10 +890,12 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaInfoContent(
|
||||
initialFilter: CommonMessageFilter<PaidMediaInfoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaInfoContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PaidMediaInfoContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PaidMediaInfoContentMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PaidMediaInfoContentMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByC
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times
|
||||
import dev.inmo.tgbotapi.extensions.utils.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||
import dev.inmo.tgbotapi.types.message.content.TextMessage
|
||||
import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
|
||||
@@ -22,6 +23,7 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
initialFilter: SimpleFilter<Pair<TextMessage, String>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Pair<TextMessage, String>, Update>? = { (message, _), update -> MessageFilterByChat(this, message, update) },
|
||||
markerFactory: MarkerFactory<Pair<TextMessage, String>, Any>? = MarkerFactory { (message, _) -> ByChatMessageMarkerFactory(message) },
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, Pair<TextMessage, String>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, Pair<TextMessage, String>>
|
||||
): Job = on(
|
||||
markerFactory,
|
||||
@@ -31,6 +33,7 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
&& message.content.textSources.getOrNull(1) is RegularTextSource
|
||||
} * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver,
|
||||
) {
|
||||
(it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
|
||||
@@ -53,12 +56,13 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
initialFilter: SimpleFilter<Pair<TextMessage, String>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Pair<TextMessage, String>, Update>? = { (message, _), update -> MessageFilterByChat(this, message, update) },
|
||||
markerFactory: MarkerFactory<Pair<TextMessage, String>, Any>? = MarkerFactory { (message, _) -> ByChatMessageMarkerFactory(message) },
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, Pair<TextMessage, String>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, Pair<TextMessage, String>>
|
||||
): Job {
|
||||
val internalFilter = SimpleFilter<Pair<TextMessage, String>> {
|
||||
regex.matches(it.second)
|
||||
}
|
||||
return onDeepLink(initialFilter ?.let { internalFilter * it } ?: internalFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
return onDeepLink(initialFilter ?.let { internalFilter * it } ?: internalFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -71,5 +75,6 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
initialFilter: SimpleFilter<Pair<TextMessage, String>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Pair<TextMessage, String>, Update>? = { (message, _), update -> MessageFilterByChat(this, message, update) },
|
||||
markerFactory: MarkerFactory<Pair<TextMessage, String>, Any>? = MarkerFactory { (message, _) -> ByChatMessageMarkerFactory(message) },
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, Pair<TextMessage, String>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, Pair<TextMessage, String>>
|
||||
): Job = onDeepLink(Regex("^$deepLink$"), initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
): Job = onDeepLink(Regex("^$deepLink$"), initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -32,8 +32,9 @@ suspend fun <BC : BehaviourContext> BC.onBusinessMessagesDeleted(
|
||||
initialFilter: SimpleFilter<BusinessMessagesDeleted>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessMessagesDeleted, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BusinessMessagesDeleted, Any>? = ByBusinessConnectionIdBusinessMessagesDeletedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BusinessMessagesDeleted>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessMessagesDeleted>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.deletedBusinessMessageUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MessageContent>
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
it.baseEditMessageUpdateOrNull() ?.data ?.withContent<T>() ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -41,11 +42,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedContentMessage(
|
||||
initialFilter: CommonMessageFilter<MessageContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MessageContent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MessageContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MessageContent>>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -66,11 +69,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedContact(
|
||||
initialFilter: CommonMessageFilter<ContactContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ContactMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ContactMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ContactMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ContactMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -91,11 +96,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedDice(
|
||||
initialFilter: CommonMessageFilter<DiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DiceMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DiceMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -116,11 +123,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedGame(
|
||||
initialFilter: CommonMessageFilter<GameContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GameMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GameMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, GameMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, GameMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -141,11 +150,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedLocation(
|
||||
initialFilter: CommonMessageFilter<LocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in LocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LocationMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LocationMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -166,11 +177,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedText(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -191,11 +204,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedVenue(
|
||||
initialFilter: CommonMessageFilter<VenueContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VenueMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VenueMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VenueMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VenueMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -216,11 +231,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedAudioMediaGroup(
|
||||
initialFilter: CommonMessageFilter<AudioMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, AudioMediaGroupMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, AudioMediaGroupMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -241,11 +258,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedDocumentMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<DocumentMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DocumentMediaGroupMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DocumentMediaGroupMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -266,11 +285,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedTextedMediaContent(
|
||||
initialFilter: CommonMessageFilter<TextedMediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextedMediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextedMediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextedMediaMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextedMediaMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -291,11 +312,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedMediaCollection(
|
||||
initialFilter: CommonMessageFilter<MediaCollectionContent<TelegramMediaFile>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaCollectionMessage<TelegramMediaFile>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaCollectionMessage<TelegramMediaFile>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaCollectionMessage<TelegramMediaFile>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaCollectionMessage<TelegramMediaFile>>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -316,11 +339,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedMedia(
|
||||
initialFilter: CommonMessageFilter<MediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -341,11 +366,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedAnimation(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AnimationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AnimationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, AnimationMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, AnimationMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -366,11 +393,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedAudio(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, AudioMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, AudioMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -391,11 +420,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedDocument(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, DocumentMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, DocumentMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -416,11 +447,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedPhoto(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PhotoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PhotoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PhotoMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PhotoMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -441,11 +474,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedSticker(
|
||||
initialFilter: CommonMessageFilter<StickerContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StickerMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StickerMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, StickerMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, StickerMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -466,11 +501,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedVideo(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VideoMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VideoMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -491,11 +528,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedVideoNote(
|
||||
initialFilter: CommonMessageFilter<VideoNoteContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoNoteMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoNoteMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VideoNoteMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VideoNoteMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -516,11 +555,13 @@ suspend fun <BC : BehaviourContext> BC.onEditedVoice(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, VoiceMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, VoiceMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -541,10 +582,12 @@ suspend fun <BC : BehaviourContext> BC.onEditedInvoice(
|
||||
initialFilter: CommonMessageFilter<InvoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InvoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in InvoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InvoiceMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InvoiceMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -38,8 +38,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChatEvent> BC.on
|
||||
initialFilter: SimpleFilter<ChatEventMessage<T>>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<T>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<T>>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
(it.baseSentMessageUpdateOrNull() ?.data ?.chatEventMessageOrNull() ?.takeIf { it.chatEvent is T } as? ChatEventMessage<T>) ?.let(::listOfNotNull)
|
||||
}
|
||||
@@ -48,8 +49,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChatEvent, reifi
|
||||
initialFilter: SimpleFilter<CEM>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CEM, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CEM, Any>? = ByChatMessageMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CEM>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CEM>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
(it.baseSentMessageUpdateOrNull() ?.data ?.chatEventMessageOrNull() ?.takeIf { it.chatEvent is T } as? CEM) ?.let(::listOfNotNull)
|
||||
}
|
||||
@@ -71,8 +73,9 @@ suspend fun <BC : BehaviourContext> BC.onChannelEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChannelEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChannelEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChannelEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChannelEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChannelEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -91,8 +94,9 @@ suspend fun <BC : BehaviourContext> BC.onPrivateEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<PrivateEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<PrivateEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<PrivateEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<PrivateEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PrivateEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -111,8 +115,9 @@ suspend fun <BC : BehaviourContext> BC.onChatEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChatEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChatEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChatEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChatEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -131,8 +136,9 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<VideoChatEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -151,8 +157,9 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatStartedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatStarted>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatStarted>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatStarted>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<VideoChatStarted>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatStarted>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -171,8 +178,9 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatEndedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatEnded>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatEnded>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatEnded>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<VideoChatEnded>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatEnded>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -191,8 +199,9 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatParticipantsInvitedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<VideoChatParticipantsInvited>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<VideoChatParticipantsInvited>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<VideoChatParticipantsInvited>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<VideoChatParticipantsInvited>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<VideoChatParticipantsInvited>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -211,8 +220,9 @@ suspend fun <BC : BehaviourContext> BC.onMessageAutoDeleteTimerChangedEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<MessageAutoDeleteTimerChanged>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<MessageAutoDeleteTimerChanged>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<MessageAutoDeleteTimerChanged>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<MessageAutoDeleteTimerChanged>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<MessageAutoDeleteTimerChanged>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -231,8 +241,9 @@ suspend fun <BC : BehaviourContext> BC.onPublicChatEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<PublicChatEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<PublicChatEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<PublicChatEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<PublicChatEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PublicChatEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -251,8 +262,9 @@ suspend fun <BC : BehaviourContext> BC.onCommonEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<CommonEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<CommonEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<CommonEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<CommonEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<CommonEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -271,8 +283,9 @@ suspend fun <BC : BehaviourContext> BC.onGroupEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GroupEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GroupEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GroupEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GroupEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<GroupEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -291,8 +304,9 @@ suspend fun <BC : BehaviourContext> BC.onSupergroupEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<SupergroupEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<SupergroupEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<SupergroupEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<SupergroupEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<SupergroupEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -311,8 +325,9 @@ suspend fun <BC : BehaviourContext> BC.onChannelChatCreated(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChannelChatCreated>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChannelChatCreated>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChannelChatCreated>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChannelChatCreated>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChannelChatCreated>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -331,8 +346,9 @@ suspend fun <BC : BehaviourContext> BC.onDeleteChatPhoto(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<DeleteChatPhoto>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<DeleteChatPhoto>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<DeleteChatPhoto>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<DeleteChatPhoto>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<DeleteChatPhoto>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -351,8 +367,9 @@ suspend fun <BC : BehaviourContext> BC.onGroupChatCreated(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GroupChatCreated>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GroupChatCreated>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GroupChatCreated>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GroupChatCreated>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<GroupChatCreated>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -371,8 +388,9 @@ suspend fun <BC : BehaviourContext> BC.onLeftChatMember(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<LeftChatMemberEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<LeftChatMemberEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<LeftChatMemberEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<LeftChatMemberEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<LeftChatMemberEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -391,8 +409,9 @@ suspend fun <BC : BehaviourContext> BC.onNewChatMembers(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<NewChatMembers>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<NewChatMembers>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<NewChatMembers>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<NewChatMembers>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<NewChatMembers>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -411,8 +430,9 @@ suspend fun <BC : BehaviourContext> BC.onNewChatPhoto(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<NewChatPhoto>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<NewChatPhoto>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<NewChatPhoto>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<NewChatPhoto>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<NewChatPhoto>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -431,8 +451,9 @@ suspend fun <BC : BehaviourContext> BC.onNewChatTitle(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<NewChatTitle>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<NewChatTitle>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<NewChatTitle>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<NewChatTitle>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<NewChatTitle>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -451,8 +472,9 @@ suspend fun <BC : BehaviourContext> BC.onPinnedMessage(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<PinnedMessage>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<PinnedMessage>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<PinnedMessage>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<PinnedMessage>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PinnedMessage>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -471,8 +493,9 @@ suspend fun <BC : BehaviourContext> BC.onProximityAlertTriggered(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ProximityAlertTriggered>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ProximityAlertTriggered>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ProximityAlertTriggered>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ProximityAlertTriggered>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ProximityAlertTriggered>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -491,8 +514,9 @@ suspend fun <BC : BehaviourContext> BC.onSupergroupChatCreated(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<SupergroupChatCreated>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<SupergroupChatCreated>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<SupergroupChatCreated>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<SupergroupChatCreated>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<SupergroupChatCreated>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* Please, remember that [SuccessfulPaymentEvent] will be retrieved only in case you will correctly handle
|
||||
@@ -514,8 +538,9 @@ suspend fun <BC : BehaviourContext> BC.onSuccessfulPayment(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<SuccessfulPaymentEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<SuccessfulPaymentEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<SuccessfulPaymentEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<SuccessfulPaymentEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<SuccessfulPaymentEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -534,8 +559,9 @@ suspend fun <BC : BehaviourContext> BC.onRefundedPayment(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<RefundedPaymentEvent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<RefundedPaymentEvent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<RefundedPaymentEvent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<RefundedPaymentEvent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<RefundedPaymentEvent>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -554,8 +580,9 @@ suspend fun <BC : BehaviourContext> BC.onUserLoggedIn(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<UserLoggedIn>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<UserLoggedIn>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<UserLoggedIn>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<UserLoggedIn>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<UserLoggedIn>>
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEvent(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -574,8 +601,9 @@ suspend fun <BC : BehaviourContext> BC.onWebAppData(
|
||||
initialFilter: SimpleFilter<PrivateEventMessage<WebAppData>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PrivateEventMessage<WebAppData>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<WebAppData>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<WebAppData>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PrivateEventMessage<WebAppData>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -594,8 +622,9 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicClosed(
|
||||
initialFilter: SimpleFilter<SupergroupEventMessage<ForumTopicClosed>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, SupergroupEventMessage<ForumTopicClosed>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ForumTopicClosed>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ForumTopicClosed>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, SupergroupEventMessage<ForumTopicClosed>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -614,8 +643,9 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicCreated(
|
||||
initialFilter: SimpleFilter<SupergroupEventMessage<ForumTopicCreated>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, SupergroupEventMessage<ForumTopicCreated>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ForumTopicCreated>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ForumTopicCreated>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, SupergroupEventMessage<ForumTopicCreated>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -634,8 +664,9 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicReopened(
|
||||
initialFilter: SimpleFilter<SupergroupEventMessage<ForumTopicReopened>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, SupergroupEventMessage<ForumTopicReopened>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ForumTopicReopened>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ForumTopicReopened>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, SupergroupEventMessage<ForumTopicReopened>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -655,8 +686,9 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicEdited(
|
||||
initialFilter: SimpleFilter<SupergroupEventMessage<ForumTopicEdited>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, SupergroupEventMessage<ForumTopicEdited>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ForumTopicEdited>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ForumTopicEdited>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, SupergroupEventMessage<ForumTopicEdited>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -675,8 +707,9 @@ suspend fun <BC : BehaviourContext> BC.onGeneralForumTopicHidden(
|
||||
initialFilter: SimpleFilter<SupergroupEventMessage<GeneralForumTopicHidden>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, SupergroupEventMessage<GeneralForumTopicHidden>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GeneralForumTopicHidden>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GeneralForumTopicHidden>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, SupergroupEventMessage<GeneralForumTopicHidden>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -695,8 +728,9 @@ suspend fun <BC : BehaviourContext> BC.onGeneralForumTopicUnhidden(
|
||||
initialFilter: SimpleFilter<SupergroupEventMessage<GeneralForumTopicUnhidden>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, SupergroupEventMessage<GeneralForumTopicUnhidden>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GeneralForumTopicUnhidden>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GeneralForumTopicUnhidden>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, SupergroupEventMessage<GeneralForumTopicUnhidden>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -716,8 +750,9 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowed(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<WriteAccessAllowed>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<WriteAccessAllowed>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<WriteAccessAllowed>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<WriteAccessAllowed>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<WriteAccessAllowed>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -737,8 +772,9 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromRequest(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<WriteAccessAllowed.FromRequest>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<WriteAccessAllowed.FromRequest>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<WriteAccessAllowed.FromRequest>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<WriteAccessAllowed.FromRequest>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<WriteAccessAllowed.FromRequest>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -758,8 +794,9 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromAttachmentMenu(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<WriteAccessAllowed.FromAttachmentMenu>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<WriteAccessAllowed.FromAttachmentMenu>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<WriteAccessAllowed.FromAttachmentMenu>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<WriteAccessAllowed.FromAttachmentMenu>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<WriteAccessAllowed.FromAttachmentMenu>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -779,8 +816,9 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedOther(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<WriteAccessAllowed.Other>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<WriteAccessAllowed.Other>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<WriteAccessAllowed.Other>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<WriteAccessAllowed.Other>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<WriteAccessAllowed.Other>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -800,8 +838,9 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromWebAppLink(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<WriteAccessAllowed.FromWebAppLink>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<WriteAccessAllowed.FromWebAppLink>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<WriteAccessAllowed.FromWebAppLink>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<WriteAccessAllowed.FromWebAppLink>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<WriteAccessAllowed.FromWebAppLink>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -822,8 +861,9 @@ suspend fun <BC : BehaviourContext> BC.onChatSharedRequest(
|
||||
initialFilter: SimpleFilter<PrivateEventMessage<ChatSharedRequest>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PrivateEventMessage<ChatSharedRequest>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChatSharedRequest>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatSharedRequest>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PrivateEventMessage<ChatSharedRequest>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -843,8 +883,9 @@ suspend fun <BC : BehaviourContext> BC.onUsersShared(
|
||||
initialFilter: SimpleFilter<PrivateEventMessage<UsersShared>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PrivateEventMessage<UsersShared>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<UsersShared>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<UsersShared>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PrivateEventMessage<UsersShared>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -864,8 +905,9 @@ suspend fun <BC : BehaviourContext> BC.onUserShared(
|
||||
initialFilter: SimpleFilter<PrivateEventMessage<UsersShared>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PrivateEventMessage<UsersShared>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<UsersShared>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<UsersShared>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PrivateEventMessage<UsersShared>>
|
||||
) = onUsersShared(initialFilter * { it.chatEvent.userIds.size == 1 }, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onUsersShared(initialFilter * { it.chatEvent.userIds.size == 1 }, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -886,8 +928,9 @@ suspend fun <BC : BehaviourContext> BC.onChatShared(
|
||||
initialFilter: SimpleFilter<PrivateEventMessage<ChatShared>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PrivateEventMessage<ChatShared>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChatShared>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatShared>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PrivateEventMessage<ChatShared>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -908,8 +951,9 @@ suspend fun <BC : BehaviourContext> BC.onChatBoostAdded(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChatBoostAdded>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChatBoostAdded>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChatBoostAdded>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatBoostAdded>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChatBoostAdded>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -929,8 +973,9 @@ suspend fun <BC : BehaviourContext> BC.onChatBackgroundSet(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChatBackground>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChatBackground>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChatBackground>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatBackground>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChatBackground>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -950,8 +995,9 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayCreated(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GiveawayCreated>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GiveawayCreated>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GiveawayCreated>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GiveawayCreated>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<GiveawayCreated>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -972,8 +1018,9 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayCompleted(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GiveawayPrivateResults>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GiveawayPrivateResults>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GiveawayPrivateResults>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GiveawayPrivateResults>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<GiveawayPrivateResults>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -995,5 +1042,6 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayCompletedWithPrivateWinners(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GiveawayPrivateResults>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GiveawayPrivateResults>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GiveawayPrivateResults>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GiveawayPrivateResults>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<GiveawayPrivateResults>>
|
||||
) = onGiveawayCompleted(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onGiveawayCompleted(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -13,8 +13,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : InlineQuery> BC.
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.inlineQueryUpdateOrNull() ?.data as? T) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -35,8 +36,9 @@ suspend fun <BC : BehaviourContext> BC.onAnyInlineQuery(
|
||||
initialFilter: SimpleFilter<InlineQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineQuery, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineQuery, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, InlineQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, InlineQuery>
|
||||
) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -56,8 +58,9 @@ suspend fun <BC : BehaviourContext> BC.onBaseInlineQuery(
|
||||
initialFilter: SimpleFilter<BaseInlineQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BaseInlineQuery, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in BaseInlineQuery, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, BaseInlineQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BaseInlineQuery>
|
||||
) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
@@ -77,5 +80,6 @@ suspend fun <BC : BehaviourContext> BC.onLocationInlineQuery(
|
||||
initialFilter: SimpleFilter<LocationInlineQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationInlineQuery, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in LocationInlineQuery, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LocationInlineQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LocationInlineQuery>
|
||||
) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onInlineQuery(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -13,6 +13,7 @@ internal suspend fun <BC : BehaviourContext, T> BC.on(
|
||||
markerFactory: MarkerFactory<in T, Any>?,
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>,
|
||||
updateToData: (Update) -> List<T>?
|
||||
) = flowsUpdatesFilter.expectFlow(
|
||||
@@ -29,15 +30,25 @@ internal suspend fun <BC : BehaviourContext, T> BC.on(
|
||||
} ?: emptyList()
|
||||
}
|
||||
).run {
|
||||
val localSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T> = additionalSubcontextInitialAction ?.let { _ ->
|
||||
{ update, it ->
|
||||
additionalSubcontextInitialAction(update, it)
|
||||
subcontextInitialAction(update)
|
||||
}
|
||||
} ?: { update, _ ->
|
||||
subcontextInitialAction(update)
|
||||
}
|
||||
val handler: suspend (Pair<Update, T>) -> Unit = subcontextUpdatesFilter ?.let {
|
||||
{ (update, triggerData) ->
|
||||
createSubContextAndDoSynchronouslyWithUpdatesFilter {
|
||||
if (subcontextUpdatesFilter(this, triggerData, update)) {
|
||||
localSubcontextInitialAction(update, triggerData)
|
||||
scenarioReceiver(triggerData)
|
||||
}
|
||||
}
|
||||
}
|
||||
} ?: { (_, triggerData) ->
|
||||
} ?: { (update, triggerData) ->
|
||||
localSubcontextInitialAction(update, triggerData)
|
||||
createSubContextAndDoSynchronouslyWithUpdatesFilter(behaviourContextReceiver = { scenarioReceiver(triggerData) })
|
||||
}
|
||||
markerFactory ?.let {
|
||||
|
||||
@@ -19,8 +19,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupPartCo
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<T>>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<T>>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
it.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let {
|
||||
if (it.content.group.all { it.content is T }) {
|
||||
listOf(it as MediaGroupMessage<T>)
|
||||
@@ -47,8 +48,9 @@ suspend fun <BC : BehaviourContext> BC.onMediaGroupMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<MediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<MediaGroupPartContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<MediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<MediaGroupPartContent>>
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -67,8 +69,9 @@ suspend fun <BC : BehaviourContext> BC.onPlaylistMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<AudioMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<AudioMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<AudioMediaGroupPartContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<AudioMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<AudioMediaGroupPartContent>>
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -87,8 +90,9 @@ suspend fun <BC : BehaviourContext> BC.onDocumentsGroupMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<DocumentMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<DocumentMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<DocumentMediaGroupPartContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<DocumentMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<DocumentMediaGroupPartContent>>
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -107,8 +111,9 @@ suspend fun <BC : BehaviourContext> BC.onVisualGalleryMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<VisualMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<VisualMediaGroupPartContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<VisualMediaGroupPartContent>>
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -127,8 +132,9 @@ suspend fun <BC : BehaviourContext> BC.onVisualMediaGroupMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<VisualMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<VisualMediaGroupPartContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<VisualMediaGroupPartContent>>
|
||||
) = onVisualGalleryMessages(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onVisualGalleryMessages(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -147,8 +153,9 @@ suspend fun <BC : BehaviourContext> BC.onPhotoGalleryMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<PhotoContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<PhotoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<PhotoContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<PhotoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<PhotoContent>>
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -167,5 +174,6 @@ suspend fun <BC : BehaviourContext> BC.onVideoGalleryMessages(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<VideoContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<VideoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<VideoContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<VideoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<VideoContent>>
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -19,8 +19,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupPartCo
|
||||
initialFilter: SimpleFilter<MediaGroupContent<T>>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<T>, Any>? = AnyMarkerFactory(),
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<T>>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
it.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let {
|
||||
if (it.content.group.all { it.content is T }) {
|
||||
listOf(it.content as MediaGroupContent<T>)
|
||||
@@ -47,8 +48,9 @@ suspend fun <BC : BehaviourContext> BC.onMediaGroup(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<MediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<MediaGroupPartContent>>
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -67,8 +69,9 @@ suspend fun <BC : BehaviourContext> BC.onPlaylist(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<AudioMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<AudioMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<AudioMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<AudioMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<AudioMediaGroupPartContent>>
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -87,8 +90,9 @@ suspend fun <BC : BehaviourContext> BC.onDocumentsGroup(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<DocumentMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<DocumentMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<DocumentMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<DocumentMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<DocumentMediaGroupPartContent>>
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -107,8 +111,9 @@ suspend fun <BC : BehaviourContext> BC.onVisualGallery(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<VisualMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<VisualMediaGroupPartContent>>
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -127,8 +132,9 @@ suspend fun <BC : BehaviourContext> BC.onVisualMediaGroup(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<VisualMediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<VisualMediaGroupPartContent>>
|
||||
) = onVisualGallery(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onVisualGallery(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -147,8 +153,9 @@ suspend fun <BC : BehaviourContext> BC.onPhotoGallery(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<PhotoContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<PhotoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<PhotoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<PhotoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<PhotoContent>>
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
@@ -167,5 +174,6 @@ suspend fun <BC : BehaviourContext> BC.onVideoGallery(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<VideoContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<VideoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<VideoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<VideoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<VideoContent>>
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -30,6 +30,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = AnyMarkerFactory(),
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
|
||||
) = onContentMessageWithType<BC, T>(
|
||||
initialFilter * {
|
||||
@@ -37,6 +38,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -45,6 +47,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = AnyMarkerFactory(),
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
|
||||
) = onContentMessageWithType<BC, T>(
|
||||
initialFilter * {
|
||||
@@ -52,6 +55,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -60,6 +64,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = AnyMarkerFactory(),
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
|
||||
) = onContentMessageWithType<BC, T>(
|
||||
initialFilter * {
|
||||
@@ -67,6 +72,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
},
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -81,8 +87,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<TextedContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextedContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextedContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -94,8 +101,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent(
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<TextedContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextedContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextedContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -107,8 +115,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<TextedContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextedContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextedContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -122,8 +131,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VoiceContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VoiceContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VoiceContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -135,8 +145,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VoiceContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VoiceContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VoiceContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -148,8 +159,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VoiceContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VoiceContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VoiceContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -163,8 +175,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -176,8 +189,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -189,8 +203,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -204,8 +219,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupPartContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -217,8 +233,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent(
|
||||
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupPartContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -230,8 +247,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupPartContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -245,8 +263,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<AudioContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AudioContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AudioContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -258,8 +277,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<AudioContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AudioContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AudioContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -271,8 +291,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<AudioContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AudioContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AudioContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -286,8 +307,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<DocumentContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<DocumentContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<DocumentContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -299,8 +321,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<DocumentContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<DocumentContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<DocumentContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -312,8 +335,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<DocumentContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<DocumentContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<DocumentContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -327,8 +351,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VisualMediaGroupPartContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -340,8 +365,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartCont
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VisualMediaGroupPartContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -353,8 +379,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VisualMediaGroupPartContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VisualMediaGroupPartContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -368,8 +395,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VideoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VideoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VideoContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -381,8 +409,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithVideoContent(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VideoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VideoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VideoContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -394,8 +423,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<VideoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VideoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VideoContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -409,8 +439,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<PhotoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<PhotoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<PhotoContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -422,8 +453,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<PhotoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<PhotoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<PhotoContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -435,8 +467,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<PhotoContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<PhotoContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<PhotoContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -450,8 +483,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<AnimationContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AnimationContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AnimationContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -463,8 +497,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<AnimationContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AnimationContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AnimationContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -476,8 +511,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<AnimationContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AnimationContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AnimationContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
|
||||
@@ -491,8 +527,9 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<TextContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextContent>>
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -504,8 +541,9 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithTextContent(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<TextContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextContent>>
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
@@ -517,6 +555,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in CommonMessage<TextContent>, Any>? = AnyMarkerFactory(),
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextContent>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextContent>>
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver)
|
||||
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
@@ -34,8 +34,9 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
initialFilter: SimpleFilter<PaidMediaPurchased>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaPurchased, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PaidMediaPurchased, Any>? = ByUserPaidMediaPurchasedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PaidMediaPurchased>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PaidMediaPurchased>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.paidMediaPurchasedUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -58,11 +59,13 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
initialFilter: SimpleFilter<PaidMediaPurchased>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaPurchased, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PaidMediaPurchased, Any>? = ByUserPaidMediaPurchasedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PaidMediaPurchased>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PaidMediaPurchased>
|
||||
) = onPaidMediaPurchased(
|
||||
SimpleFilter<PaidMediaPurchased> { paidMediaPayloadRegex.matches(it.payload.string) } * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -85,10 +88,12 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
initialFilter: SimpleFilter<PaidMediaPurchased>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaPurchased, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PaidMediaPurchased, Any>? = ByUserPaidMediaPurchasedMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PaidMediaPurchased>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PaidMediaPurchased>
|
||||
) = onPaidMediaPurchased(
|
||||
SimpleFilter<PaidMediaPurchased> { it.payload == paidMediaPayload } * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -15,8 +15,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : EncryptedPasspor
|
||||
initialFilter: SimpleFilter<PassportMessage>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PassportMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PassportMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PassportMessage>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PassportMessage>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.messageUpdateOrNull() ?.data ?.passportMessageOrNull() ?.takeIf { it.passportData.data.any { it is T } }) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -38,11 +39,13 @@ suspend fun <BC : BehaviourContext> BC.onPassportMessage(
|
||||
initialFilter: SimpleFilter<PassportMessage>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PassportMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PassportMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PassportMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PassportMessage>
|
||||
) = onPassportMessageWith<BC, EncryptedPassportElement>(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
|
||||
@@ -14,8 +14,9 @@ internal suspend inline fun <BC : BehaviourContext> BC.onPollAnswered(
|
||||
initialFilter: SimpleFilter<PollAnswer>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PollAnswer, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PollAnswer, Any>? = ByIdPollAnswerMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PollAnswer>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PollAnswer>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.pollAnswerUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -36,10 +37,12 @@ suspend fun <BC : BehaviourContext> BC.onPollAnswer(
|
||||
initialFilter: SimpleFilter<PollAnswer>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PollAnswer, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PollAnswer, Any>? = ByIdPollAnswerMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PollAnswer>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PollAnswer>
|
||||
) = onPollAnswered(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -14,8 +14,9 @@ internal suspend inline fun <BC : BehaviourContext, reified T : Poll> BC.onPollU
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByIdPollMarkerFactory,
|
||||
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, T>? = null,
|
||||
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, T>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.pollUpdateOrNull() ?.data as? T) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -36,11 +37,13 @@ suspend fun <BC : BehaviourContext> BC.onPollUpdates(
|
||||
initialFilter: SimpleFilter<Poll>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Poll, Update>? = null,
|
||||
markerFactory: MarkerFactory<in Poll, Any>? = ByIdPollMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, Poll>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, Poll>
|
||||
) = onPollUpdatedBase(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -61,11 +64,13 @@ suspend fun <BC : BehaviourContext> BC.onRegularPollUpdates(
|
||||
initialFilter: SimpleFilter<RegularPoll>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, RegularPoll, Update>? = null,
|
||||
markerFactory: MarkerFactory<in RegularPoll, Any>? = ByIdPollMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, RegularPoll>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, RegularPoll>
|
||||
) = onPollUpdatedBase(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -86,10 +91,12 @@ suspend fun <BC : BehaviourContext> BC.onQuizPollUpdates(
|
||||
initialFilter: SimpleFilter<QuizPoll>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, QuizPoll, Update>? = null,
|
||||
markerFactory: MarkerFactory<in QuizPoll, Any>? = ByIdPollMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, QuizPoll>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, QuizPoll>
|
||||
) = onPollUpdatedBase(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -30,7 +30,8 @@ suspend fun <BC : BehaviourContext> BC.onPreCheckoutQuery(
|
||||
initialFilter: SimpleFilter<PreCheckoutQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PreCheckoutQuery, Update>? = PreCheckoutQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in PreCheckoutQuery, Any>? = ByUserPreCheckoutQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, PreCheckoutQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, PreCheckoutQuery>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.preCheckoutQueryUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ suspend fun <BC : BehaviourContext> BC.onShippingQuery(
|
||||
initialFilter: SimpleFilter<ShippingQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ShippingQuery, Update>? = ShippingQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in ShippingQuery, Any>? = ByUserShippingQueryMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ShippingQuery>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ShippingQuery>
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
|
||||
(it.shippingQueryUpdateOrNull() ?.data) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
@@ -27,15 +27,17 @@ suspend fun <BC : BehaviourContext> BC.onCommandPrivacy(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
) {
|
||||
onCommand(
|
||||
DefaultKTgBotAPIPrivacyCommand,
|
||||
requireOnlyCommandInMessage,
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
scenarioReceiver
|
||||
command = DefaultKTgBotAPIPrivacyCommand,
|
||||
requireOnlyCommandInMessage = requireOnlyCommandInMessage,
|
||||
initialFilter = initialFilter,
|
||||
subcontextUpdatesFilter = subcontextUpdatesFilter,
|
||||
markerFactory = markerFactory,
|
||||
additionalSubcontextInitialAction = additionalSubcontextInitialAction,
|
||||
scenarioReceiver = scenarioReceiver
|
||||
)
|
||||
}
|
||||
|
||||
@@ -51,8 +53,15 @@ suspend fun <BC : BehaviourContext> BC.onCommandPrivacy(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
||||
) = onCommandPrivacy(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory) {
|
||||
) = onCommandPrivacy(
|
||||
requireOnlyCommandInMessage = requireOnlyCommandInMessage,
|
||||
initialFilter = initialFilter,
|
||||
subcontextUpdatesFilter = subcontextUpdatesFilter,
|
||||
markerFactory = markerFactory,
|
||||
additionalSubcontextInitialAction = additionalSubcontextInitialAction
|
||||
) {
|
||||
execute(
|
||||
SendTextMessage(
|
||||
it.chat.id,
|
||||
@@ -76,13 +85,20 @@ suspend fun <BC : BehaviourContext> BC.onCommandPrivacy(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = null,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = null,
|
||||
) = onCommandPrivacy(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory) {
|
||||
) = onCommandPrivacy(
|
||||
requireOnlyCommandInMessage = requireOnlyCommandInMessage,
|
||||
initialFilter = initialFilter,
|
||||
subcontextUpdatesFilter = subcontextUpdatesFilter,
|
||||
markerFactory = markerFactory,
|
||||
additionalSubcontextInitialAction = additionalSubcontextInitialAction
|
||||
) {
|
||||
execute(
|
||||
SendTextMessage(
|
||||
it.chat.id,
|
||||
text,
|
||||
parseMode,
|
||||
chatId = it.chat.id,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
replyParameters = ReplyParameters(it.metaInfo)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
package dev.inmo.tgbotapi.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.files.Photo
|
||||
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
||||
|
||||
interface CoverableData {
|
||||
val cover: Photo?
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package dev.inmo.tgbotapi.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
|
||||
interface WithCustomStartMediaData {
|
||||
val startTimestamp: Seconds?
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package dev.inmo.tgbotapi.abstracts.types
|
||||
|
||||
import korlibs.time.TimeSpan
|
||||
|
||||
interface SubscriptionInfo : SubscriptionPeriodInfo {
|
||||
val subscriptionPrice: UInt?
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package dev.inmo.tgbotapi.abstracts.types
|
||||
|
||||
import korlibs.time.TimeSpan
|
||||
|
||||
interface SubscriptionPeriodInfo {
|
||||
val subscriptionPeriod: TimeSpan?
|
||||
}
|
||||
@@ -34,14 +34,14 @@ class KtorRequestsExecutorBuilder(
|
||||
}
|
||||
|
||||
fun build() = KtorRequestsExecutor(
|
||||
telegramAPIUrlsKeeper,
|
||||
client,
|
||||
callsFactories,
|
||||
excludeDefaultFactories,
|
||||
requestsLimiter,
|
||||
jsonFormatter,
|
||||
pipelineStepsHolder,
|
||||
logger
|
||||
telegramAPIUrlsKeeper = telegramAPIUrlsKeeper,
|
||||
client = client,
|
||||
callsFactories = callsFactories,
|
||||
excludeDefaultFactories = excludeDefaultFactories,
|
||||
requestsLimiter = requestsLimiter,
|
||||
jsonFormatter = jsonFormatter,
|
||||
pipelineStepsHolder = pipelineStepsHolder,
|
||||
logger = logger
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,17 +9,14 @@ import dev.inmo.tgbotapi.bot.exceptions.newRequestException
|
||||
import dev.inmo.tgbotapi.requests.GetUpdatesRequest
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.types.Response
|
||||
import dev.inmo.tgbotapi.types.message.textsources.pre
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.plugins.timeout
|
||||
import io.ktor.client.request.*
|
||||
import io.ktor.client.request.forms.*
|
||||
import io.ktor.client.statement.bodyAsText
|
||||
import io.ktor.http.ContentType
|
||||
import io.ktor.http.content.*
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlin.collections.set
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ class DefaultKtorRequestsExecutor internal constructor(
|
||||
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
||||
private val callsFactories: List<KtorCallFactory> = callsFactories.run {
|
||||
if (!excludeDefaultFactories) {
|
||||
logger.v { "Installing default factories" }
|
||||
this + createTelegramBotDefaultKtorCallRequestsFactories(logger)
|
||||
this@DefaultKtorRequestsExecutor.logger.v { "Installing default factories" }
|
||||
this + createTelegramBotDefaultKtorCallRequestsFactories(this@DefaultKtorRequestsExecutor.logger)
|
||||
} else {
|
||||
logger.v { "Default factories will not be installed" }
|
||||
this@DefaultKtorRequestsExecutor.logger.v { "Default factories will not be installed" }
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package dev.inmo.tgbotapi.requests
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithCustomStartMediaData
|
||||
import dev.inmo.tgbotapi.abstracts.types.MessageAction
|
||||
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
@@ -21,11 +22,13 @@ data class ForwardMessage(
|
||||
override val messageId: MessageId,
|
||||
@SerialName(messageThreadIdField)
|
||||
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||
@SerialName(videoStartTimestampField)
|
||||
override val startTimestamp: Seconds? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
override val protectContent: Boolean = false
|
||||
): SimpleRequest<PossiblyForwardedMessage>, MessageAction, ProtectContent, OptionallyMessageThreadRequest {
|
||||
): SimpleRequest<PossiblyForwardedMessage>, MessageAction, ProtectContent, OptionallyMessageThreadRequest, WithCustomStartMediaData {
|
||||
override val chatId: ChatIdentifier
|
||||
get() = fromChatId
|
||||
|
||||
|
||||
@@ -5,4 +5,11 @@ import kotlinx.serialization.json.JsonObject
|
||||
interface MultipartRequest<T: Any> : Request<T> {
|
||||
val paramsJson: JsonObject
|
||||
val mediaMap: Map<String, MultipartFile>
|
||||
|
||||
interface Common<T : Any> : MultipartRequest<T>, SimpleRequest<T> {
|
||||
val data: SimpleRequest<T>
|
||||
|
||||
override val paramsJson: JsonObject
|
||||
get() = data.json()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package dev.inmo.tgbotapi.requests.chat.invite_links
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.SubscriptionInfo
|
||||
import dev.inmo.tgbotapi.abstracts.types.SubscriptionPeriodInfo
|
||||
import korlibs.time.DateTime
|
||||
import dev.inmo.tgbotapi.requests.chat.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
@@ -15,9 +17,9 @@ sealed interface CreateChatInviteLink<R : SecondaryChatInviteLink> : EditChatInv
|
||||
|
||||
override fun method(): String = "createChatInviteLink"
|
||||
|
||||
sealed interface Subscription : CreateChatInviteLink<ChatInviteLinkUnlimited> {
|
||||
val subscriptionPeriod: TimeSpan
|
||||
val subscriptionPrice: UInt
|
||||
sealed interface Subscription : CreateChatInviteLink<ChatInviteLinkUnlimited>, SubscriptionInfo {
|
||||
override val subscriptionPeriod: TimeSpan
|
||||
override val subscriptionPrice: UInt
|
||||
|
||||
override fun method(): String = "createChatSubscriptionInviteLink"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.payments
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.isCanceledField
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId
|
||||
import dev.inmo.tgbotapi.types.telegramPaymentChargeIdField
|
||||
import dev.inmo.tgbotapi.types.userIdField
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
@Serializable
|
||||
data class EditUserStarSubscription(
|
||||
@SerialName(userIdField)
|
||||
val userId: UserId,
|
||||
@SerialName(telegramPaymentChargeIdField)
|
||||
val telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
@SerialName(isCanceledField)
|
||||
val isCanceled: Boolean
|
||||
) : SimpleRequest<Boolean> {
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
|
||||
override fun method(): String = "editUserStarSubscription"
|
||||
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.requests.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.gifts.Gifts
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
|
||||
@Serializable
|
||||
data object GetAvailableGifts : SimpleRequest<Gifts> {
|
||||
override fun method(): String = "getAvailableGifts"
|
||||
|
||||
override val resultDeserializer: DeserializationStrategy<Gifts>
|
||||
get() = Gifts.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package dev.inmo.tgbotapi.requests.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.TextedOutput
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||
import dev.inmo.tgbotapi.types.message.asTextSources
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
@Serializable
|
||||
data class SendGift internal constructor(
|
||||
@SerialName(userIdField)
|
||||
val userId: UserId? = null,
|
||||
@SerialName(chatIdField)
|
||||
val chatId: ChatIdentifier? = null,
|
||||
@SerialName(giftIdField)
|
||||
val giftId: GiftId,
|
||||
@SerialName(textField)
|
||||
override val text: String? = null,
|
||||
@SerialName(textParseModeField)
|
||||
override val parseMode: ParseMode?,
|
||||
@SerialName(textEntitiesField)
|
||||
private val rawEntities: List<RawMessageEntity>? = null,
|
||||
@SerialName(payToUpgradeField)
|
||||
val upgradableToUnique: Boolean = false
|
||||
) : SimpleRequest<Boolean>, TextedOutput {
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
rawEntities ?.let {
|
||||
text ?.let { _ ->
|
||||
it.asTextSources(text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun method(): String = "sendGift"
|
||||
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
|
||||
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
|
||||
@Deprecated("Use factory function `toUser` instead", ReplaceWith("toUser(userId, giftId, text, parseMode, upgradableToUnique)"))
|
||||
constructor(
|
||||
userId: UserId,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
) : this(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
@Deprecated("Use factory function `toUser` instead", ReplaceWith("toUser(userId, giftId, textSources, upgradableToUnique)"))
|
||||
constructor(
|
||||
userId: UserId,
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList? = null,
|
||||
upgradableToUnique: Boolean = false,
|
||||
) : this(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = textSources ?.makeSourceString(),
|
||||
parseMode = null,
|
||||
rawEntities = textSources ?.toRawMessageEntities(),
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
companion object {
|
||||
fun toUser(
|
||||
userId: UserId,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
) = SendGift(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
fun toUser(
|
||||
userId: UserId,
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList? = null,
|
||||
upgradableToUnique: Boolean = false,
|
||||
) = SendGift(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = textSources ?.makeSourceString(),
|
||||
parseMode = null,
|
||||
rawEntities = textSources ?.toRawMessageEntities(),
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
fun toChat(
|
||||
chatId: ChatIdentifier,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
) = SendGift(
|
||||
chatId = chatId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
fun toChat(
|
||||
chatId: ChatIdentifier,
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList? = null,
|
||||
upgradableToUnique: Boolean = false,
|
||||
) = SendGift(
|
||||
chatId = chatId,
|
||||
giftId = giftId,
|
||||
text = textSources ?.makeSourceString(),
|
||||
parseMode = null,
|
||||
rawEntities = textSources ?.toRawMessageEntities(),
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package dev.inmo.tgbotapi.requests.inline
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.serializers.InlineQueryResultSerializer
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.prepared.PreparedInlineMessage
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
|
||||
@Serializable
|
||||
data class SavePreparedInlineMessage(
|
||||
@SerialName(userIdField)
|
||||
val userId: UserId,
|
||||
@Serializable(InlineQueryResultSerializer::class)
|
||||
@SerialName(resultField)
|
||||
val result: InlineQueryResult,
|
||||
@SerialName(allowUserChatsField)
|
||||
val allowSendToUsers: Boolean = false,
|
||||
@SerialName(allowBotChatsField)
|
||||
val allowSendToBots: Boolean = false,
|
||||
@SerialName(allowGroupChatsField)
|
||||
val allowSendToGroups: Boolean = false,
|
||||
@SerialName(allowChannelChatsField)
|
||||
val allowSendToChannels: Boolean = false,
|
||||
) : SimpleRequest<PreparedInlineMessage> {
|
||||
override fun method(): String = "savePreparedInlineMessage"
|
||||
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
override val resultDeserializer: DeserializationStrategy<PreparedInlineMessage>
|
||||
get() = PreparedInlineMessage.serializer()
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package dev.inmo.tgbotapi.requests.send
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.TextedOutput
|
||||
import dev.inmo.tgbotapi.abstracts.WithCustomStartMediaData
|
||||
import dev.inmo.tgbotapi.abstracts.WithCustomizableCaption
|
||||
import dev.inmo.tgbotapi.abstracts.types.MessageAction
|
||||
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
||||
@@ -89,6 +90,7 @@ fun CopyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -103,6 +105,7 @@ fun CopyMessage(
|
||||
rawEntities = null,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -117,6 +120,7 @@ fun CopyMessage(
|
||||
entities: List<TextSource>,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -131,6 +135,7 @@ fun CopyMessage(
|
||||
rawEntities = entities.toRawMessageEntities(),
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -156,6 +161,8 @@ data class CopyMessage internal constructor(
|
||||
override val showCaptionAboveMedia: Boolean = false,
|
||||
@SerialName(messageThreadIdField)
|
||||
override val threadId: MessageThreadId? = toChatId.threadId,
|
||||
@SerialName(videoStartTimestampField)
|
||||
override val startTimestamp: Seconds? = null,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
@@ -172,7 +179,8 @@ data class CopyMessage internal constructor(
|
||||
MessageAction,
|
||||
TextedOutput,
|
||||
ProtectContent,
|
||||
OptionallyMessageThreadRequest {
|
||||
OptionallyMessageThreadRequest,
|
||||
WithCustomStartMediaData {
|
||||
override val chatId: ChatIdentifier
|
||||
get() = fromChatId
|
||||
override val textSources: List<TextSource>? by lazy {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package dev.inmo.tgbotapi.requests.send.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.FileId
|
||||
import dev.inmo.tgbotapi.requests.abstracts.InputFile
|
||||
|
||||
interface CoveredSendMessageRequest<T: Any>: SendMessageRequest<T> {
|
||||
val cover: InputFile?
|
||||
}
|
||||
@@ -51,6 +51,11 @@ fun <T : MediaGroupPartContent> SendMediaGroup(
|
||||
it.thumb as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
},
|
||||
if (it is CoveredTelegramMedia) {
|
||||
it.cover as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.parseModeField
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.media.CoveredTelegramMedia
|
||||
import dev.inmo.tgbotapi.types.media.ThumbedTelegramMedia
|
||||
import dev.inmo.tgbotapi.types.message.*
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntity
|
||||
@@ -63,6 +64,11 @@ fun SendPaidMedia(
|
||||
it.thumb as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
},
|
||||
if (it is CoveredTelegramMedia) {
|
||||
it.cover as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -117,6 +123,11 @@ fun SendPaidMedia(
|
||||
it.thumb as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
},
|
||||
if (it is CoveredTelegramMedia) {
|
||||
it.cover as? MultipartFile
|
||||
} else {
|
||||
null
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package dev.inmo.tgbotapi.requests.send.media
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithCustomStartMediaData
|
||||
import dev.inmo.tgbotapi.requests.abstracts.*
|
||||
import dev.inmo.tgbotapi.requests.common.CommonMultipartFileRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.*
|
||||
@@ -29,6 +30,8 @@ fun SendVideo(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -44,11 +47,14 @@ fun SendVideo(
|
||||
): Request<ContentMessage<VideoContent>> {
|
||||
val videoAsFile = video as? MultipartFile
|
||||
val thumbAsFile = thumbnail as? MultipartFile
|
||||
val coverAsFile = cover as? MultipartFile
|
||||
|
||||
val data = SendVideoData(
|
||||
chatId = chatId,
|
||||
video = video,
|
||||
thumbnail = thumbnail ?.fileId,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
rawEntities = null,
|
||||
@@ -68,12 +74,12 @@ fun SendVideo(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
return if (videoAsFile == null && thumbAsFile == null) {
|
||||
return if (videoAsFile == null && thumbAsFile == null && coverAsFile == null) {
|
||||
data
|
||||
} else {
|
||||
CommonMultipartFileRequest(
|
||||
data,
|
||||
listOfNotNull(videoAsFile, thumbAsFile).associateBy { it.fileId }
|
||||
listOfNotNull(videoAsFile, thumbAsFile, coverAsFile).associateBy { it.fileId }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -85,6 +91,8 @@ fun SendVideo(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -100,11 +108,14 @@ fun SendVideo(
|
||||
): Request<ContentMessage<VideoContent>> {
|
||||
val videoAsFile = video as? MultipartFile
|
||||
val thumbAsFile = thumbnail as? MultipartFile
|
||||
val coverAsFile = cover as? MultipartFile
|
||||
|
||||
val data = SendVideoData(
|
||||
chatId = chatId,
|
||||
video = video,
|
||||
thumbnail = thumbnail ?.fileId,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
text = entities.makeString(),
|
||||
parseMode = null,
|
||||
rawEntities = entities.toRawMessageEntities(),
|
||||
@@ -124,12 +135,12 @@ fun SendVideo(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
return if (videoAsFile == null && thumbAsFile == null) {
|
||||
return if (videoAsFile == null && thumbAsFile == null && coverAsFile == null) {
|
||||
data
|
||||
} else {
|
||||
CommonMultipartFileRequest(
|
||||
data,
|
||||
listOfNotNull(videoAsFile, thumbAsFile).associateBy { it.fileId }
|
||||
listOfNotNull(videoAsFile, thumbAsFile, coverAsFile).associateBy { it.fileId }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -145,6 +156,10 @@ data class SendVideoData internal constructor(
|
||||
val video: InputFile,
|
||||
@SerialName(thumbnailField)
|
||||
override val thumbnail: String? = null,
|
||||
@SerialName(coverField)
|
||||
override val cover: InputFile? = null,
|
||||
@SerialName(startTimestampField)
|
||||
override val startTimestamp: Seconds? = null,
|
||||
@SerialName(captionField)
|
||||
override val text: String? = null,
|
||||
@SerialName(parseModeField)
|
||||
@@ -187,6 +202,8 @@ data class SendVideoData internal constructor(
|
||||
DuratedSendMessageRequest<ContentMessage<VideoContent>>,
|
||||
SizedSendMessageRequest<ContentMessage<VideoContent>>,
|
||||
WithCustomizableCaptionRequest<ContentMessage<VideoContent>>,
|
||||
CoveredSendMessageRequest<ContentMessage<VideoContent>>,
|
||||
WithCustomStartMediaData,
|
||||
OptionallyWithSpoilerRequest
|
||||
{
|
||||
override val textSources: TextSourcesList? by lazy {
|
||||
|
||||
@@ -3,8 +3,8 @@ package dev.inmo.tgbotapi.requests.send.payments
|
||||
import dev.inmo.tgbotapi.abstracts.CommonSendInvoiceData
|
||||
import dev.inmo.tgbotapi.abstracts.types.*
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendMessageRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.InvoiceContent
|
||||
@@ -12,6 +12,8 @@ import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||
import dev.inmo.tgbotapi.types.payments.LabeledPricesSerializer
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
||||
import dev.inmo.tgbotapi.utils.TimeSpanAsSecondsSerializer
|
||||
import korlibs.time.TimeSpan
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
@@ -30,9 +32,14 @@ data class CreateInvoiceLink(
|
||||
override val providerToken: String?,
|
||||
@SerialName(currencyField)
|
||||
override val currency: Currency,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId? = null,
|
||||
@Serializable(LabeledPricesSerializer::class)
|
||||
@SerialName(pricesField)
|
||||
override val prices: List<LabeledPrice>,
|
||||
@SerialName(subscriptionPeriodField)
|
||||
@Serializable(TimeSpanAsSecondsSerializer::class)
|
||||
override val subscriptionPeriod: TimeSpan? = null,
|
||||
@SerialName(maxTipAmountField)
|
||||
override val maxTipAmount: Int? = null,
|
||||
@SerialName(suggestedTipAmountsField)
|
||||
@@ -53,8 +60,8 @@ data class CreateInvoiceLink(
|
||||
override val shouldSendEmailToProvider: Boolean = false,
|
||||
@SerialName(priceDependOnShipAddressField)
|
||||
override val priceDependOnShipAddress: Boolean = false
|
||||
) : CommonSendInvoiceData, SimpleRequest<String> {
|
||||
override fun method(): String = "sendInvoice"
|
||||
) : CommonSendInvoiceData, SimpleRequest<String>, WithOptionalBusinessConnectionId, SubscriptionPeriodInfo {
|
||||
override fun method(): String = "createInvoiceLink"
|
||||
override val resultDeserializer: DeserializationStrategy<String>
|
||||
get() = String.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
@@ -137,4 +144,8 @@ data class CreateInvoiceLink(
|
||||
photoWidth = null
|
||||
photoHeight = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val DEFAULT: Seconds = 2592000 // 30 days
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package dev.inmo.tgbotapi.requests.set
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
@Serializable
|
||||
data class SetUserEmojiStatus(
|
||||
@SerialName(userIdField)
|
||||
val userId: UserId,
|
||||
@SerialName(emojiStatusCustomEmojiIdField)
|
||||
val customEmojiId: CustomEmojiId,
|
||||
@Serializable(TelegramDateSerializer::class)
|
||||
@SerialName(emojiStatusExpirationDateField)
|
||||
val expirationDate: TelegramDate? = null
|
||||
) : SimpleRequest<Boolean> {
|
||||
override fun method(): String = "setUserEmojiStatus"
|
||||
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package dev.inmo.tgbotapi.requests.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
|
||||
@Serializable
|
||||
data class RemoveChatVerification(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
): ChatRequest, SimpleRequest<Boolean> {
|
||||
override fun method(): String = "removeChatVerification"
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package dev.inmo.tgbotapi.requests.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
|
||||
@Serializable
|
||||
data class RemoveUserVerification(
|
||||
@SerialName(userIdField)
|
||||
val userId: UserId,
|
||||
): SimpleRequest<Boolean> {
|
||||
override fun method(): String = "removeUserVerification"
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package dev.inmo.tgbotapi.requests.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chatIdField
|
||||
import dev.inmo.tgbotapi.types.customDescriptionField
|
||||
import dev.inmo.tgbotapi.types.descriptionField
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
|
||||
@Serializable
|
||||
data class VerifyChat(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@SerialName(customDescriptionField)
|
||||
val description: String? = null
|
||||
): ChatRequest, SimpleRequest<Boolean> {
|
||||
override fun method(): String = "verifyChat"
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package dev.inmo.tgbotapi.requests.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.ChatRequest
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
|
||||
@Serializable
|
||||
data class VerifyUser(
|
||||
@SerialName(userIdField)
|
||||
val userId: UserId,
|
||||
@SerialName(customDescriptionField)
|
||||
val description: String? = null
|
||||
): SimpleRequest<Boolean> {
|
||||
override fun method(): String = "verifyUser"
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import korlibs.time.Date
|
||||
import korlibs.time.DateTime
|
||||
import korlibs.time.Year
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@@ -11,9 +13,12 @@ data class Birthdate(
|
||||
@SerialName(monthField)
|
||||
val month: Int,
|
||||
@SerialName(yearField)
|
||||
val year: Int
|
||||
val year: Int? = null
|
||||
) {
|
||||
/**
|
||||
* Represents this birthday as korlibs [Date]. Will use this year in case if [year] has not been retrieved
|
||||
*/
|
||||
val date: Date by lazy {
|
||||
Date(year, month, day)
|
||||
Date(year ?: DateTime.now().year.year, month, day)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,12 @@ package dev.inmo.tgbotapi.types
|
||||
|
||||
import korlibs.time.DateTime
|
||||
import dev.inmo.tgbotapi.abstracts.WithUser
|
||||
import dev.inmo.tgbotapi.abstracts.types.SubscriptionInfo
|
||||
import dev.inmo.tgbotapi.abstracts.types.SubscriptionPeriodInfo
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import dev.inmo.tgbotapi.utils.TimeSpanAsSecondsSerializer
|
||||
import korlibs.time.TimeSpan
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
@@ -64,7 +68,7 @@ sealed interface ChatInviteLink : WithUser {
|
||||
* Base interface for all [ChatInviteLink]s which are NOT [PrimaryInviteLink]
|
||||
*/
|
||||
@Serializable(ChatInviteLinkSerializer::class)
|
||||
sealed interface SecondaryChatInviteLink : ChatInviteLink {
|
||||
sealed interface SecondaryChatInviteLink : ChatInviteLink, SubscriptionInfo {
|
||||
override val isPrimary: Boolean
|
||||
get() = false
|
||||
}
|
||||
@@ -108,7 +112,12 @@ data class ChatInviteLinkWithJoinRequest(
|
||||
@SerialName(isRevokedField)
|
||||
override val isRevoked: Boolean = false,
|
||||
@SerialName(expireDateField)
|
||||
private val expireDate: TelegramDate? = null
|
||||
private val expireDate: TelegramDate? = null,
|
||||
@SerialName(subscriptionPeriodField)
|
||||
@Serializable(TimeSpanAsSecondsSerializer::class)
|
||||
override val subscriptionPeriod: TimeSpan? = null,
|
||||
@SerialName(subscriptionPriceField)
|
||||
override val subscriptionPrice: UInt? = null
|
||||
) : SecondaryChatInviteLink {
|
||||
override val expirationDateTime: DateTime?
|
||||
get() = expireDate ?.asDate
|
||||
@@ -131,6 +140,11 @@ data class ChatInviteLinkWithLimitedMembers(
|
||||
override val isRevoked: Boolean = false,
|
||||
@SerialName(expireDateField)
|
||||
private val expireDate: TelegramDate? = null,
|
||||
@SerialName(subscriptionPeriodField)
|
||||
@Serializable(TimeSpanAsSecondsSerializer::class)
|
||||
override val subscriptionPeriod: TimeSpan? = null,
|
||||
@SerialName(subscriptionPriceField)
|
||||
override val subscriptionPrice: UInt? = null
|
||||
) : SecondaryChatInviteLink {
|
||||
override val expirationDateTime: DateTime?
|
||||
get() = expireDate ?.asDate
|
||||
@@ -152,6 +166,11 @@ data class ChatInviteLinkUnlimited(
|
||||
override val isRevoked: Boolean = false,
|
||||
@SerialName(expireDateField)
|
||||
private val expireDate: TelegramDate? = null,
|
||||
@SerialName(subscriptionPeriodField)
|
||||
@Serializable(TimeSpanAsSecondsSerializer::class)
|
||||
override val subscriptionPeriod: TimeSpan? = null,
|
||||
@SerialName(subscriptionPriceField)
|
||||
override val subscriptionPrice: UInt? = null
|
||||
) : SecondaryChatInviteLink {
|
||||
override val expirationDateTime: DateTime?
|
||||
get() = expireDate ?.asDate
|
||||
|
||||
@@ -34,6 +34,18 @@ value class PaidMediaPayload(val string: String) {
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class GiftId(
|
||||
val string: String
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class PreparedMessageId(
|
||||
val string: String
|
||||
)
|
||||
|
||||
val usernameRegex = Regex("@[\\w\\d_]+")
|
||||
|
||||
val degreesLimit = 1 .. 360
|
||||
@@ -190,6 +202,7 @@ const val maskPositionField = "mask_position"
|
||||
const val phoneNumberField = "phone_number"
|
||||
const val userIdField = "user_id"
|
||||
const val userIdsField = "user_ids"
|
||||
const val giftIdField = "gift_id"
|
||||
const val onlyIfBannedField = "only_if_banned"
|
||||
const val containsMasksField = "contains_masks"
|
||||
const val resultIdField = "result_id"
|
||||
@@ -254,6 +267,7 @@ const val inviteLinkField = "invite_link"
|
||||
const val viaChatFolderInviteLinkField = "via_chat_folder_invite_link"
|
||||
const val viaJoinRequestField = "via_join_request"
|
||||
const val pinnedMessageField = "pinned_message"
|
||||
const val canSendGiftsField = "can_send_gift"
|
||||
const val canSendPaidMediaField = "can_send_paid_media"
|
||||
const val activeUsernamesField = "active_usernames"
|
||||
const val customTitleField = "custom_title"
|
||||
@@ -301,6 +315,9 @@ const val userAdministratorRightsField = "user_administrator_rights"
|
||||
const val botAdministratorRightsField = "bot_administrator_rights"
|
||||
const val botIsMemberField = "bot_is_member"
|
||||
|
||||
const val startTimestampField = "start_timestamp"
|
||||
const val videoStartTimestampField = "video_start_timestamp"
|
||||
|
||||
const val fileNameField = "file_name"
|
||||
const val mimeTypeField = "mime_type"
|
||||
const val fileIdField = "file_id"
|
||||
@@ -410,10 +427,12 @@ const val idField = "id"
|
||||
const val pollIdField = "poll_id"
|
||||
const val textField = "text"
|
||||
const val thumbnailField = "thumbnail"
|
||||
const val coverField = "cover"
|
||||
const val emojiField = "emoji"
|
||||
const val emojisField = "emojis"
|
||||
const val titleField = "title"
|
||||
const val descriptionField = "description"
|
||||
const val customDescriptionField = "custom_description"
|
||||
const val shortDescriptionField = "short_description"
|
||||
const val performerField = "performer"
|
||||
const val durationField = "duration"
|
||||
@@ -454,6 +473,7 @@ const val actionField = "action"
|
||||
const val positionField = "position"
|
||||
const val labelField = "label"
|
||||
const val amountField = "amount"
|
||||
const val nanostarAmountField = "nanostar_amount"
|
||||
const val pricesField = "prices"
|
||||
const val payloadField = "payload"
|
||||
const val vcardField = "vcard"
|
||||
@@ -472,6 +492,8 @@ const val creatorField = "creator"
|
||||
const val subscriptionPeriodField = "subscription_period"
|
||||
const val subscriptionPriceField = "subscription_price"
|
||||
const val copyTextField = "copy_text"
|
||||
const val giftField = "gift"
|
||||
const val giftsField = "gifts"
|
||||
|
||||
const val pointField = "point"
|
||||
const val xShiftField = "x_shift"
|
||||
@@ -504,6 +526,11 @@ const val startParameterField = "start_parameter"
|
||||
const val totalAmountField = "total_amount"
|
||||
const val invoicePayloadField = "invoice_payload"
|
||||
const val requestCountField = "request_count"
|
||||
const val sponsorUserField = "sponsor_user"
|
||||
const val affiliateUserField = "affiliate_user"
|
||||
const val affiliateChatField = "affiliate_chat"
|
||||
const val commissionPerMilleField = "commission_per_mille"
|
||||
const val affiliateField = "affiliate"
|
||||
const val paidMediaPayloadField = "paid_media_payload"
|
||||
const val shippingOptionIdField = "shipping_option_id"
|
||||
const val shippingQueryIdField = "shipping_query_id"
|
||||
@@ -512,6 +539,7 @@ const val shippingOptionsField = "shipping_options"
|
||||
const val countryCodeField = "country_code"
|
||||
const val countryCodesField = "country_codes"
|
||||
const val totalCountField = "total_count"
|
||||
const val remainingCountField = "remaining_count"
|
||||
const val stateField = "state"
|
||||
const val cityField = "city"
|
||||
const val firstStreetLineField = "street_line1"
|
||||
@@ -519,7 +547,11 @@ const val secondStreetLineField = "street_line2"
|
||||
const val postCodeField = "post_code"
|
||||
const val shippingAddressField = "shipping_address"
|
||||
const val orderInfoField = "order_info"
|
||||
const val subscriptionExpirationDateField = "subscription_expiration_date"
|
||||
const val isRecurringField = "is_recurring"
|
||||
const val isFirstRecurringField = "is_first_recurring"
|
||||
const val telegramPaymentChargeIdField = "telegram_payment_charge_id"
|
||||
const val isCanceledField = "is_canceled"
|
||||
const val providerPaymentChargeIdField = "provider_payment_charge_id"
|
||||
const val providerTokenField = "provider_token"
|
||||
const val providerDataField = "provider_data"
|
||||
@@ -628,6 +660,8 @@ const val giveawayMessageField = "giveaway_message"
|
||||
const val wasRefundedField = "was_refunded"
|
||||
const val isManualField = "is_manual"
|
||||
const val starCountField = "star_count"
|
||||
const val upgradeStarCountField = "upgrade_star_count"
|
||||
const val payToUpgradeField = "pay_for_upgrade"
|
||||
const val paidMediaField = "paid_media"
|
||||
|
||||
const val businessConnectionIdField = "business_connection_id"
|
||||
|
||||
@@ -19,8 +19,6 @@ class InlineQueryResultArticle(
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null,
|
||||
@SerialName(urlField)
|
||||
override val url: String? = null,
|
||||
@SerialName(hideUrlField)
|
||||
val hideUrl: Boolean? = null,
|
||||
@SerialName(descriptionField)
|
||||
override val description: String? = null,
|
||||
@SerialName(thumbnailUrlField)
|
||||
@@ -36,4 +34,31 @@ class InlineQueryResultArticle(
|
||||
WithInputMessageContentInlineQueryResult,
|
||||
UrlInlineQueryResult {
|
||||
override val type: String = "article"
|
||||
@Deprecated("Field hide_url has been deprecated in Bot API 8.2. Use empty url instead")
|
||||
val hideUrl: Boolean
|
||||
get() = url != null && url.isEmpty()
|
||||
|
||||
@Deprecated("Field hide_url has been deprecated in Bot API 8.2. Use empty url instead")
|
||||
constructor(
|
||||
id: InlineQueryId,
|
||||
title: String,
|
||||
inputMessageContent: InputMessageContent,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
url: String? = null,
|
||||
hideUrl: Boolean?,
|
||||
description: String? = null,
|
||||
thumbnailUrl: String? = null,
|
||||
thumbnailWidth: Int? = null,
|
||||
thumbnailHeight: Int? = null
|
||||
) : this(
|
||||
id = id,
|
||||
title = title,
|
||||
inputMessageContent = inputMessageContent,
|
||||
replyMarkup = replyMarkup,
|
||||
url = url,
|
||||
description = description,
|
||||
thumbnailUrl = thumbnailUrl,
|
||||
thumbnailWidth = thumbnailWidth,
|
||||
thumbnailHeight = thumbnailHeight
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.prepared
|
||||
|
||||
import dev.inmo.tgbotapi.types.PreparedMessageId
|
||||
import dev.inmo.tgbotapi.types.TelegramDate
|
||||
import dev.inmo.tgbotapi.types.expirationDateField
|
||||
import dev.inmo.tgbotapi.types.idField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class PreparedInlineMessage(
|
||||
@SerialName(idField)
|
||||
val id: PreparedMessageId,
|
||||
@SerialName(expirationDateField)
|
||||
val expirationDate: TelegramDate,
|
||||
)
|
||||
@@ -25,4 +25,23 @@ data class InlineKeyboardMarkup(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
operator fun plus(other: InlineKeyboardMarkup): InlineKeyboardMarkup {
|
||||
return InlineKeyboardMarkup(
|
||||
keyboard + other.keyboard
|
||||
)
|
||||
}
|
||||
|
||||
operator fun minus(other: InlineKeyboardMarkup): InlineKeyboardMarkup {
|
||||
val otherButtons = other.keyboard.flatten()
|
||||
return InlineKeyboardMarkup(
|
||||
keyboard.mapNotNull { row ->
|
||||
row.filter { button ->
|
||||
button !in otherButtons
|
||||
}.takeIf {
|
||||
it.isNotEmpty()
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,32 @@ data class ReplyKeyboardMarkup(
|
||||
error("Field $inputFieldPlaceholderField length must be in $inputFieldPlaceholderLimit, but was ${inputFieldPlaceholder.length}")
|
||||
}
|
||||
}
|
||||
|
||||
fun add(other: ReplyKeyboardMarkup, placeholderDelimiter: String = "\n"): ReplyKeyboardMarkup {
|
||||
return ReplyKeyboardMarkup(
|
||||
keyboard = keyboard + other.keyboard,
|
||||
resizeKeyboard = resizeKeyboard ?.or(other.resizeKeyboard ?: false) ?: other.resizeKeyboard,
|
||||
oneTimeKeyboard = oneTimeKeyboard ?.or(other.oneTimeKeyboard ?: false) ?: other.oneTimeKeyboard,
|
||||
inputFieldPlaceholder = inputFieldPlaceholder ?.plus(other.inputFieldPlaceholder ?.let { placeholderDelimiter + it } ?: "") ?: other.inputFieldPlaceholder,
|
||||
selective = selective ?.or(other.selective ?: false) ?: other.selective,
|
||||
persistent = persistent ?.or(other.persistent ?: false) ?: other.persistent,
|
||||
)
|
||||
}
|
||||
|
||||
operator fun plus(other: ReplyKeyboardMarkup): ReplyKeyboardMarkup {
|
||||
return add(other)
|
||||
}
|
||||
|
||||
operator fun minus(other: ReplyKeyboardMarkup): ReplyKeyboardMarkup {
|
||||
val otherButtons = other.keyboard.flatten()
|
||||
return copy(
|
||||
keyboard.mapNotNull { row ->
|
||||
row.filter { button ->
|
||||
button !in otherButtons
|
||||
}.takeIf {
|
||||
it.isNotEmpty()
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@ sealed class ChatType {
|
||||
object Channel : ChatType() { override val stringified = "channel" }
|
||||
@Serializable(ChatTypeSerializer::class)
|
||||
class Unknown(override val stringified: String) : ChatType()
|
||||
|
||||
override fun toString(): String {
|
||||
return stringified
|
||||
}
|
||||
}
|
||||
val String.asChatType
|
||||
get() = when (this) {
|
||||
|
||||
@@ -58,6 +58,8 @@ data class ExtendedChannelChatImpl(
|
||||
override val newMembersSeeHistory: Boolean = false,
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3,
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false,
|
||||
) : ExtendedChannelChat
|
||||
|
||||
@Serializable
|
||||
@@ -98,6 +100,8 @@ data class ExtendedGroupChatImpl(
|
||||
override val newMembersSeeHistory: Boolean = false,
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3,
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false,
|
||||
) : ExtendedGroupChat
|
||||
|
||||
@Serializable
|
||||
@@ -146,6 +150,8 @@ data class ExtendedPrivateChatImpl(
|
||||
override val personalChat: PreviewChannelChat? = null,
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3,
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false,
|
||||
) : ExtendedPrivateChat
|
||||
|
||||
typealias ExtendedUser = ExtendedPrivateChatImpl
|
||||
@@ -212,6 +218,8 @@ data class ExtendedSupergroupChatImpl(
|
||||
override val customEmojiStickerSetName: StickerSetName? = null,
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3,
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false,
|
||||
) : ExtendedSupergroupChat
|
||||
|
||||
@Serializable
|
||||
@@ -276,6 +284,8 @@ data class ExtendedForumChatImpl(
|
||||
override val customEmojiStickerSetName: StickerSetName? = null,
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3,
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false,
|
||||
) : ExtendedForumChat
|
||||
|
||||
@Serializable
|
||||
@@ -309,7 +319,9 @@ data class ExtendedBot(
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3,
|
||||
@SerialName(hasMainWebAppField)
|
||||
val hasMainWebApp: Boolean = false
|
||||
val hasMainWebApp: Boolean = false,
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false,
|
||||
) : Bot(), ExtendedChat {
|
||||
@SerialName(isBotField)
|
||||
private val isBot = true
|
||||
@@ -339,4 +351,6 @@ data class UnknownExtendedChat(
|
||||
override val profileBackgroundCustomEmojiId: CustomEmojiId? = null
|
||||
@SerialName(maxReactionCountField)
|
||||
override val maxReactionsCount: Int = 3
|
||||
@SerialName(canSendGiftsField)
|
||||
override val canReceiveGifts: Boolean = false
|
||||
}
|
||||
|
||||
@@ -19,6 +19,11 @@ sealed interface ExtendedChat : Chat {
|
||||
val backgroundCustomEmojiId: CustomEmojiId?
|
||||
val profileBackgroundCustomEmojiId: CustomEmojiId?
|
||||
val maxReactionsCount: Int
|
||||
|
||||
/**
|
||||
* Represent `can_send_gifts` field
|
||||
*/
|
||||
val canReceiveGifts: Boolean
|
||||
}
|
||||
|
||||
@Serializable(ExtendedChatSerializer.Companion::class)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package dev.inmo.tgbotapi.types.files
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.CoverableData
|
||||
|
||||
sealed interface CoveredMediaFile : TelegramMediaFile, CoverableData
|
||||
@@ -0,0 +1,5 @@
|
||||
package dev.inmo.tgbotapi.types.files
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.WithCustomStartMediaData
|
||||
|
||||
sealed interface CustomStartMediaFile : WithCustomStartMediaData
|
||||
@@ -24,13 +24,17 @@ data class VideoFile(
|
||||
override val duration: Long? = null,
|
||||
@SerialName(thumbnailField)
|
||||
override val thumbnail: PhotoSize? = null,
|
||||
@SerialName(coverField)
|
||||
override val cover: Photo? = null,
|
||||
@SerialName(startTimestampField)
|
||||
override val startTimestamp: Seconds? = null,
|
||||
@SerialName(fileNameField)
|
||||
override val fileName: String? = null,
|
||||
@SerialName(mimeTypeField)
|
||||
override val mimeType: MimeType? = null,
|
||||
@SerialName(fileSizeField)
|
||||
override val fileSize: Long? = null
|
||||
) : TelegramMediaFile, CustomNamedMediaFile, MimedMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile,
|
||||
) : TelegramMediaFile, CustomNamedMediaFile, MimedMediaFile, CoveredMediaFile, CustomStartMediaFile, ThumbedMediaFile, PlayableMediaFile, SizedMediaFile,
|
||||
MediaContentVariant, UsefulAsPaidMediaFile
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
@@ -38,13 +42,16 @@ inline fun VideoFile.toTelegramMediaVideo(
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
spoilered: Boolean = false,
|
||||
showCaptionAboveMedia: Boolean = false
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
startTimestamp: Seconds? = this.startTimestamp
|
||||
) = TelegramMediaVideo(
|
||||
file = fileId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
spoilered = spoilered,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
cover = cover ?.fileId,
|
||||
startTimestamp = startTimestamp,
|
||||
width = width,
|
||||
height = height,
|
||||
duration = duration,
|
||||
@@ -55,12 +62,15 @@ inline fun VideoFile.toTelegramMediaVideo(
|
||||
inline fun VideoFile.toTelegramMediaVideo(
|
||||
textSources: TextSourcesList,
|
||||
spoilered: Boolean = false,
|
||||
showCaptionAboveMedia: Boolean = false
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
startTimestamp: Seconds? = this.startTimestamp
|
||||
) = TelegramMediaVideo(
|
||||
file = fileId,
|
||||
entities = textSources,
|
||||
spoilered = spoilered,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
cover = cover ?.fileId,
|
||||
startTimestamp = startTimestamp,
|
||||
width = width,
|
||||
height = height,
|
||||
duration = duration,
|
||||
@@ -72,5 +82,7 @@ inline fun VideoFile.toTelegramPaidMediaVideo() = TelegramPaidMediaVideo(
|
||||
width = width,
|
||||
height = height,
|
||||
duration = duration,
|
||||
cover = cover ?.fileId,
|
||||
startTimestamp = startTimestamp,
|
||||
thumb = thumbnail ?.fileId
|
||||
)
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
package dev.inmo.tgbotapi.types.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.files.Sticker
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
|
||||
@Serializable(Gift.Companion::class)
|
||||
sealed interface Gift {
|
||||
val id: GiftId
|
||||
val sticker: Sticker
|
||||
val starCount: Int
|
||||
val totalCount: Int?
|
||||
val upgradeStarCount: Int?
|
||||
val remainingCount: Int?
|
||||
|
||||
@Serializable
|
||||
data class Unlimited(
|
||||
@SerialName(idField)
|
||||
override val id: GiftId,
|
||||
@SerialName(stickerField)
|
||||
override val sticker: Sticker,
|
||||
@SerialName(starCountField)
|
||||
override val starCount: Int,
|
||||
@SerialName(upgradeStarCountField)
|
||||
override val upgradeStarCount: Int? = null
|
||||
) : Gift {
|
||||
override val totalCount: Int?
|
||||
get() = null
|
||||
override val remainingCount: Int?
|
||||
get() = null
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class Limited(
|
||||
@SerialName(idField)
|
||||
override val id: GiftId,
|
||||
@SerialName(stickerField)
|
||||
override val sticker: Sticker,
|
||||
@SerialName(starCountField)
|
||||
override val starCount: Int,
|
||||
@SerialName(totalCountField)
|
||||
override val totalCount: Int,
|
||||
@SerialName(remainingCountField)
|
||||
override val remainingCount: Int,
|
||||
@SerialName(upgradeStarCountField)
|
||||
override val upgradeStarCount: Int? = null,
|
||||
) : Gift
|
||||
|
||||
companion object : KSerializer<Gift> {
|
||||
@Serializable
|
||||
private data class GiftSurrogate(
|
||||
val id: GiftId,
|
||||
val sticker: Sticker,
|
||||
val star_count: Int,
|
||||
val total_count: Int? = null,
|
||||
val remaining_count: Int? = null,
|
||||
val upgrade_star_count: Int? = null,
|
||||
)
|
||||
|
||||
override val descriptor: SerialDescriptor
|
||||
get() = GiftSurrogate.serializer().descriptor
|
||||
|
||||
override fun deserialize(decoder: Decoder): Gift {
|
||||
val surrogate = GiftSurrogate.serializer().deserialize(decoder)
|
||||
|
||||
return if (surrogate.total_count != null && surrogate.remaining_count != null) {
|
||||
Limited(
|
||||
id = surrogate.id,
|
||||
sticker = surrogate.sticker,
|
||||
starCount = surrogate.star_count,
|
||||
totalCount = surrogate.total_count,
|
||||
remainingCount = surrogate.remaining_count,
|
||||
upgradeStarCount = surrogate.upgrade_star_count,
|
||||
)
|
||||
} else {
|
||||
Unlimited(
|
||||
id = surrogate.id,
|
||||
sticker = surrogate.sticker,
|
||||
starCount = surrogate.star_count,
|
||||
upgradeStarCount = surrogate.upgrade_star_count,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun serialize(encoder: Encoder, value: Gift) {
|
||||
val surrogate = GiftSurrogate(
|
||||
id = value.id,
|
||||
sticker = value.sticker,
|
||||
star_count = value.starCount,
|
||||
total_count = value.totalCount,
|
||||
remaining_count = value.remainingCount,
|
||||
upgrade_star_count = value.upgradeStarCount
|
||||
)
|
||||
GiftSurrogate.serializer().serialize(encoder, surrogate)
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user