mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-11-17 04:20:13 +00:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ecd42c859 | |||
| 3857950141 | |||
| 6d5bedd315 | |||
| 69a9e8f820 | |||
| 6d8693a003 | |||
| c990d987f5 | |||
| b8530f14ca | |||
| db8bac9b52 | |||
| e53b3b8198 | |||
| 71ccfc88cc | |||
| dd2923f92d | |||
| ff78153591 | |||
| e2ce9cfebf | |||
| 0a01d2567e | |||
| e4fb45c09b | |||
| db0df975c7 | |||
| 2003b314a3 | |||
| 55a78375be | |||
|
|
256607e336 | ||
| 92f2a5afdb | |||
| 3affcf4399 | |||
| 67dfa19a1b | |||
| 86e83f7f1a | |||
| 429fc5d2f9 | |||
| d19e6ad4e0 | |||
| 134145f441 | |||
| ef76fe52ca | |||
| bab69f523a | |||
| 91f4d3bf24 | |||
| 3e316dfde0 | |||
| 1ef49ad48c | |||
| 9297824dc3 | |||
| d02ed592d8 | |||
| 6ea9a28c7c | |||
| 88fc4fc444 | |||
| dd0de3b6d4 | |||
| 838fff8207 | |||
| 751a77f6d8 | |||
| 222fe7594f |
24
CHANGELOG.md
24
CHANGELOG.md
@@ -1,5 +1,29 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 26.1.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 9.1](https://core.telegram.org/bots/api-changelog#july-3-2025)**
|
||||
|
||||
**THIS UPDATE _MAY_ CONTAINS BREAKING CHANGES**
|
||||
|
||||
## 26.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES IN BEHAVIOUR BUILDER AND CORE. BE CAREFUL ON UPDATE**
|
||||
|
||||
* `Version`:
|
||||
* `Serialization`: `1.8.0` -> `1.8.1`
|
||||
* `Coroutines`: `1.10.1` -> `1.10.2`
|
||||
* `Ktor`: `3.1.1` -> `3.1.3`
|
||||
* `MicroUtils`: `0.25.3` -> `0.25.7`
|
||||
* `Core`:
|
||||
* **POTENTIALLY BREAKING CHANGE** Long polling has been reworked a bit
|
||||
* **BREAKING CHANGE** `RequestsExecutor` got property `RequestsExecutor.Log: KSLog`
|
||||
* `BehaviourContext`:
|
||||
* **BREAKING CHANGE** All triggers and waiters become non-suspend functions
|
||||
* **BREAKING CHANGE** Behaviour of counted extensions (commands, data callback queries, etc.) has been changed a bit: now each one will
|
||||
create subcontext and work in it
|
||||
* New extension `BehaviourContext.launchInNewSubContext` which will launch some job in subcontext of receiver
|
||||
|
||||
## 25.0.1
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 9.0](https://core.telegram.org/bots/api-changelog#april-11-2025)**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#april-11-2025)
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#april-11-2025)
|
||||
|
||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
|
||||
@@ -38,9 +38,9 @@ if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != n
|
||||
// temporal crutch until legacy tests will be stabled or legacy target will be removed
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url "https://nexus.inmo.dev/repository/maven-releases/" }
|
||||
mavenCentral()
|
||||
google()
|
||||
maven { url "https://nexus.inmo.dev/repository/maven-releases/" }
|
||||
mavenLocal()
|
||||
}
|
||||
if (it != rootProject.findProject("docs")) {
|
||||
|
||||
@@ -6,4 +6,4 @@ kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=25.0.1
|
||||
library_version=26.1.0
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "2.1.20"
|
||||
kotlin-serialization = "1.8.0"
|
||||
kotlin-coroutines = "1.10.1"
|
||||
kotlin-serialization = "1.8.1"
|
||||
kotlin-coroutines = "1.10.2"
|
||||
|
||||
javax-activation = "1.1.1"
|
||||
|
||||
korlibs = "5.4.0"
|
||||
uuid = "0.8.4"
|
||||
ktor = "3.1.1"
|
||||
ktor = "3.1.3"
|
||||
|
||||
ksp = "2.1.20-1.0.31"
|
||||
kotlin-poet = "1.18.1"
|
||||
|
||||
microutils = "0.25.3"
|
||||
microutils = "0.25.7"
|
||||
kslog = "1.4.1"
|
||||
|
||||
versions = "0.51.0"
|
||||
|
||||
@@ -294,6 +294,10 @@ public final class dev/inmo/tgbotapi/extensions/api/bot/GetMyShortDescriptionKt
|
||||
public static synthetic fun getMyShortDescription$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/micro_utils/language_codes/IetfLang;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/bot/GetMyStarBalanceKt {
|
||||
public static final fun getMyStarBalance (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/bot/SetMyCommandsKt {
|
||||
public static final fun setMyCommands (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/util/List;Ldev/inmo/tgbotapi/types/commands/BotCommandScope;Ldev/inmo/micro_utils/language_codes/IetfLang;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setMyCommands (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/util/List;Ldev/inmo/tgbotapi/types/commands/BotCommandScope;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -928,6 +932,13 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/caption/EditInlineMessa
|
||||
public static synthetic fun editMessageCaption-KUlcsOA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/edit/checklist/EditMessageChecklistKt {
|
||||
public static final fun editMessageChecklist (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editMessageChecklist$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun editMessageChecklist-rhNz7xc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editMessageChecklist-rhNz7xc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/edit/location/live/EditChatMessageLiveLocationKt {
|
||||
public static final fun editLiveLocation-K1rWLlE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JDDLjava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun editLiveLocation-K1rWLlE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JDDLjava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1319,6 +1330,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/RepliesKt {
|
||||
public static synthetic fun reply-ETv3X88$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-Ff7hz4g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/polls/QuizPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;IZZLdev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-Ff7hz4g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/polls/QuizPoll;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;IZZLdev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-Fsp7mzg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-Fsp7mzg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-Ke6Xk7g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;DDLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun reply-Ke6Xk7g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/files/Sticker;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun reply-Ke6Xk7g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/files/VoiceFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1337,6 +1350,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/RepliesKt {
|
||||
public static synthetic fun reply-TJcuzHc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-TW0iyVw (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;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;Ljava/lang/String;ZZZZZZZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-TW0iyVw$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;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;Ljava/lang/String;ZZZZZZZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-UjZzIww (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-UjZzIww$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-XYAUcks (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/payments/LabeledPrice;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-XYAUcks$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/payments/LabeledPrice;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-Y21khHA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1393,6 +1408,10 @@ public final class dev/inmo/tgbotapi/extensions/api/send/RepliesKt {
|
||||
public static synthetic fun replyWithAudio-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithAudio-qttyOhY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithAudio-qttyOhY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithChecklist-Fsp7mzg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithChecklist-Fsp7mzg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithChecklist-UjZzIww (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithChecklist-UjZzIww$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithDice-1DTOFHo (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithDice-1DTOFHo$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithDocument-3s1eNd0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1472,6 +1491,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMess
|
||||
public static synthetic fun reply-Lf4znJU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/files/VoiceFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-Lf4znJU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/content/TextedMediaContent;Ljava/util/List;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-Lf4znJU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-NqYE4-Y (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun reply-NqYE4-Y$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun reply-PEnUfdE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/files/AnimationFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun reply-PEnUfdE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/location/StaticLocation;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun reply-PEnUfdE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/util/List;Ljava/util/List;ZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1550,6 +1571,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMess
|
||||
public static synthetic fun replyWithAudio-PEnUfdE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithAudio-jTbypQk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithAudio-jTbypQk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithChecklist-NqYE4-Y (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithChecklist-NqYE4-Y$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/IdChatIdentifier;ZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithDice-PVBa9oU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/dice/DiceAnimationType;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun replyWithDice-PVBa9oU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/dice/DiceAnimationType;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun replyWithDocument-COsZUog (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1698,6 +1721,13 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendActionKt {
|
||||
public static synthetic fun sendBotAction-tTqYV0E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/actions/BotAction;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/SendChecklistKt {
|
||||
public static final fun sendChecklist-6LFavEk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendChecklist-6LFavEk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/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 sendChecklist-mTQpBzk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Pair;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendChecklist-mTQpBzk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Pair;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;ZZLjava/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/SendContactKt {
|
||||
public static final fun sendContact--hE6nj8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/Contact;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 sendContact--hE6nj8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/Contact;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;
|
||||
@@ -1867,6 +1897,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt {
|
||||
public static synthetic fun send-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ljava/util/List;ILjava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;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 send-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/util/List;IZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;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 send-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;ZLdev/inmo/tgbotapi/types/polls/QuizPoll;Ljava/util/List;Ljava/util/List;Ljava/util/List;IZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;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 send-6LFavEk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun send-6LFavEk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/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 send-CoeeeEM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/AudioFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/lang/String;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 send-CoeeeEM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/PhotoSize;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 send-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;
|
||||
@@ -1959,6 +1991,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt {
|
||||
public static final fun send-k7KSHg8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;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 send-k7KSHg8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;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;
|
||||
public static synthetic fun send-k7KSHg8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;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;
|
||||
public static final fun send-mTQpBzk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Pair;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun send-mTQpBzk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/Pair;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;ZZLjava/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 send-qttyOhY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/AnimationFile;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 send-qttyOhY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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 send-qttyOhY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/util/List;ZLjava/util/List;ZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;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;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.GetMe
|
||||
import dev.inmo.tgbotapi.requests.bot.GetMyStarBalance
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedBot
|
||||
import dev.inmo.tgbotapi.types.payments.stars.StarAmount
|
||||
|
||||
public suspend fun TelegramBot.getMyStarBalance(): StarAmount = execute(GetMyStarBalance)
|
||||
@@ -0,0 +1,47 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.checklist
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.checklist.EditMessageChecklist
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.businessConnectionIdField
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.checklistField
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.messageIdField
|
||||
import dev.inmo.tgbotapi.types.replyMarkupField
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.editMessageChecklist(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
checklist: Checklist.Input,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = execute(
|
||||
EditMessageChecklist(
|
||||
chatId = chatId,
|
||||
messageId = messageId,
|
||||
businessConnectionId = businessConnectionId,
|
||||
checklist = checklist,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.editMessageChecklist(
|
||||
message: BusinessContentMessage<ChecklistContent>,
|
||||
checklist: Checklist.Input,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = execute(
|
||||
EditMessageChecklist(
|
||||
chatId = message.chat.id,
|
||||
messageId = message.messageId,
|
||||
businessConnectionId = message.businessConnectionId,
|
||||
checklist = checklist,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
)
|
||||
@@ -17,6 +17,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
||||
@@ -24,6 +25,7 @@ import dev.inmo.tgbotapi.types.files.Sticker
|
||||
import dev.inmo.tgbotapi.types.games.Game
|
||||
import dev.inmo.tgbotapi.types.location.*
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.*
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
@@ -164,6 +166,91 @@ public suspend inline fun TelegramBot.reply(
|
||||
)
|
||||
|
||||
|
||||
// Checklist
|
||||
|
||||
public suspend inline fun TelegramBot.replyWithChecklist(
|
||||
to: AccessibleMessage,
|
||||
replyInBusinessConnectionId: BusinessConnectionId,
|
||||
checklist: Checklist.Input,
|
||||
replyInChatId: IdChatIdentifier = to.chat.id,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = sendChecklist(
|
||||
chatId = replyInChatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend inline fun TelegramBot.replyWithChecklist(
|
||||
to: BusinessContentMessage<*>,
|
||||
checklist: Checklist.Input,
|
||||
replyInChatId: IdChatIdentifier = to.chat.id,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = sendChecklist(
|
||||
chatId = replyInChatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = to.businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
to: AccessibleMessage,
|
||||
replyInBusinessConnectionId: BusinessConnectionId,
|
||||
checklist: Checklist.Input,
|
||||
replyInChatId: IdChatIdentifier = to.chat.id,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = sendChecklist(
|
||||
chatId = replyInChatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
to: BusinessContentMessage<*>,
|
||||
checklist: Checklist.Input,
|
||||
replyInChatId: IdChatIdentifier = to.chat.id,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = sendChecklist(
|
||||
chatId = replyInChatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = to.businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = ReplyParameters(to, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
|
||||
// Location
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.files.TelegramMediaFile
|
||||
@@ -169,6 +170,61 @@ public suspend inline fun TelegramBot.reply(
|
||||
)
|
||||
|
||||
|
||||
// Checklist
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
public suspend inline fun TelegramBot.replyWithChecklist(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId,
|
||||
checklist: Checklist.Input,
|
||||
replyInChatId: IdChatIdentifier = toChatId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = sendChecklist(
|
||||
chatId = replyInChatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
public suspend inline fun TelegramBot.reply(
|
||||
toChatId: IdChatIdentifier,
|
||||
toMessageId: MessageId,
|
||||
replyInBusinessConnectionId: BusinessConnectionId,
|
||||
checklist: Checklist.Input,
|
||||
replyInChatId: IdChatIdentifier = toChatId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
): ContentMessage<ChecklistContent> = sendChecklist(
|
||||
chatId = replyInChatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = replyInBusinessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = ReplyParameters(toChatId, toMessageId, allowSendingWithoutReply = allowSendingWithoutReply),
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
|
||||
// Location
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.send.SendChecklist
|
||||
import dev.inmo.tgbotapi.types.BusinessChatId
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.EffectId
|
||||
import dev.inmo.tgbotapi.types.ReplyParameters
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
|
||||
public suspend fun TelegramBot.sendChecklist(
|
||||
chatId: ChatIdentifier,
|
||||
checklist: Checklist.Input,
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
SendChecklist(
|
||||
chatId = chatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = replyParameters,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendChecklist(
|
||||
chatId: BusinessChatId,
|
||||
checklist: Checklist.Input,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
SendChecklist(
|
||||
chatId = chatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = chatId.businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = replyParameters,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
)
|
||||
@@ -6,6 +6,7 @@ import dev.inmo.tgbotapi.extensions.api.send.media.*
|
||||
import dev.inmo.tgbotapi.extensions.api.send.payments.sendInvoice
|
||||
import dev.inmo.tgbotapi.extensions.api.send.polls.sendQuizPoll
|
||||
import dev.inmo.tgbotapi.extensions.api.send.polls.sendRegularPoll
|
||||
import dev.inmo.tgbotapi.requests.send.SendChecklist
|
||||
import dev.inmo.tgbotapi.requests.send.media.rawSendingMediaGroupsWarning
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.actions.BotAction
|
||||
@@ -14,6 +15,7 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.dice.DiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.games.Game
|
||||
@@ -534,6 +536,50 @@ public suspend fun TelegramBot.send(
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
|
||||
public suspend fun TelegramBot.send(
|
||||
chatId: ChatIdentifier,
|
||||
checklist: Checklist.Input,
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
SendChecklist(
|
||||
chatId = chatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = replyParameters,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.send(
|
||||
chatId: BusinessChatId,
|
||||
checklist: Checklist.Input,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = execute(
|
||||
SendChecklist(
|
||||
chatId = chatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = chatId.businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = replyParameters,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* Will execute [sendDocument] request
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
|
||||
@@ -24,6 +24,7 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourConte
|
||||
public static fun getEditedChannelPostMediaGroupsFlow (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static fun getEditedMessageMediaGroupsFlow (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static fun getFlowsUpdatesFilter (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;
|
||||
public static fun getLog (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Ldev/inmo/kslog/common/KSLog;
|
||||
public static fun getMessageMediaGroupsFlow (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static fun getScope (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;)Lkotlinx/coroutines/CoroutineScope;
|
||||
public static fun launchStateHandling (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/micro_utils/fsm/common/State;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -102,6 +103,7 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
|
||||
public fun getEditedMessagesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getFlowsUpdatesFilter ()Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;
|
||||
public fun getInlineQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getLog ()Ldev/inmo/kslog/common/KSLog;
|
||||
public fun getMessageMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getMessagesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
public fun getMyChatMemberUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.micro_utils.coroutines.*
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder
|
||||
@@ -153,12 +154,14 @@ fun <BC : BehaviourContext> BC.createSubContext(
|
||||
scope: CoroutineScope = LinkedSupervisorScope(),
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = this.subcontextInitialAction,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BC, Unit, Update> = this.subcontextInitialAction,
|
||||
) = copy(
|
||||
scope = scope,
|
||||
upstreamUpdatesFlow = updatesUpstreamFlow,
|
||||
triggersHolder = triggersHolder,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
subcontextInitialAction = {
|
||||
(this as BC).subcontextInitialAction(it)
|
||||
}
|
||||
) as BC
|
||||
|
||||
/**
|
||||
@@ -174,6 +177,52 @@ suspend fun <T, BC : BehaviourContext> BC.doInContext(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch [behaviourContextReceiver] in context of [this] as [BehaviourContext] and as [kotlin.coroutines.CoroutineContext]
|
||||
*
|
||||
* [this] [BehaviourContext] will **NOT** be closed automatically
|
||||
*/
|
||||
suspend fun <T, BC : BehaviourContext> BC.doInNewSubContext(
|
||||
scope: CoroutineScope = LinkedSupervisorScope(),
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BC, Unit, Update> = this.subcontextInitialAction,
|
||||
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
|
||||
): T {
|
||||
return createSubContext(
|
||||
scope = scope,
|
||||
triggersHolder = triggersHolder,
|
||||
updatesUpstreamFlow = updatesUpstreamFlow,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
).run {
|
||||
behaviourContextReceiver()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch [behaviourContextReceiver] in context of [this] as [BehaviourContext] and as [kotlin.coroutines.CoroutineContext]
|
||||
*
|
||||
* [this] [BehaviourContext] will **NOT** be closed automatically
|
||||
*/
|
||||
fun <T, BC : BehaviourContext> BC.launchInNewSubContext(
|
||||
scope: CoroutineScope = LinkedSupervisorScope(),
|
||||
triggersHolder: TriggersHolder = this.triggersHolder,
|
||||
updatesUpstreamFlow: Flow<Update> = allUpdatesFlow,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BC, Unit, Update> = this.subcontextInitialAction,
|
||||
behaviourContextReceiver: CustomBehaviourContextReceiver<BC, T>
|
||||
): Job {
|
||||
return createSubContext(
|
||||
scope = scope,
|
||||
triggersHolder = triggersHolder,
|
||||
updatesUpstreamFlow = updatesUpstreamFlow,
|
||||
subcontextInitialAction = subcontextInitialAction
|
||||
).apply {
|
||||
this@apply.launchLoggingDropExceptions(logger = Log) {
|
||||
behaviourContextReceiver()
|
||||
}
|
||||
}.coroutineContext.job
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new one [BehaviourContext] using [createSubContext] and launches [behaviourContextReceiver] in a new context
|
||||
* using [doInContext].
|
||||
|
||||
@@ -40,7 +40,7 @@ class CombinedSubcontextInitialAction(
|
||||
runCatching {
|
||||
invoke(update)
|
||||
}.onFailure {
|
||||
logger.error(it) {
|
||||
Log.error(it) {
|
||||
"Unable to execute $subaction for update $update. Will try on next round"
|
||||
}
|
||||
}.onSuccess {
|
||||
@@ -50,7 +50,7 @@ class CombinedSubcontextInitialAction(
|
||||
}
|
||||
leftSubActions.removeAll(successSubActions)
|
||||
if (successSubActions.isEmpty()) {
|
||||
logger.error {
|
||||
Log.error {
|
||||
"Some SubActions have been unable to complete successfully:${leftSubActions.joinToString("\n") { it.toString() }}"
|
||||
}
|
||||
break
|
||||
|
||||
@@ -29,7 +29,7 @@ typealias NullableRequestBuilder<T> = suspend (Update) -> Request<T>?
|
||||
* will be called too), [errorFactory] and then will be returned null
|
||||
*/
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend fun <T> FlowsUpdatesFilter.expectFlow(
|
||||
fun <T> FlowsUpdatesFilter.expectFlow(
|
||||
bot: TelegramBot,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
@@ -58,12 +58,17 @@ suspend fun <T> FlowsUpdatesFilter.expectFlow(
|
||||
result.getOrThrow()
|
||||
}
|
||||
}.flatten()
|
||||
initRequest ?.also {
|
||||
runCatching {
|
||||
bot.execute(initRequest)
|
||||
|
||||
return if (initRequest == null) {
|
||||
flow
|
||||
} else {
|
||||
flow {
|
||||
runCatching {
|
||||
bot.execute(initRequest)
|
||||
}
|
||||
flow.collect(this)
|
||||
}
|
||||
}
|
||||
return flow
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,7 +82,7 @@ suspend fun <T> FlowsUpdatesFilter.expectFlow(
|
||||
* will be called too), [errorFactory] and then will be returned null
|
||||
*/
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend fun <T> BehaviourContext.expectFlow(
|
||||
fun <T> BehaviourContext.expectFlow(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
cancelRequestFactory: NullableRequestBuilder<*> = { null },
|
||||
|
||||
@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend fun BehaviourContext.waitBusinessConnection(
|
||||
fun BehaviourContext.waitBusinessConnection(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<BusinessConnection> = expectFlow(
|
||||
@@ -20,7 +20,7 @@ suspend fun BehaviourContext.waitBusinessConnection(
|
||||
(it.businessConnectionUpdateOrNull() ?.data).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitBusinessConnectionEnabled(
|
||||
fun BehaviourContext.waitBusinessConnectionEnabled(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<BusinessConnection> = expectFlow(
|
||||
@@ -30,7 +30,7 @@ suspend fun BehaviourContext.waitBusinessConnectionEnabled(
|
||||
(it.businessConnectionUpdateOrNull() ?.data ?.enabledOrNull()).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitBusinessConnectionDisabled(
|
||||
fun BehaviourContext.waitBusinessConnectionDisabled(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<BusinessConnection> = expectFlow(
|
||||
|
||||
@@ -13,7 +13,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
typealias CallbackQueryMapper<T> = suspend T.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O> BehaviourContext.waitCallbackQueries(
|
||||
inline fun <reified O> BehaviourContext.waitCallbackQueries(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -24,39 +24,39 @@ suspend inline fun <reified O> BehaviourContext.waitCallbackQueries(
|
||||
}
|
||||
|
||||
|
||||
suspend fun BehaviourContext.waitDataCallbackQuery(
|
||||
fun BehaviourContext.waitDataCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<DataCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGameShortNameCallbackQuery(
|
||||
fun BehaviourContext.waitGameShortNameCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<GameShortNameCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitInlineMessageIdCallbackQuery(
|
||||
fun BehaviourContext.waitInlineMessageIdCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<InlineMessageIdCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitInlineMessageIdDataCallbackQuery(
|
||||
fun BehaviourContext.waitInlineMessageIdDataCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<InlineMessageIdDataCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitInlineMessageIdGameShortNameCallbackQuery(
|
||||
fun BehaviourContext.waitInlineMessageIdGameShortNameCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<InlineMessageIdGameShortNameCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitMessageCallbackQuery(
|
||||
fun BehaviourContext.waitMessageCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<MessageCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitMessageDataCallbackQuery(
|
||||
fun BehaviourContext.waitMessageDataCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<MessageDataCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitMessageGameShortNameCallbackQuery(
|
||||
fun BehaviourContext.waitMessageGameShortNameCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<MessageGameShortNameCallbackQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitUnknownCallbackQuery(
|
||||
fun BehaviourContext.waitUnknownCallbackQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCallbackQueries<UnknownCallbackQueryType>(initRequest, errorFactory)
|
||||
|
||||
@@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.types.boosts.ChatBoostRemoved
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend fun BehaviourContext.waitChatBoostRemoved(
|
||||
fun BehaviourContext.waitChatBoostRemoved(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ChatBoostRemoved> = expectFlow(
|
||||
|
||||
@@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.types.boosts.ChatBoostUpdated
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend fun BehaviourContext.waitChatBoostUpdated(
|
||||
fun BehaviourContext.waitChatBoostUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ChatBoostUpdated> = expectFlow(
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
typealias ChatJoinRequestsMapper = suspend ChatJoinRequest.() -> ChatJoinRequest?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O> BehaviourContext.internalWaitChatJoinRequests(
|
||||
inline fun <reified O> BehaviourContext.internalWaitChatJoinRequests(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -22,7 +22,7 @@ suspend inline fun <reified O> BehaviourContext.internalWaitChatJoinRequests(
|
||||
}
|
||||
|
||||
|
||||
suspend fun BehaviourContext.waitChatJoinRequests(
|
||||
fun BehaviourContext.waitChatJoinRequests(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) : Flow<ChatJoinRequest> = internalWaitChatJoinRequests(
|
||||
|
||||
@@ -21,7 +21,7 @@ import kotlinx.coroutines.flow.filter
|
||||
typealias ChatMemberUpdatedMapper<T> = suspend T.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : ChatMemberUpdatedUpdate> BehaviourContext.waitChatMemberUpdatedWithFilter(
|
||||
inline fun <reified O : ChatMemberUpdatedUpdate> BehaviourContext.waitChatMemberUpdatedWithFilter(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ChatMemberUpdated> = expectFlow(
|
||||
@@ -31,227 +31,227 @@ suspend inline fun <reified O : ChatMemberUpdatedUpdate> BehaviourContext.waitCh
|
||||
(it as? O) ?.data.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberUpdated(
|
||||
fun BehaviourContext.waitChatMemberUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitChatMemberUpdatedWithFilter<ChatMemberUpdatedUpdate>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberUpdated(
|
||||
fun BehaviourContext.waitCommonChatMemberUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitChatMemberUpdatedWithFilter<CommonChatMemberUpdatedUpdate>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberUpdated(
|
||||
fun BehaviourContext.waitMyChatMemberUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdatedWithFilter<MyChatMemberUpdatedUpdate>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberJoined(
|
||||
fun BehaviourContext.waitChatMemberJoined(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberJoinedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberLeft(
|
||||
fun BehaviourContext.waitChatMemberLeft(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberLeftFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberSubscribed(
|
||||
fun BehaviourContext.waitChatMemberSubscribed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberSubscribedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberSubscriptionChanged(
|
||||
fun BehaviourContext.waitChatMemberSubscriptionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberSubscriptionChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberUnsubscribed(
|
||||
fun BehaviourContext.waitChatMemberUnsubscribed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberUnsubscribedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberGotPromoted(
|
||||
fun BehaviourContext.waitChatMemberGotPromoted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotPromotedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberGotPromotionChanged(
|
||||
fun BehaviourContext.waitChatMemberGotPromotionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotPromotionChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberGotDemoted(
|
||||
fun BehaviourContext.waitChatMemberGotDemoted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotDemotedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberBecameOwner(
|
||||
fun BehaviourContext.waitChatMemberBecameOwner(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberBecameOwnerFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberCeasedOwnership(
|
||||
fun BehaviourContext.waitChatMemberCeasedOwnership(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberCeasedOwnershipFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberGotRestricted(
|
||||
fun BehaviourContext.waitChatMemberGotRestricted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotRestrictedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberGotRestrictionChanged(
|
||||
fun BehaviourContext.waitChatMemberGotRestrictionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotRestrictionsChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberGotUnrestricted(
|
||||
fun BehaviourContext.waitChatMemberGotUnrestricted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotUnrestrictedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitChatMemberKicked(
|
||||
fun BehaviourContext.waitChatMemberKicked(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMemberUpdated(initRequest, errorFactory).filter { chatMemberKickedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberJoined(
|
||||
fun BehaviourContext.waitCommonChatMemberJoined(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberJoinedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberLeft(
|
||||
fun BehaviourContext.waitCommonChatMemberLeft(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberLeftFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberSubscribed(
|
||||
fun BehaviourContext.waitCommonChatMemberSubscribed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberSubscribedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberSubscriptionChanged(
|
||||
fun BehaviourContext.waitCommonChatMemberSubscriptionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberSubscriptionChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberUnsubscribed(
|
||||
fun BehaviourContext.waitCommonChatMemberUnsubscribed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberUnsubscribedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberGotPromoted(
|
||||
fun BehaviourContext.waitCommonChatMemberGotPromoted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotPromotedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberGotPromotionChanged(
|
||||
fun BehaviourContext.waitCommonChatMemberGotPromotionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotPromotionChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberGotDemoted(
|
||||
fun BehaviourContext.waitCommonChatMemberGotDemoted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotDemotedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberBecameOwner(
|
||||
fun BehaviourContext.waitCommonChatMemberBecameOwner(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberBecameOwnerFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberCeasedOwnership(
|
||||
fun BehaviourContext.waitCommonChatMemberCeasedOwnership(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberCeasedOwnershipFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberGotRestricted(
|
||||
fun BehaviourContext.waitCommonChatMemberGotRestricted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotRestrictedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberGotRestrictionChanged(
|
||||
fun BehaviourContext.waitCommonChatMemberGotRestrictionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotRestrictionsChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberGotUnrestricted(
|
||||
fun BehaviourContext.waitCommonChatMemberGotUnrestricted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotUnrestrictedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitCommonChatMemberKicked(
|
||||
fun BehaviourContext.waitCommonChatMemberKicked(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommonChatMemberUpdated(initRequest, errorFactory).filter { chatMemberKickedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberJoined(
|
||||
fun BehaviourContext.waitMyChatMemberJoined(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberJoinedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberLeft(
|
||||
fun BehaviourContext.waitMyChatMemberLeft(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberLeftFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberSubscribed(
|
||||
fun BehaviourContext.waitMyChatMemberSubscribed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberSubscribedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberSubscriptionChanged(
|
||||
fun BehaviourContext.waitMyChatMemberSubscriptionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberSubscriptionChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberUnsubscribed(
|
||||
fun BehaviourContext.waitMyChatMemberUnsubscribed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberUnsubscribedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberGotPromoted(
|
||||
fun BehaviourContext.waitMyChatMemberGotPromoted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotPromotedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberGotPromotionChanged(
|
||||
fun BehaviourContext.waitMyChatMemberGotPromotionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotPromotionChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberGotDemoted(
|
||||
fun BehaviourContext.waitMyChatMemberGotDemoted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotDemotedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberBecameOwner(
|
||||
fun BehaviourContext.waitMyChatMemberBecameOwner(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberBecameOwnerFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberCeasedOwnership(
|
||||
fun BehaviourContext.waitMyChatMemberCeasedOwnership(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberCeasedOwnershipFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberGotRestricted(
|
||||
fun BehaviourContext.waitMyChatMemberGotRestricted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotRestrictedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberGotRestrictionChanged(
|
||||
fun BehaviourContext.waitMyChatMemberGotRestrictionChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotRestrictionsChangedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberGotUnrestricted(
|
||||
fun BehaviourContext.waitMyChatMemberGotUnrestricted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberGotUnrestrictedFilter(it) };
|
||||
|
||||
suspend fun BehaviourContext.waitMyChatMemberKicked(
|
||||
fun BehaviourContext.waitMyChatMemberKicked(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitMyChatMemberUpdated(initRequest, errorFactory).filter { chatMemberKickedFilter(it) };
|
||||
|
||||
@@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : ChatMessageReactionUpdated> BehaviourContext.waitChatMessageReactionUpdated(
|
||||
inline fun <reified O : ChatMessageReactionUpdated> BehaviourContext.waitChatMessageReactionUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -19,13 +19,13 @@ suspend inline fun <reified O : ChatMessageReactionUpdated> BehaviourContext.wai
|
||||
(it.chatMessageReactionUpdatedUpdateOrNull() ?.data as? O).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitChatMessageReactionUpdatedByUser(
|
||||
fun BehaviourContext.waitChatMessageReactionUpdatedByUser(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMessageReactionUpdated<ChatMessageReactionUpdated.ByUser>(initRequest, errorFactory)
|
||||
|
||||
|
||||
suspend fun BehaviourContext.waitChatMessageReactionUpdatedByChat(
|
||||
fun BehaviourContext.waitChatMessageReactionUpdatedByChat(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChatMessageReactionUpdated<ChatMessageReactionUpdated.ByChat>(initRequest, errorFactory)
|
||||
|
||||
@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend inline fun BehaviourContext.waitChatMessageReactionsCountUpdated(
|
||||
inline fun BehaviourContext.waitChatMessageReactionsCountUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ChatMessageReactionsCountUpdated> = expectFlow(
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
typealias ChosenInlineResultMapper<T> = suspend T.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O> BehaviourContext.waitChosenInlineResults(
|
||||
inline fun <reified O> BehaviourContext.waitChosenInlineResults(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -21,17 +21,17 @@ suspend inline fun <reified O> BehaviourContext.waitChosenInlineResults(
|
||||
(it.chosenInlineResultUpdateOrNull() ?.data as? O).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitChosenInlineResult(
|
||||
fun BehaviourContext.waitChosenInlineResult(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChosenInlineResults<ChosenInlineResult>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitLocationChosenInlineResult(
|
||||
fun BehaviourContext.waitLocationChosenInlineResult(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChosenInlineResults<LocationChosenInlineResult>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitBaseChosenInlineResult(
|
||||
fun BehaviourContext.waitBaseChosenInlineResult(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitChosenInlineResults<BaseChosenInlineResult>(initRequest, errorFactory)
|
||||
|
||||
@@ -22,7 +22,7 @@ import kotlinx.coroutines.flow.*
|
||||
* * In case you wish to exclude messages with more than one command, you may use [requireSingleCommand]
|
||||
* * In case you wish to exclude messages with commands params, you may use [requireCommandsWithoutParams]
|
||||
*/
|
||||
suspend fun BehaviourContext.waitCommandMessage(
|
||||
fun BehaviourContext.waitCommandMessage(
|
||||
commandRegex: Regex,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
@@ -38,13 +38,13 @@ suspend fun BehaviourContext.waitCommandMessage(
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitCommandMessage(
|
||||
fun BehaviourContext.waitCommandMessage(
|
||||
command: String,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitCommandMessage(Regex(command), initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitCommandMessage(
|
||||
fun BehaviourContext.waitCommandMessage(
|
||||
botCommand: BotCommand,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
|
||||
@@ -16,146 +16,146 @@ import kotlinx.coroutines.flow.mapNotNull
|
||||
typealias CommonMessageToContentMapper<T> = suspend CommonMessage<T>.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun BehaviourContext.waitContent(
|
||||
fun BehaviourContext.waitContent(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<MessageContent> = waitContentMessage(initRequest, errorFactory).map { it.content }
|
||||
|
||||
inline fun <reified T : MessageContent> Flow<MessageContent>.mapContent() = mapNotNull { it as? T }
|
||||
|
||||
suspend fun BehaviourContext.waitAnyContent(
|
||||
fun BehaviourContext.waitAnyContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitTextedContent(
|
||||
fun BehaviourContext.waitTextedContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<TextedContent>()
|
||||
suspend fun BehaviourContext.waitContact(
|
||||
fun BehaviourContext.waitContact(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<ContactContent>()
|
||||
suspend fun BehaviourContext.waitDice(
|
||||
fun BehaviourContext.waitDice(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<DiceContent>()
|
||||
suspend fun BehaviourContext.waitGame(
|
||||
fun BehaviourContext.waitGame(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<GameContent>()
|
||||
suspend fun BehaviourContext.waitLocation(
|
||||
fun BehaviourContext.waitLocation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<LocationContent>()
|
||||
suspend fun BehaviourContext.waitLiveLocation(
|
||||
fun BehaviourContext.waitLiveLocation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<LiveLocationContent>()
|
||||
suspend fun BehaviourContext.waitStaticLocation(
|
||||
fun BehaviourContext.waitStaticLocation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<StaticLocationContent>()
|
||||
suspend fun BehaviourContext.waitPoll(
|
||||
fun BehaviourContext.waitPoll(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<PollContent>()
|
||||
suspend fun BehaviourContext.waitText(
|
||||
fun BehaviourContext.waitText(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<TextContent>()
|
||||
suspend fun BehaviourContext.waitStory(
|
||||
fun BehaviourContext.waitStory(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<StoryContent>()
|
||||
suspend fun BehaviourContext.waitVenue(
|
||||
fun BehaviourContext.waitVenue(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<VenueContent>()
|
||||
suspend fun BehaviourContext.waitAudioMediaGroupContent(
|
||||
fun BehaviourContext.waitAudioMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<AudioMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitDocumentMediaGroupContent(
|
||||
fun BehaviourContext.waitDocumentMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<DocumentMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitMedia(
|
||||
fun BehaviourContext.waitMedia(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<MediaContent>()
|
||||
suspend fun BehaviourContext.waitAnyMediaGroupContent(
|
||||
fun BehaviourContext.waitAnyMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<MediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitVisualMediaGroupContent(
|
||||
fun BehaviourContext.waitVisualMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<VisualMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitTextedMediaContent(
|
||||
fun BehaviourContext.waitTextedMediaContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<TextedMediaContent>()
|
||||
suspend fun BehaviourContext.waitAnimation(
|
||||
fun BehaviourContext.waitAnimation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<AnimationContent>()
|
||||
suspend fun BehaviourContext.waitAudio(
|
||||
fun BehaviourContext.waitAudio(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<AudioContent>()
|
||||
suspend fun BehaviourContext.waitDocument(
|
||||
fun BehaviourContext.waitDocument(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<DocumentContent>()
|
||||
suspend fun BehaviourContext.waitPhoto(
|
||||
fun BehaviourContext.waitPhoto(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContent(initRequest, errorFactory).mapContent<PhotoContent>()
|
||||
suspend fun BehaviourContext.waitSticker(
|
||||
fun BehaviourContext.waitSticker(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<StickerContent>()
|
||||
suspend fun BehaviourContext.waitVideo(
|
||||
fun BehaviourContext.waitVideo(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<VideoContent>()
|
||||
suspend fun BehaviourContext.waitVideoNote(
|
||||
fun BehaviourContext.waitVideoNote(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<VideoNoteContent>()
|
||||
suspend fun BehaviourContext.waitVoice(
|
||||
fun BehaviourContext.waitVoice(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<VoiceContent>()
|
||||
suspend fun BehaviourContext.waitInvoice(
|
||||
fun BehaviourContext.waitInvoice(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<InvoiceContent>()
|
||||
suspend fun BehaviourContext.waitVisualContent(
|
||||
fun BehaviourContext.waitVisualContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<VisualMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitMediaContent(
|
||||
fun BehaviourContext.waitMediaContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<MediaContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayContent(
|
||||
fun BehaviourContext.waitGiveawayContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<GiveawayContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayPublicResultsContent(
|
||||
fun BehaviourContext.waitGiveawayPublicResultsContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<GiveawayPublicResultsContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayWinners(
|
||||
fun BehaviourContext.waitGiveawayWinners(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitGiveawayPublicResultsContent(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMediaInfoContent(
|
||||
fun BehaviourContext.waitPaidMediaInfoContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContent(initRequest, errorFactory).mapContent<PaidMediaInfoContent>()
|
||||
|
||||
@@ -16,9 +16,9 @@ import kotlinx.coroutines.flow.mapNotNull
|
||||
typealias CommonMessageToCommonMessageMapper<T> = suspend CommonMessage<T>.() -> CommonMessage<T>?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun BehaviourContext.waitContentMessage(
|
||||
fun BehaviourContext.waitContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<CommonMessage<MessageContent>> = expectFlow(
|
||||
initRequest,
|
||||
errorFactory
|
||||
@@ -31,141 +31,141 @@ suspend inline fun BehaviourContext.waitContentMessage(
|
||||
|
||||
inline fun <reified T : MessageContent> Flow<CommonMessage<MessageContent>>.mapWithContent() = mapNotNull { it.withContentOrNull<T>() }
|
||||
|
||||
suspend fun BehaviourContext.waitAnyContentMessage(
|
||||
fun BehaviourContext.waitAnyContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContentMessage(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitTextedContentMessage(
|
||||
fun BehaviourContext.waitTextedContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<TextedContent>()
|
||||
suspend fun BehaviourContext.waitContactMessage(
|
||||
fun BehaviourContext.waitContactMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<ContactContent>()
|
||||
suspend fun BehaviourContext.waitDiceMessage(
|
||||
fun BehaviourContext.waitDiceMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<DiceContent>()
|
||||
suspend fun BehaviourContext.waitGameMessage(
|
||||
fun BehaviourContext.waitGameMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<GameContent>()
|
||||
suspend fun BehaviourContext.waitLocationMessage(
|
||||
fun BehaviourContext.waitLocationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<LocationContent>()
|
||||
suspend fun BehaviourContext.waitLiveLocationMessage(
|
||||
fun BehaviourContext.waitLiveLocationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<LiveLocationContent>()
|
||||
suspend fun BehaviourContext.waitStaticLocationMessage(
|
||||
fun BehaviourContext.waitStaticLocationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<StaticLocationContent>()
|
||||
suspend fun BehaviourContext.waitPollMessage(
|
||||
fun BehaviourContext.waitPollMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<PollContent>()
|
||||
suspend fun BehaviourContext.waitTextMessage(
|
||||
fun BehaviourContext.waitTextMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<TextContent>()
|
||||
suspend fun BehaviourContext.waitStoryMessage(
|
||||
fun BehaviourContext.waitStoryMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<StoryContent>()
|
||||
suspend fun BehaviourContext.waitVenueMessage(
|
||||
fun BehaviourContext.waitVenueMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VenueContent>()
|
||||
suspend fun BehaviourContext.waitAudioMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitAudioMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<AudioMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitDocumentMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitDocumentMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<DocumentMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitMediaMessage(
|
||||
fun BehaviourContext.waitMediaMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<MediaContent>()
|
||||
suspend fun BehaviourContext.waitAnyMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitAnyMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<MediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitVisualMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitVisualMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VisualMediaGroupPartContent>()
|
||||
suspend fun BehaviourContext.waitTextedMediaContentMessage(
|
||||
fun BehaviourContext.waitTextedMediaContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<TextedMediaContent>()
|
||||
suspend fun BehaviourContext.waitAnimationMessage(
|
||||
fun BehaviourContext.waitAnimationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<AnimationContent>()
|
||||
suspend fun BehaviourContext.waitAudioMessage(
|
||||
fun BehaviourContext.waitAudioMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<AudioContent>()
|
||||
suspend fun BehaviourContext.waitDocumentMessage(
|
||||
fun BehaviourContext.waitDocumentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<DocumentContent>()
|
||||
suspend fun BehaviourContext.waitPhotoMessage(
|
||||
fun BehaviourContext.waitPhotoMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<PhotoContent>()
|
||||
suspend fun BehaviourContext.waitStickerMessage(
|
||||
fun BehaviourContext.waitStickerMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<StickerContent>()
|
||||
suspend fun BehaviourContext.waitVideoMessage(
|
||||
fun BehaviourContext.waitVideoMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VideoContent>()
|
||||
suspend fun BehaviourContext.waitVideoNoteMessage(
|
||||
fun BehaviourContext.waitVideoNoteMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VideoNoteContent>()
|
||||
suspend fun BehaviourContext.waitVoiceMessage(
|
||||
fun BehaviourContext.waitVoiceMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VoiceContent>()
|
||||
suspend fun BehaviourContext.waitInvoiceMessage(
|
||||
fun BehaviourContext.waitInvoiceMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<InvoiceContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitVisualContentMessage(
|
||||
fun BehaviourContext.waitVisualContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VisualMediaGroupPartContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitMediaContentMessage(
|
||||
fun BehaviourContext.waitMediaContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<MediaContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayContentMessage(
|
||||
fun BehaviourContext.waitGiveawayContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<GiveawayContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayPublicResultsContentMessage(
|
||||
fun BehaviourContext.waitGiveawayPublicResultsContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<GiveawayPublicResultsContent>()
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayWinnersMessage(
|
||||
fun BehaviourContext.waitGiveawayWinnersMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitGiveawayPublicResultsContentMessage(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMediaInfoContentMessage(
|
||||
fun BehaviourContext.waitPaidMediaInfoContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitContentMessage(initRequest, errorFactory).mapWithContent<PaidMediaInfoContent>()
|
||||
|
||||
@@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||
import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
|
||||
import kotlinx.coroutines.flow.*
|
||||
|
||||
suspend fun BehaviourContext.waitDeepLinks(
|
||||
fun BehaviourContext.waitDeepLinks(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
): Flow<Pair<CommonMessage<TextContent>, String>> = waitCommandMessage(
|
||||
@@ -22,7 +22,7 @@ suspend fun BehaviourContext.waitDeepLinks(
|
||||
it.first to (it.second.second.singleOrNull() ?.regularTextSourceOrNull() ?.source ?.removePrefix(" ") ?: return@mapNotNull null)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitDeepLinks(
|
||||
fun BehaviourContext.waitDeepLinks(
|
||||
regex: Regex,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
@@ -30,7 +30,7 @@ suspend fun BehaviourContext.waitDeepLinks(
|
||||
regex.matches(it.second)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitDeepLinks(
|
||||
fun BehaviourContext.waitDeepLinks(
|
||||
deepLink: String,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
|
||||
@@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessMessagesDeleted
|
||||
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend fun BehaviourContext.waitDeletedBusinessMessages(
|
||||
fun BehaviourContext.waitDeletedBusinessMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<BusinessMessagesDeleted> = expectFlow(
|
||||
|
||||
@@ -11,120 +11,125 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : MessageContent> BehaviourContext.waitEditedContent(
|
||||
inline fun <reified O : MessageContent> BehaviourContext.waitEditedContent(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = waitEditedContentMessage<O>(initRequest, errorFactory).map { it.content }
|
||||
|
||||
suspend fun BehaviourContext.waitEditedMessageContent(
|
||||
fun BehaviourContext.waitEditedMessageContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<MessageContent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitEditedContentMessage(
|
||||
fun BehaviourContext.waitEditedContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<MessageContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedContact(
|
||||
fun BehaviourContext.waitEditedContact(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<ContactContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedDice(
|
||||
fun BehaviourContext.waitEditedDice(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<DiceContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedGame(
|
||||
fun BehaviourContext.waitEditedGame(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<GameContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedLocation(
|
||||
fun BehaviourContext.waitEditedLocation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<LocationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedLiveLocation(
|
||||
fun BehaviourContext.waitEditedLiveLocation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<LiveLocationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedStaticLocation(
|
||||
fun BehaviourContext.waitEditedStaticLocation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<StaticLocationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedText(
|
||||
fun BehaviourContext.waitEditedText(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<TextContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVenue(
|
||||
fun BehaviourContext.waitEditedVenue(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<VenueContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAudioMediaGroupContent(
|
||||
fun BehaviourContext.waitEditedAudioMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<AudioMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedDocumentMediaGroupContent(
|
||||
fun BehaviourContext.waitEditedDocumentMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<DocumentMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedMedia(
|
||||
fun BehaviourContext.waitEditedMedia(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<MediaContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAnyMediaGroupContent(
|
||||
fun BehaviourContext.waitEditedAnyMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<MediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVisualMediaGroupContent(
|
||||
fun BehaviourContext.waitEditedVisualMediaGroupContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<VisualMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedTextedMediaContent(
|
||||
fun BehaviourContext.waitEditedTextedMediaContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<TextedMediaContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAnimation(
|
||||
fun BehaviourContext.waitEditedAnimation(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<AnimationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAudio(
|
||||
fun BehaviourContext.waitEditedAudio(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<AudioContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedDocument(
|
||||
fun BehaviourContext.waitEditedDocument(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<DocumentContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedPhoto(
|
||||
fun BehaviourContext.waitEditedPhoto(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<PhotoContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedSticker(
|
||||
fun BehaviourContext.waitEditedSticker(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<StickerContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVideo(
|
||||
fun BehaviourContext.waitEditedVideo(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContent<VideoContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVideoNote(
|
||||
fun BehaviourContext.waitEditedVideoNote(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<VideoNoteContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVoice(
|
||||
fun BehaviourContext.waitEditedVoice(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<VoiceContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedInvoice(
|
||||
fun BehaviourContext.waitEditedInvoice(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<InvoiceContent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitEditedGiveawayContent(
|
||||
fun BehaviourContext.waitEditedGiveawayContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<GiveawayContent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitEditedGiveawayPublicResultsContent(
|
||||
fun BehaviourContext.waitEditedGiveawayPublicResultsContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<GiveawayPublicResultsContent>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitEditedChecklistContent(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContent<ChecklistContent>(initRequest, errorFactory)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : MessageContent> BehaviourContext.waitEditedContentMessage(
|
||||
inline fun <reified O : MessageContent> BehaviourContext.waitEditedContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<CommonMessage<O>> = expectFlow(
|
||||
@@ -33,111 +33,117 @@ suspend inline fun <reified O : MessageContent> BehaviourContext.waitEditedConte
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitEditedMessageContentMessage(
|
||||
fun BehaviourContext.waitEditedMessageContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<MessageContent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitEditedContactMessage(
|
||||
fun BehaviourContext.waitEditedContactMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<ContactContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedDiceMessage(
|
||||
fun BehaviourContext.waitEditedDiceMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<DiceContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedGameMessage(
|
||||
fun BehaviourContext.waitEditedGameMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<GameContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedLocationMessage(
|
||||
fun BehaviourContext.waitEditedLocationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<LocationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedLiveLocationMessage(
|
||||
fun BehaviourContext.waitEditedLiveLocationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<LiveLocationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedStaticLocationMessage(
|
||||
fun BehaviourContext.waitEditedStaticLocationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<StaticLocationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedTextMessage(
|
||||
fun BehaviourContext.waitEditedTextMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<TextContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVenueMessage(
|
||||
fun BehaviourContext.waitEditedVenueMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<VenueContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAudioMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitEditedAudioMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<AudioMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedDocumentMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitEditedDocumentMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<DocumentMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedMediaMessage(
|
||||
fun BehaviourContext.waitEditedMediaMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContentMessage<MediaContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAnyMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitEditedAnyMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<MediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVisualMediaGroupContentMessage(
|
||||
fun BehaviourContext.waitEditedVisualMediaGroupContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<VisualMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedTextedMediaContentMessage(
|
||||
fun BehaviourContext.waitEditedTextedMediaContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<TextedMediaContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAnimationMessage(
|
||||
fun BehaviourContext.waitEditedAnimationMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<AnimationContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedAudioMessage(
|
||||
fun BehaviourContext.waitEditedAudioMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContentMessage<AudioContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedDocumentMessage(
|
||||
fun BehaviourContext.waitEditedDocumentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContentMessage<DocumentContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedPhotoMessage(
|
||||
fun BehaviourContext.waitEditedPhotoMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContentMessage<PhotoContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedStickerMessage(
|
||||
fun BehaviourContext.waitEditedStickerMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<StickerContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVideoMessage(
|
||||
fun BehaviourContext.waitEditedVideoMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null },
|
||||
) = waitEditedContentMessage<VideoContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVideoNoteMessage(
|
||||
fun BehaviourContext.waitEditedVideoNoteMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<VideoNoteContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedVoiceMessage(
|
||||
fun BehaviourContext.waitEditedVoiceMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<VoiceContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitEditedInvoiceMessage(
|
||||
fun BehaviourContext.waitEditedInvoiceMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<InvoiceContent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitEditedGiveawayContentMessage(
|
||||
fun BehaviourContext.waitEditedGiveawayContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<GiveawayContent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitEditedGiveawayPublicResultsContentMessage(
|
||||
fun BehaviourContext.waitEditedGiveawayPublicResultsContentMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<GiveawayPublicResultsContent>(initRequest, errorFactory)
|
||||
|
||||
|
||||
fun BehaviourContext.waitEditedChecklistMessage(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEditedContentMessage<ChecklistContent>(initRequest, errorFactory)
|
||||
|
||||
|
||||
@@ -5,8 +5,11 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
import dev.inmo.tgbotapi.extensions.utils.*
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
||||
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
|
||||
@@ -34,7 +37,7 @@ import kotlinx.coroutines.flow.filter
|
||||
typealias EventMessageToEventMapper<T> = suspend ChatEventMessage<T>.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : ChatEvent> BehaviourContext.waitEvents(
|
||||
inline fun <reified O : ChatEvent> BehaviourContext.waitEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -44,223 +47,238 @@ suspend inline fun <reified O : ChatEvent> BehaviourContext.waitEvents(
|
||||
it.baseSentMessageUpdateOrNull() ?.data ?.chatEventMessageOrNull() ?.withEvent<O>() ?.chatEvent.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitChannelEvents(
|
||||
fun BehaviourContext.waitChannelEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChannelEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitPrivateEvents(
|
||||
fun BehaviourContext.waitPrivateEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<PrivateEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatEvents(
|
||||
fun BehaviourContext.waitChatEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChatEvent>(initRequest, errorFactory)
|
||||
|
||||
|
||||
suspend fun BehaviourContext.waitVideoChatEvents(
|
||||
fun BehaviourContext.waitVideoChatEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoChatStartedEvents(
|
||||
fun BehaviourContext.waitVideoChatStartedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatStarted>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoChatEndedEvents(
|
||||
fun BehaviourContext.waitVideoChatEndedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatEnded>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoChatParticipantsInvitedEvents(
|
||||
fun BehaviourContext.waitVideoChatParticipantsInvitedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<VideoChatParticipantsInvited>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitMessageAutoDeleteTimerChangedEvents(
|
||||
fun BehaviourContext.waitMessageAutoDeleteTimerChangedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<MessageAutoDeleteTimerChanged>(initRequest, errorFactory)
|
||||
|
||||
|
||||
suspend fun BehaviourContext.waitPublicChatEvents(
|
||||
fun BehaviourContext.waitPublicChatEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<PublicChatEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitCommonEvents(
|
||||
fun BehaviourContext.waitCommonEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<CommonEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitGroupEvents(
|
||||
fun BehaviourContext.waitGroupEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GroupEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitSupergroupEvents(
|
||||
fun BehaviourContext.waitSupergroupEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<SupergroupEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChannelChatCreatedEvents(
|
||||
fun BehaviourContext.waitChannelChatCreatedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChannelChatCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitDeleteChatPhotoEvents(
|
||||
fun BehaviourContext.waitDeleteChatPhotoEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<DeleteChatPhoto>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGroupChatCreatedEvents(
|
||||
fun BehaviourContext.waitGroupChatCreatedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GroupChatCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitLeftChatMemberEvents(
|
||||
fun BehaviourContext.waitLeftChatMemberEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<LeftChatMemberEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitNewChatPhotoEvents(
|
||||
fun BehaviourContext.waitNewChatPhotoEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<NewChatPhoto>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitNewChatMembersEvents(
|
||||
fun BehaviourContext.waitNewChatMembersEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<NewChatMembers>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitNewChatTitleEvents(
|
||||
fun BehaviourContext.waitNewChatTitleEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<NewChatTitle>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitPinnedMessageEvents(
|
||||
fun BehaviourContext.waitPinnedMessageEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<PinnedMessage>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitProximityAlertTriggeredEvents(
|
||||
fun BehaviourContext.waitProximityAlertTriggeredEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ProximityAlertTriggered>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitSupergroupChatCreatedEvents(
|
||||
fun BehaviourContext.waitSupergroupChatCreatedEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<SupergroupChatCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitSuccessfulPaymentEvents(
|
||||
fun BehaviourContext.waitSuccessfulPaymentEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<SuccessfulPaymentEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitRefundedPaymentEvents(
|
||||
fun BehaviourContext.waitRefundedPaymentEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<RefundedPaymentEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitUserLoggedInEvents(
|
||||
fun BehaviourContext.waitUserLoggedInEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<UserLoggedIn>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWebAppDataEvents(
|
||||
fun BehaviourContext.waitWebAppDataEvents(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<WebAppData>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicClosed(
|
||||
fun BehaviourContext.waitForumTopicClosed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ForumTopicClosed>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicCreated(
|
||||
fun BehaviourContext.waitForumTopicCreated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ForumTopicCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicReopened(
|
||||
fun BehaviourContext.waitForumTopicReopened(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ForumTopicReopened>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicEdited(
|
||||
fun BehaviourContext.waitForumTopicEdited(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ForumTopicEdited>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGeneralForumTopicHidden(
|
||||
fun BehaviourContext.waitGeneralForumTopicHidden(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GeneralForumTopicHidden>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGeneralForumTopicUnhidden(
|
||||
fun BehaviourContext.waitGeneralForumTopicUnhidden(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GeneralForumTopicUnhidden>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowed(
|
||||
fun BehaviourContext.waitWriteAccessAllowed(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<WriteAccessAllowed>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedFromRequest(
|
||||
fun BehaviourContext.waitWriteAccessAllowedFromRequest(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<WriteAccessAllowed.FromRequest>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedFromAttachmentMenu(
|
||||
fun BehaviourContext.waitWriteAccessAllowedFromAttachmentMenu(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<WriteAccessAllowed.FromAttachmentMenu>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedFromWebAppLink(
|
||||
fun BehaviourContext.waitWriteAccessAllowedFromWebAppLink(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<WriteAccessAllowed.FromWebAppLink>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedOther(
|
||||
fun BehaviourContext.waitWriteAccessAllowedOther(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<WriteAccessAllowed.Other>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatSharedRequest(
|
||||
fun BehaviourContext.waitChatSharedRequest(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChatSharedRequest>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitUsersShared(
|
||||
fun BehaviourContext.waitUsersShared(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<UsersShared>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitUserShared(
|
||||
fun BehaviourContext.waitUserShared(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitUsersShared(initRequest, errorFactory).filter { it.userIds.size == 1 }
|
||||
|
||||
suspend fun BehaviourContext.waitChatShared(
|
||||
fun BehaviourContext.waitChatShared(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChatShared>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatBoostAdded(
|
||||
fun BehaviourContext.waitChatBoostAdded(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChatBoostAdded>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatBackgroundSet(
|
||||
fun BehaviourContext.waitChatBackgroundSet(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChatBackground>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayCreated(
|
||||
fun BehaviourContext.waitGiveawayCreated(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GiveawayCreated>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayCompleted(
|
||||
fun BehaviourContext.waitGiveawayCompleted(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GiveawayPrivateResults>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitGiveawayCompletedWithPrivateWinners(
|
||||
fun BehaviourContext.waitGiveawayCompletedWithPrivateWinners(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitGiveawayCompleted(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMessagePriceChanged(
|
||||
fun BehaviourContext.waitPaidMessagePriceChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<PaidMessagePriceChanged>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitRegularGiftSentOrReceived(
|
||||
fun BehaviourContext.waitRegularGiftSentOrReceived(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GiftSentOrReceived.Regular>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitUniqueGiftSentOrReceived(
|
||||
fun BehaviourContext.waitUniqueGiftSentOrReceived(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GiftSentOrReceived.Unique>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitChecklistTasksDone(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChecklistTasksDone>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitChecklistTasksAdded(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChecklistTasksAdded>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitChannelDirectMessagesConfigurationChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<ChannelDirectMessagesConfigurationChanged>(initRequest, errorFactory)
|
||||
|
||||
@@ -30,7 +30,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.filter
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : ChatEvent> BehaviourContext.waitEventsMessages(
|
||||
inline fun <reified O : ChatEvent> BehaviourContext.waitEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ChatEventMessage<O>> = expectFlow(
|
||||
@@ -40,204 +40,204 @@ suspend inline fun <reified O : ChatEvent> BehaviourContext.waitEventsMessages(
|
||||
it.baseSentMessageUpdateOrNull() ?.data ?.chatEventMessageOrNull() ?.withEvent<O>().let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitChannelEventsMessages(
|
||||
fun BehaviourContext.waitChannelEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChannelEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitPrivateEventsMessages(
|
||||
fun BehaviourContext.waitPrivateEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<PrivateEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatEventsMessages(
|
||||
fun BehaviourContext.waitChatEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChatEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitVideoChatEventsMessages(
|
||||
fun BehaviourContext.waitVideoChatEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoChatStartedEventsMessages(
|
||||
fun BehaviourContext.waitVideoChatStartedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatStarted>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoChatEndedEventsMessages(
|
||||
fun BehaviourContext.waitVideoChatEndedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatEnded>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoChatParticipantsInvitedEventsMessages(
|
||||
fun BehaviourContext.waitVideoChatParticipantsInvitedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<VideoChatParticipantsInvited>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitMessageAutoDeleteTimerChangedEventsMessages(
|
||||
fun BehaviourContext.waitMessageAutoDeleteTimerChangedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<MessageAutoDeleteTimerChanged>(initRequest, errorFactory)
|
||||
|
||||
|
||||
suspend fun BehaviourContext.waitPublicChatEventsMessages(
|
||||
fun BehaviourContext.waitPublicChatEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<PublicChatEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitCommonEventsMessages(
|
||||
fun BehaviourContext.waitCommonEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<CommonEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitGroupEventsMessages(
|
||||
fun BehaviourContext.waitGroupEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GroupEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitSupergroupEventsMessages(
|
||||
fun BehaviourContext.waitSupergroupEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<SupergroupEvent>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChannelChatCreatedEventsMessages(
|
||||
fun BehaviourContext.waitChannelChatCreatedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChannelChatCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitDeleteChatPhotoEventsMessages(
|
||||
fun BehaviourContext.waitDeleteChatPhotoEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<DeleteChatPhoto>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGroupChatCreatedEventsMessages(
|
||||
fun BehaviourContext.waitGroupChatCreatedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GroupChatCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitLeftChatMemberEventsMessages(
|
||||
fun BehaviourContext.waitLeftChatMemberEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<LeftChatMemberEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitNewChatPhotoEventsMessages(
|
||||
fun BehaviourContext.waitNewChatPhotoEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<NewChatPhoto>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitNewChatMembersEventsMessages(
|
||||
fun BehaviourContext.waitNewChatMembersEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<NewChatMembers>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitNewChatTitleEventsMessages(
|
||||
fun BehaviourContext.waitNewChatTitleEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<NewChatTitle>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitPinnedMessageEventsMessages(
|
||||
fun BehaviourContext.waitPinnedMessageEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<PinnedMessage>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitProximityAlertTriggeredEventsMessages(
|
||||
fun BehaviourContext.waitProximityAlertTriggeredEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ProximityAlertTriggered>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitSupergroupChatCreatedEventsMessages(
|
||||
fun BehaviourContext.waitSupergroupChatCreatedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<SupergroupChatCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitSuccessfulPaymentEventsMessages(
|
||||
fun BehaviourContext.waitSuccessfulPaymentEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<SuccessfulPaymentEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitRefundedPaymentEventsMessages(
|
||||
fun BehaviourContext.waitRefundedPaymentEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<RefundedPaymentEvent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitUserLoggedInEventsMessages(
|
||||
fun BehaviourContext.waitUserLoggedInEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<UserLoggedIn>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWebAppDataEventsMessages(
|
||||
fun BehaviourContext.waitWebAppDataEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<WebAppData>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicClosedEventsMessages(
|
||||
fun BehaviourContext.waitForumTopicClosedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ForumTopicClosed>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicCreatedEventsMessages(
|
||||
fun BehaviourContext.waitForumTopicCreatedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ForumTopicCreated>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicReopenedEventsMessages(
|
||||
fun BehaviourContext.waitForumTopicReopenedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ForumTopicReopened>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitForumTopicEditedEventsMessages(
|
||||
fun BehaviourContext.waitForumTopicEditedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ForumTopicEdited>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGeneralForumTopicHiddenEventsMessages(
|
||||
fun BehaviourContext.waitGeneralForumTopicHiddenEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GeneralForumTopicHidden>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitGeneralForumTopicUnhiddenEventsMessages(
|
||||
fun BehaviourContext.waitGeneralForumTopicUnhiddenEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GeneralForumTopicUnhidden>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedEventsMessages(
|
||||
fun BehaviourContext.waitWriteAccessAllowedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<WriteAccessAllowed>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedFromRequestEventsMessages(
|
||||
fun BehaviourContext.waitWriteAccessAllowedFromRequestEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<WriteAccessAllowed.FromRequest>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedFromAttachmentMenuEventsMessages(
|
||||
fun BehaviourContext.waitWriteAccessAllowedFromAttachmentMenuEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<WriteAccessAllowed.FromAttachmentMenu>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedFromWebAppLinkEventsMessages(
|
||||
fun BehaviourContext.waitWriteAccessAllowedFromWebAppLinkEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<WriteAccessAllowed.FromWebAppLink>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitWriteAccessAllowedOtherEventsMessages(
|
||||
fun BehaviourContext.waitWriteAccessAllowedOtherEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<WriteAccessAllowed.Other>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatSharedRequestEventsMessages(
|
||||
fun BehaviourContext.waitChatSharedRequestEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChatSharedRequest>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitUsersSharedEventsMessages(
|
||||
fun BehaviourContext.waitUsersSharedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<UsersShared>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitUserSharedEventsMessages(
|
||||
fun BehaviourContext.waitUserSharedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitUsersSharedEventsMessages(initRequest, errorFactory).filter { it.chatEvent.userIds.size == 1 }
|
||||
|
||||
suspend fun BehaviourContext.waitChatSharedEventsMessages(
|
||||
fun BehaviourContext.waitChatSharedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChatShared>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatBoostAddedEventsMessages(
|
||||
fun BehaviourContext.waitChatBoostAddedEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChatBoostAdded>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitChatBackgroundSetEventsMessages(
|
||||
fun BehaviourContext.waitChatBackgroundSetEventsMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<ChatBackground>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMessagePriceChangedMessages(
|
||||
fun BehaviourContext.waitPaidMessagePriceChangedMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<PaidMessagePriceChanged>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitRegularGiftSentOrReceivedMessages(
|
||||
fun BehaviourContext.waitRegularGiftSentOrReceivedMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GiftSentOrReceived.Regular>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitUniqueGiftSentOrReceivedMessages(
|
||||
fun BehaviourContext.waitUniqueGiftSentOrReceivedMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GiftSentOrReceived.Unique>(initRequest, errorFactory)
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
typealias InlineQueryMapper<T> = suspend T.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : InlineQuery> BehaviourContext.waitInlineQueries(
|
||||
inline fun <reified O : InlineQuery> BehaviourContext.waitInlineQueries(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -21,16 +21,16 @@ suspend inline fun <reified O : InlineQuery> BehaviourContext.waitInlineQueries(
|
||||
(it.inlineQueryUpdateOrNull() ?.data as? O).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitAnyInlineQuery(
|
||||
fun BehaviourContext.waitAnyInlineQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitInlineQueries<InlineQuery>(initRequest, errorFactory)
|
||||
|
||||
suspend fun BehaviourContext.waitBaseInlineQuery(
|
||||
fun BehaviourContext.waitBaseInlineQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitInlineQueries<BaseInlineQuery>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitLocationInlineQuery(
|
||||
fun BehaviourContext.waitLocationInlineQuery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitInlineQueries<LocationInlineQuery>(initRequest, errorFactory)
|
||||
|
||||
@@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMediaGroupWaiter(
|
||||
inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMediaGroupWaiter(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<MediaGroupContent<T>> = flowsUpdatesFilter.expectFlow(bot, initRequest, errorFactory) { update ->
|
||||
@@ -25,27 +25,27 @@ suspend inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMed
|
||||
} ?: emptyList()
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitMediaGroup(
|
||||
fun BehaviourContext.waitMediaGroup(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupWaiter<MediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitPlaylist(
|
||||
fun BehaviourContext.waitPlaylist(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupWaiter<AudioMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitDocumentsGroup(
|
||||
fun BehaviourContext.waitDocumentsGroup(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupWaiter<DocumentMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVisualGallery(
|
||||
fun BehaviourContext.waitVisualGallery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupWaiter<VisualMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitPhotoGallery(
|
||||
fun BehaviourContext.waitPhotoGallery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupWaiter<PhotoContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoGallery(
|
||||
fun BehaviourContext.waitVideoGallery(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupWaiter<VideoContent>(initRequest, errorFactory)
|
||||
|
||||
@@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMediaGroupMessagesWaiter(
|
||||
inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMediaGroupMessagesWaiter(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<MediaGroupMessage<T>> = flowsUpdatesFilter.expectFlow(bot, initRequest, errorFactory) { update ->
|
||||
@@ -25,27 +25,27 @@ suspend inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMed
|
||||
} ?: emptyList()
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitMediaGroupMessages(
|
||||
fun BehaviourContext.waitMediaGroupMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupMessagesWaiter<MediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitPlaylistMessages(
|
||||
fun BehaviourContext.waitPlaylistMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupMessagesWaiter<AudioMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitDocumentsGroupMessages(
|
||||
fun BehaviourContext.waitDocumentsGroupMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupMessagesWaiter<DocumentMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVisualGalleryMessages(
|
||||
fun BehaviourContext.waitVisualGalleryMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupMessagesWaiter<VisualMediaGroupPartContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitPhotoGalleryMessages(
|
||||
fun BehaviourContext.waitPhotoGalleryMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupMessagesWaiter<PhotoContent>(initRequest, errorFactory)
|
||||
suspend fun BehaviourContext.waitVideoGalleryMessages(
|
||||
fun BehaviourContext.waitVideoGalleryMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = buildMediaGroupMessagesWaiter<VideoContent>(initRequest, errorFactory)
|
||||
|
||||
@@ -74,7 +74,7 @@ fun Flow<TextedContent>.filterMentions(user: User) = filter {
|
||||
* @see filterMentions
|
||||
* @see filterTextMentions
|
||||
*/
|
||||
suspend fun BehaviourContext.waitContentWithMentions (
|
||||
fun BehaviourContext.waitContentWithMentions (
|
||||
username: Username,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
@@ -87,7 +87,7 @@ suspend fun BehaviourContext.waitContentWithMentions (
|
||||
* @see filterMentions
|
||||
* @see dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource
|
||||
*/
|
||||
suspend fun BehaviourContext.waitContentWithTextMentions (
|
||||
fun BehaviourContext.waitContentWithTextMentions (
|
||||
userId: UserId,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
@@ -100,7 +100,7 @@ suspend fun BehaviourContext.waitContentWithTextMentions (
|
||||
* @see filterMentions
|
||||
* @see filterTextMentions
|
||||
*/
|
||||
suspend fun BehaviourContext.waitContentWithMentions (
|
||||
fun BehaviourContext.waitContentWithMentions (
|
||||
user: User,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
|
||||
@@ -49,7 +49,7 @@ fun Flow<CommonMessage<TextedContent>>.filterMentionsMessages(user: User) = filt
|
||||
* @see filterMentions
|
||||
* @see filterTextMentions
|
||||
*/
|
||||
suspend fun BehaviourContext.waitContentMessageWithMentions (
|
||||
fun BehaviourContext.waitContentMessageWithMentions (
|
||||
username: Username,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
@@ -62,7 +62,7 @@ suspend fun BehaviourContext.waitContentMessageWithMentions (
|
||||
* @see filterMentions
|
||||
* @see dev.inmo.tgbotapi.types.message.textsources.TextMentionTextSource
|
||||
*/
|
||||
suspend fun BehaviourContext.waitContentMessageWithTextMentions (
|
||||
fun BehaviourContext.waitContentMessageWithTextMentions (
|
||||
userId: UserId,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
@@ -75,7 +75,7 @@ suspend fun BehaviourContext.waitContentMessageWithTextMentions (
|
||||
* @see filterMentions
|
||||
* @see filterTextMentions
|
||||
*/
|
||||
suspend fun BehaviourContext.waitContentMessageWithMentions (
|
||||
fun BehaviourContext.waitContentMessageWithMentions (
|
||||
user: User,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
|
||||
@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||
import dev.inmo.tgbotapi.types.message.payments.PaidMediaPurchased
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMediaPurchased(
|
||||
fun BehaviourContext.waitPaidMediaPurchased(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<PaidMediaPurchased> = expectFlow(
|
||||
@@ -21,7 +21,7 @@ suspend fun BehaviourContext.waitPaidMediaPurchased(
|
||||
(it.paidMediaPurchasedUpdateOrNull() ?.data).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMediaPurchased(
|
||||
fun BehaviourContext.waitPaidMediaPurchased(
|
||||
paidMediaPayloadRegex: Regex,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
@@ -32,7 +32,7 @@ suspend fun BehaviourContext.waitPaidMediaPurchased(
|
||||
(it.paidMediaPurchasedUpdateOrNull() ?.data ?.takeIf { paidMediaPayloadRegex.matches(it.payload.string) }).let(::listOfNotNull)
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitPaidMediaPurchased(
|
||||
fun BehaviourContext.waitPaidMediaPurchased(
|
||||
paidMediaPayload: PaidMediaPayload,
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
|
||||
@@ -14,7 +14,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
typealias PassportMessageMapper = suspend PassportMessage.() -> PassportData
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : EncryptedPassportElement> BehaviourContext.waitPassportMessagesWith(
|
||||
inline fun <reified O : EncryptedPassportElement> BehaviourContext.waitPassportMessagesWith(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -24,7 +24,7 @@ suspend inline fun <reified O : EncryptedPassportElement> BehaviourContext.waitP
|
||||
it.messageUpdateOrNull() ?.data ?.passportMessageOrNull() ?.passportData ?.data ?.filterIsInstance<O>() ?: emptyList()
|
||||
}
|
||||
|
||||
suspend fun BehaviourContext.waitAnyPassportMessages(
|
||||
fun BehaviourContext.waitAnyPassportMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitPassportMessagesWith<EncryptedPassportElement>(initRequest, errorFactory)
|
||||
|
||||
@@ -8,7 +8,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
|
||||
typealias PollAnswerMapper = suspend PollAnswer.() -> PollAnswer?
|
||||
|
||||
suspend fun BehaviourContext.waitPollAnswers(
|
||||
fun BehaviourContext.waitPollAnswers(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<PollAnswer> = expectFlow(
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
typealias PollMapper<T> = suspend T.() -> T?
|
||||
|
||||
@RiskFeature(lowLevelRiskFeatureMessage)
|
||||
suspend inline fun <reified O : Poll> BehaviourContext.waitPolls(
|
||||
inline fun <reified O : Poll> BehaviourContext.waitPolls(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<O> = expectFlow(
|
||||
@@ -24,7 +24,7 @@ suspend inline fun <reified O : Poll> BehaviourContext.waitPolls(
|
||||
/**
|
||||
* This wait will be triggered only for stopped polls and polls, which are sent by the bot
|
||||
*/
|
||||
suspend fun BehaviourContext.waitPollUpdates(
|
||||
fun BehaviourContext.waitPollUpdates(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitPolls<Poll>(initRequest, errorFactory)
|
||||
@@ -32,7 +32,7 @@ suspend fun BehaviourContext.waitPollUpdates(
|
||||
/**
|
||||
* This wait will be triggered only for stopped polls and polls, which are sent by the bot
|
||||
*/
|
||||
suspend fun BehaviourContext.waitQuizPollUpdates(
|
||||
fun BehaviourContext.waitQuizPollUpdates(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitPolls<QuizPoll>(initRequest, errorFactory)
|
||||
@@ -40,7 +40,7 @@ suspend fun BehaviourContext.waitQuizPollUpdates(
|
||||
/**
|
||||
* This wait will be triggered only for stopped polls and polls, which are sent by the bot
|
||||
*/
|
||||
suspend fun BehaviourContext.waitRegularPollUpdates(
|
||||
fun BehaviourContext.waitRegularPollUpdates(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitPolls<RegularPoll>(initRequest, errorFactory)
|
||||
|
||||
@@ -8,7 +8,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
|
||||
typealias PreCheckoutQueryMapper = suspend PreCheckoutQuery.() -> PreCheckoutQuery?
|
||||
|
||||
suspend fun BehaviourContext.waitPreCheckoutQueries(
|
||||
fun BehaviourContext.waitPreCheckoutQueries(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<PreCheckoutQuery> = expectFlow(
|
||||
|
||||
@@ -8,7 +8,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
|
||||
typealias ShippingQueryMapper = suspend ShippingQuery.() -> ShippingQuery?
|
||||
|
||||
suspend fun BehaviourContext.waitShippingQueries(
|
||||
fun BehaviourContext.waitShippingQueries(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ShippingQuery> = expectFlow(
|
||||
|
||||
@@ -25,7 +25,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onBusinessConnection(
|
||||
fun <BC : BehaviourContext> BC.onBusinessConnection(
|
||||
initialFilter: SimpleFilter<BusinessConnection>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BusinessConnection, Any>? = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||
@@ -48,7 +48,7 @@ suspend fun <BC : BehaviourContext> BC.onBusinessConnection(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onBusinessConnectionEnabled(
|
||||
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,
|
||||
@@ -70,7 +70,7 @@ suspend fun <BC : BehaviourContext> BC.onBusinessConnectionEnabled(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onBusinessConnectionDisabled(
|
||||
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,
|
||||
|
||||
@@ -15,7 +15,7 @@ import dev.inmo.tgbotapi.types.queries.callback.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import kotlinx.coroutines.Job
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : CallbackQuery> BC.onCallbackQuery(
|
||||
internal inline fun <BC : BehaviourContext, reified T : CallbackQuery> BC.onCallbackQuery(
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -38,32 +38,33 @@ internal suspend inline fun <BC : BehaviourContext, reified T : CallbackQuery> B
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : DataCallbackQuery> BC.onDataCallbackQueryCounted(
|
||||
internal inline fun <BC : BehaviourContext, reified T : DataCallbackQuery> BC.onDataCallbackQueryCounted(
|
||||
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 {
|
||||
): Job = launchInNewSubContext {
|
||||
val newInitialFilter = SimpleFilter<DataCallbackQuery> {
|
||||
it is T && initialFilter ?.invoke(it) ?: true
|
||||
}::invoke
|
||||
return runCatchingSafely {
|
||||
onCallbackQuery (
|
||||
initialFilter,
|
||||
it is T && (initialFilter ?.invoke(it) ?: true)
|
||||
}
|
||||
val newInitialFilterInvoke = newInitialFilter::invoke
|
||||
runCatching {
|
||||
this@launchInNewSubContext.onCallbackQuery(
|
||||
newInitialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
}.onFailure {
|
||||
triggersHolder.handleableCallbackQueriesDataHolder.unregisterHandleable(newInitialFilter)
|
||||
this@launchInNewSubContext.triggersHolder.handleableCallbackQueriesDataHolder.unregisterHandleable(newInitialFilterInvoke)
|
||||
}.onSuccess {
|
||||
triggersHolder.handleableCallbackQueriesDataHolder.registerHandleable(newInitialFilter)
|
||||
this@launchInNewSubContext.triggersHolder.handleableCallbackQueriesDataHolder.registerHandleable(newInitialFilterInvoke)
|
||||
it.invokeOnCompletion {
|
||||
runCatching {
|
||||
launchSafelyWithoutExceptions {
|
||||
triggersHolder.handleableCallbackQueriesDataHolder.unregisterHandleable(newInitialFilter)
|
||||
this@launchInNewSubContext.triggersHolder.handleableCallbackQueriesDataHolder.unregisterHandleable(newInitialFilterInvoke)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -83,13 +84,13 @@ internal suspend inline fun <BC : BehaviourContext, reified T : DataCallbackQuer
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
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(
|
||||
): Job = onDataCallbackQueryCounted(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
@@ -112,7 +113,7 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
dataRegex: Regex,
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
@@ -143,7 +144,7 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
data: String,
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
@@ -172,7 +173,7 @@ suspend fun <BC : BehaviourContext> BC.onDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGameShortNameCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onGameShortNameCallbackQuery(
|
||||
initialFilter: SimpleFilter<GameShortNameCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GameShortNameCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in GameShortNameCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -199,7 +200,7 @@ suspend fun <BC : BehaviourContext> BC.onGameShortNameCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onInlineMessageIdCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onInlineMessageIdCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -226,7 +227,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -255,7 +256,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
dataRegex: Regex,
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
@@ -286,7 +287,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
data: String,
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
@@ -315,7 +316,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onInlineMessageIdGameShortNameCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onInlineMessageIdGameShortNameCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdGameShortNameCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdGameShortNameCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdGameShortNameCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -342,7 +343,7 @@ suspend fun <BC : BehaviourContext> BC.onInlineMessageIdGameShortNameCallbackQue
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMessageCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onMessageCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -369,7 +370,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -398,7 +399,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
dataRegex: Regex,
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
@@ -429,7 +430,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
data: String,
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
@@ -458,7 +459,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageDataCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMessageGameShortNameCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onMessageGameShortNameCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageGameShortNameCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageGameShortNameCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageGameShortNameCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -485,7 +486,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageGameShortNameCallbackQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onUnknownCallbackQueryType(
|
||||
fun <BC : BehaviourContext> BC.onUnknownCallbackQueryType(
|
||||
initialFilter: SimpleFilter<UnknownCallbackQueryType>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, UnknownCallbackQueryType, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in UnknownCallbackQueryType, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
|
||||
@@ -25,7 +25,7 @@ import dev.inmo.tgbotapi.utils.PreviewFeature
|
||||
* data
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.onUnhandledDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onUnhandledDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in DataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -53,7 +53,7 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledDataCallbackQuery(
|
||||
* data
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.onUnhandledInlineMessageIdDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onUnhandledInlineMessageIdDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineMessageIdDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineMessageIdDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
@@ -81,7 +81,7 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledInlineMessageIdDataCallbackQue
|
||||
* data
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.onUnhandledMessageDataCallbackQuery(
|
||||
fun <BC : BehaviourContext> BC.onUnhandledMessageDataCallbackQuery(
|
||||
initialFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MessageDataCallbackQuery, Update>? = CallbackQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in MessageDataCallbackQuery, Any>? = ByUserCallbackQueryMarkerFactory,
|
||||
|
||||
@@ -25,7 +25,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatBoostRemoved(
|
||||
fun <BC : BehaviourContext> BC.onChatBoostRemoved(
|
||||
initialFilter: SimpleFilter<ChatBoostRemoved>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatBoostRemoved, Update>? = null,
|
||||
markerFactory: MarkerFactory<ChatBoostRemoved, Any>? = ByIdChatBoostRemovedMarkerFactory,
|
||||
|
||||
@@ -25,7 +25,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatBoostUpdated(
|
||||
fun <BC : BehaviourContext> BC.onChatBoostUpdated(
|
||||
initialFilter: SimpleFilter<ChatBoostUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatBoostUpdated, Update>? = null,
|
||||
markerFactory: MarkerFactory<ChatBoostUpdated, Any>? = ByIdChatBoostUpdatedMarkerFactory,
|
||||
|
||||
@@ -23,7 +23,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatJoinRequest(
|
||||
fun <BC : BehaviourContext> BC.onChatJoinRequest(
|
||||
initialFilter: SimpleFilter<ChatJoinRequest>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatJoinRequest, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChatJoinRequest, Any>? = ByChatChatJoinRequestMarkerFactory,
|
||||
|
||||
@@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified U : ChatMemberUpdatedUpdate> BC.onChatMemberUpdatedInternal(
|
||||
internal inline fun <BC : BehaviourContext, reified U : ChatMemberUpdatedUpdate> BC.onChatMemberUpdatedInternal(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -37,7 +37,7 @@ internal suspend inline fun <BC : BehaviourContext, reified U : ChatMemberUpdate
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberUpdated(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberUpdated(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -64,7 +64,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberUpdated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberUpdated(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberUpdated(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -91,7 +91,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberUpdated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberUpdated(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberUpdated(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -118,7 +118,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberUpdated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberJoined(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberJoined(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -145,7 +145,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberJoined(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberLeft(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberLeft(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -172,7 +172,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberLeft(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberSubscribed(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberSubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -199,7 +199,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberSubscribed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberSubscriptionChanged(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberSubscriptionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -226,7 +226,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberSubscriptionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberUnsubscribed(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberUnsubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -253,7 +253,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberUnsubscribed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberGotPromoted(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberGotPromoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -280,7 +280,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotPromoted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberGotPromotionChanged(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberGotPromotionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -307,7 +307,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotPromotionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberGotDemoted(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberGotDemoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -334,7 +334,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotDemoted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberBecameOwner(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberBecameOwner(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -361,7 +361,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberBecameOwner(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberCeasedOwnership(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberCeasedOwnership(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -388,7 +388,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberCeasedOwnership(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberGotRestricted(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberGotRestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -415,7 +415,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotRestricted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberGotRestrictionChanged(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberGotRestrictionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -442,7 +442,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotRestrictionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberGotUnrestricted(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberGotUnrestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -469,7 +469,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberGotUnrestricted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMemberKicked(
|
||||
fun <BC : BehaviourContext> BC.onChatMemberKicked(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -496,7 +496,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMemberKicked(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberJoined(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberJoined(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -523,7 +523,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberJoined(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberLeft(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberLeft(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -550,7 +550,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberLeft(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberSubscribed(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberSubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -577,7 +577,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberSubscribed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberSubscriptionChanged(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberSubscriptionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -604,7 +604,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberSubscriptionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberUnsubscribed(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberUnsubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -631,7 +631,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberUnsubscribed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromoted(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -658,7 +658,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromoted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromotionChanged(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromotionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -685,7 +685,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotPromotionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotDemoted(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberGotDemoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -712,7 +712,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotDemoted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberBecameOwner(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberBecameOwner(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -739,7 +739,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberBecameOwner(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberCeasedOwnership(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberCeasedOwnership(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -766,7 +766,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberCeasedOwnership(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestricted(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -793,7 +793,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestricted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestrictionChanged(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestrictionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -820,7 +820,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotRestrictionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotUnrestricted(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberGotUnrestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -847,7 +847,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberGotUnrestricted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonChatMemberKicked(
|
||||
fun <BC : BehaviourContext> BC.onCommonChatMemberKicked(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -874,7 +874,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonChatMemberKicked(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberJoined(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberJoined(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -901,7 +901,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberJoined(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberLeft(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberLeft(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -928,7 +928,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberLeft(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberSubscribed(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberSubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -955,7 +955,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberSubscribed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberSubscriptionChanged(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberSubscriptionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -982,7 +982,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberSubscriptionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberUnsubscribed(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberUnsubscribed(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1009,7 +1009,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberUnsubscribed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotPromoted(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberGotPromoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1036,7 +1036,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotPromoted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotPromotionChanged(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberGotPromotionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1063,7 +1063,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotPromotionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotDemoted(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberGotDemoted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1090,7 +1090,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotDemoted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberBecameOwner(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberBecameOwner(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1117,7 +1117,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberBecameOwner(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberCeasedOwnership(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberCeasedOwnership(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1144,7 +1144,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberCeasedOwnership(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotRestricted(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberGotRestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1171,7 +1171,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotRestricted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotRestrictionChanged(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberGotRestrictionChanged(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1198,7 +1198,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotRestrictionChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotUnrestricted(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberGotUnrestricted(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
@@ -1225,7 +1225,7 @@ suspend fun <BC : BehaviourContext> BC.onMyChatMemberGotUnrestricted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMyChatMemberKicked(
|
||||
fun <BC : BehaviourContext> BC.onMyChatMemberKicked(
|
||||
initialFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMemberUpdated, Update>? = ChatMemberUpdatedFilterByChat,
|
||||
markerFactory: MarkerFactory<ChatMemberUpdated, Any>? = ByChatChatMemberUpdatedMarkerFactory,
|
||||
|
||||
@@ -29,7 +29,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMessageReactionsCountUpdated(
|
||||
fun <BC : BehaviourContext> BC.onChatMessageReactionsCountUpdated(
|
||||
initialFilter: SimpleFilter<ChatMessageReactionsCountUpdated>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatMessageReactionsCountUpdated, Update>? = null,
|
||||
markerFactory: MarkerFactory<ChatMessageReactionsCountUpdated, Any>? = ByChatIdChatMessageReactionsCountUpdatedMarkerFactory,
|
||||
|
||||
@@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated
|
||||
import dev.inmo.tgbotapi.types.polls.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : ChatMessageReactionUpdated> BC.onChatMessageReactionUpdated(
|
||||
internal inline fun <BC : BehaviourContext, reified T : ChatMessageReactionUpdated> BC.onChatMessageReactionUpdated(
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByChatIdChatMessageReactionUpdatedMarkerFactory,
|
||||
@@ -35,7 +35,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChatMessageReact
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedByUser(
|
||||
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,
|
||||
@@ -62,7 +62,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedByUser(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedByChat(
|
||||
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,
|
||||
@@ -89,7 +89,7 @@ suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedByChat(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatMessageReactionUpdatedUnknown(
|
||||
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,
|
||||
|
||||
@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.extensions.utils.chosenInlineResultUpdateOrNull
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : ChosenInlineResult> BC.onChosenInlineResultBase(
|
||||
internal inline fun <BC : BehaviourContext, reified T : ChosenInlineResult> BC.onChosenInlineResultBase(
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
@@ -33,7 +33,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChosenInlineResu
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChosenInlineResult(
|
||||
fun <BC : BehaviourContext> BC.onChosenInlineResult(
|
||||
initialFilter: SimpleFilter<ChosenInlineResult>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChosenInlineResult, Update>? = null,
|
||||
markerFactory: MarkerFactory<in ChosenInlineResult, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
@@ -60,7 +60,7 @@ suspend fun <BC : BehaviourContext> BC.onChosenInlineResult(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onLocationChosenInlineResult(
|
||||
fun <BC : BehaviourContext> BC.onLocationChosenInlineResult(
|
||||
initialFilter: SimpleFilter<LocationChosenInlineResult>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationChosenInlineResult, Update>? = null,
|
||||
markerFactory: MarkerFactory<in LocationChosenInlineResult, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
@@ -87,7 +87,7 @@ suspend fun <BC : BehaviourContext> BC.onLocationChosenInlineResult(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onBaseChosenInlineResult(
|
||||
fun <BC : BehaviourContext> BC.onBaseChosenInlineResult(
|
||||
initialFilter: SimpleFilter<BaseChosenInlineResult>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BaseChosenInlineResult, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BaseChosenInlineResult, Any>? = ByUserIdChosenInlineResultMarkerFactory,
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
|
||||
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.micro_utils.coroutines.launchLoggingDropExceptions
|
||||
import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions
|
||||
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.*
|
||||
@@ -19,8 +21,9 @@ import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||
import dev.inmo.tgbotapi.types.message.content.TextMessage
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.job
|
||||
|
||||
internal suspend fun <BC : BehaviourContext> BC.commandUncounted(
|
||||
internal fun <BC : BehaviourContext> BC.commandUncounted(
|
||||
commandRegex: Regex,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -49,7 +52,7 @@ internal suspend fun <BC : BehaviourContext> BC.commandUncounted(
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
suspend fun <BC : BehaviourContext> BC.command(
|
||||
fun <BC : BehaviourContext> BC.command(
|
||||
commandRegex: Regex,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -57,35 +60,37 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>
|
||||
): Job = runCatchingSafely {
|
||||
commandUncounted(
|
||||
commandRegex,
|
||||
requireOnlyCommandInMessage,
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
}.onFailure {
|
||||
triggersHolder.handleableCommandsHolder.unregisterHandleable(commandRegex)
|
||||
}.onSuccess {
|
||||
triggersHolder.handleableCommandsHolder.registerHandleable(commandRegex)
|
||||
it.invokeOnCompletion {
|
||||
runCatching {
|
||||
launchSafelyWithoutExceptions {
|
||||
triggersHolder.handleableCommandsHolder.unregisterHandleable(commandRegex)
|
||||
): Job = launchInNewSubContext {
|
||||
runCatching {
|
||||
this@launchInNewSubContext.commandUncounted(
|
||||
commandRegex,
|
||||
requireOnlyCommandInMessage,
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
}.onFailure {
|
||||
triggersHolder.handleableCommandsHolder.unregisterHandleable(commandRegex)
|
||||
}.onSuccess {
|
||||
triggersHolder.handleableCommandsHolder.registerHandleable(commandRegex)
|
||||
it.invokeOnCompletion {
|
||||
runCatching {
|
||||
launchSafelyWithoutExceptions {
|
||||
triggersHolder.handleableCommandsHolder.unregisterHandleable(commandRegex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}.getOrThrow()
|
||||
}.getOrThrow()
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.command(
|
||||
fun <BC : BehaviourContext> BC.command(
|
||||
command: String,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -100,7 +105,7 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.command(
|
||||
fun <BC : BehaviourContext> BC.command(
|
||||
botCommand: BotCommand,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -115,7 +120,7 @@ suspend fun <BC : BehaviourContext> BC.command(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
fun <BC : BehaviourContext> BC.onCommand(
|
||||
commandRegex: Regex,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -130,7 +135,7 @@ suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
fun <BC : BehaviourContext> BC.onCommand(
|
||||
command: String,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -145,7 +150,7 @@ suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
fun <BC : BehaviourContext> BC.onCommand(
|
||||
botCommand: BotCommand,
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
@@ -160,7 +165,7 @@ suspend fun <BC : BehaviourContext> BC.onCommand(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
commandRegex: Regex,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -187,7 +192,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
command: String,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -209,7 +214,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
botCommand: BotCommand,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -231,7 +236,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
commandRegex: Regex,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -259,7 +264,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
command: String,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -283,7 +288,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
botCommand: BotCommand,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -307,7 +312,7 @@ suspend fun <BC : BehaviourContext> BC.commandWithNamedArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
commandRegex: Regex,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -329,7 +334,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
command: String,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -351,7 +356,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
botCommand: BotCommand,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -373,7 +378,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
commandRegex: Regex,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -397,7 +402,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
command: String,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -421,7 +426,7 @@ suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
fun <BC : BehaviourContext> BC.onCommandWithNamedArgs(
|
||||
botCommand: BotCommand,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
|
||||
@@ -22,7 +22,7 @@ import kotlinx.coroutines.Job
|
||||
* "stream"
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.unhandledCommand(
|
||||
fun <BC : BehaviourContext> BC.unhandledCommand(
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -57,7 +57,7 @@ suspend fun <BC : BehaviourContext> BC.unhandledCommand(
|
||||
* "stream"
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.onUnhandledCommand(
|
||||
fun <BC : BehaviourContext> BC.onUnhandledCommand(
|
||||
requireOnlyCommandInMessage: Boolean = true,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
@@ -72,7 +72,7 @@ suspend fun <BC : BehaviourContext> BC.onUnhandledCommand(
|
||||
* "stream"
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.unhandledCommandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.unhandledCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -96,7 +96,7 @@ suspend fun <BC : BehaviourContext> BC.unhandledCommandWithArgs(
|
||||
* "stream"
|
||||
*/
|
||||
@PreviewFeature
|
||||
suspend fun <BC : BehaviourContext> BC.onUnhandledCommandWithArgs(
|
||||
fun <BC : BehaviourContext> BC.onUnhandledCommandWithArgs(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
|
||||
@@ -20,7 +20,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
typealias CommonMessageFilter<T> = SimpleFilter<CommonMessage<T>>
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onContentMessageWithType(
|
||||
internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onContentMessageWithType(
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -49,7 +49,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MessageContent>
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onContentMessage(
|
||||
fun <BC : BehaviourContext> BC.onContentMessage(
|
||||
initialFilter: CommonMessageFilter<MessageContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MessageContent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -76,7 +76,7 @@ suspend fun <BC : BehaviourContext> BC.onContentMessage(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onContact(
|
||||
fun <BC : BehaviourContext> BC.onContact(
|
||||
initialFilter: CommonMessageFilter<ContactContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ContactMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ContactMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -103,7 +103,7 @@ suspend fun <BC : BehaviourContext> BC.onContact(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDice(
|
||||
fun <BC : BehaviourContext> BC.onDice(
|
||||
initialFilter: CommonMessageFilter<DiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -130,7 +130,7 @@ suspend fun <BC : BehaviourContext> BC.onDice(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGame(
|
||||
fun <BC : BehaviourContext> BC.onGame(
|
||||
initialFilter: CommonMessageFilter<GameContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GameMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GameMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -157,7 +157,7 @@ suspend fun <BC : BehaviourContext> BC.onGame(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onLocation(
|
||||
fun <BC : BehaviourContext> BC.onLocation(
|
||||
initialFilter: CommonMessageFilter<LocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in LocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -184,7 +184,7 @@ suspend fun <BC : BehaviourContext> BC.onLocation(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onLiveLocation(
|
||||
fun <BC : BehaviourContext> BC.onLiveLocation(
|
||||
initialFilter: CommonMessageFilter<LiveLocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LiveLocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in LiveLocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -211,7 +211,7 @@ suspend fun <BC : BehaviourContext> BC.onLiveLocation(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onStaticLocation(
|
||||
fun <BC : BehaviourContext> BC.onStaticLocation(
|
||||
initialFilter: CommonMessageFilter<StaticLocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StaticLocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StaticLocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -238,7 +238,7 @@ suspend fun <BC : BehaviourContext> BC.onStaticLocation(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPoll(
|
||||
fun <BC : BehaviourContext> BC.onPoll(
|
||||
initialFilter: CommonMessageFilter<PollContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PollMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PollMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -265,7 +265,7 @@ suspend fun <BC : BehaviourContext> BC.onPoll(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onText(
|
||||
fun <BC : BehaviourContext> BC.onText(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -292,7 +292,7 @@ suspend fun <BC : BehaviourContext> BC.onText(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onStory(
|
||||
fun <BC : BehaviourContext> BC.onStory(
|
||||
initialFilter: CommonMessageFilter<StoryContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StoryMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StoryMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -319,7 +319,7 @@ suspend fun <BC : BehaviourContext> BC.onStory(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextedContent(
|
||||
fun <BC : BehaviourContext> BC.onTextedContent(
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextedMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextedMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -346,7 +346,7 @@ suspend fun <BC : BehaviourContext> BC.onTextedContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVenue(
|
||||
fun <BC : BehaviourContext> BC.onVenue(
|
||||
initialFilter: CommonMessageFilter<VenueContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VenueMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VenueMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -373,7 +373,7 @@ suspend fun <BC : BehaviourContext> BC.onVenue(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onAudioMediaGroup(
|
||||
fun <BC : BehaviourContext> BC.onAudioMediaGroup(
|
||||
initialFilter: CommonMessageFilter<AudioMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -400,7 +400,7 @@ suspend fun <BC : BehaviourContext> BC.onAudioMediaGroup(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDocumentMediaGroupContent(
|
||||
fun <BC : BehaviourContext> BC.onDocumentMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<DocumentMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -427,7 +427,7 @@ suspend fun <BC : BehaviourContext> BC.onDocumentMediaGroupContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextedMediaContent(
|
||||
fun <BC : BehaviourContext> BC.onTextedMediaContent(
|
||||
initialFilter: CommonMessageFilter<TextedMediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextedMediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextedMediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -454,7 +454,7 @@ suspend fun <BC : BehaviourContext> BC.onTextedMediaContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMediaCollection(
|
||||
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,
|
||||
@@ -481,7 +481,7 @@ suspend fun <BC : BehaviourContext> BC.onMediaCollection(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMedia(
|
||||
fun <BC : BehaviourContext> BC.onMedia(
|
||||
initialFilter: CommonMessageFilter<MediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -508,7 +508,7 @@ suspend fun <BC : BehaviourContext> BC.onMedia(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onAnimation(
|
||||
fun <BC : BehaviourContext> BC.onAnimation(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AnimationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AnimationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -535,7 +535,7 @@ suspend fun <BC : BehaviourContext> BC.onAnimation(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onAudio(
|
||||
fun <BC : BehaviourContext> BC.onAudio(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -562,7 +562,7 @@ suspend fun <BC : BehaviourContext> BC.onAudio(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDocument(
|
||||
fun <BC : BehaviourContext> BC.onDocument(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -589,7 +589,7 @@ suspend fun <BC : BehaviourContext> BC.onDocument(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPhoto(
|
||||
fun <BC : BehaviourContext> BC.onPhoto(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PhotoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PhotoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -616,7 +616,7 @@ suspend fun <BC : BehaviourContext> BC.onPhoto(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onSticker(
|
||||
fun <BC : BehaviourContext> BC.onSticker(
|
||||
initialFilter: CommonMessageFilter<StickerContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StickerMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StickerMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -643,7 +643,7 @@ suspend fun <BC : BehaviourContext> BC.onSticker(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideo(
|
||||
fun <BC : BehaviourContext> BC.onVideo(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -670,7 +670,7 @@ suspend fun <BC : BehaviourContext> BC.onVideo(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoNote(
|
||||
fun <BC : BehaviourContext> BC.onVideoNote(
|
||||
initialFilter: CommonMessageFilter<VideoNoteContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoNoteMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoNoteMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -697,7 +697,7 @@ suspend fun <BC : BehaviourContext> BC.onVideoNote(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVoice(
|
||||
fun <BC : BehaviourContext> BC.onVoice(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -724,7 +724,7 @@ suspend fun <BC : BehaviourContext> BC.onVoice(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onInvoice(
|
||||
fun <BC : BehaviourContext> BC.onInvoice(
|
||||
initialFilter: CommonMessageFilter<InvoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InvoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in InvoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -751,7 +751,7 @@ suspend fun <BC : BehaviourContext> BC.onInvoice(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVisualContent(
|
||||
fun <BC : BehaviourContext> BC.onVisualContent(
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VisualMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VisualMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -778,7 +778,7 @@ suspend fun <BC : BehaviourContext> BC.onVisualContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMediaContent(
|
||||
fun <BC : BehaviourContext> BC.onMediaContent(
|
||||
initialFilter: CommonMessageFilter<MediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -805,7 +805,7 @@ suspend fun <BC : BehaviourContext> BC.onMediaContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGiveawayContent(
|
||||
fun <BC : BehaviourContext> BC.onGiveawayContent(
|
||||
initialFilter: CommonMessageFilter<GiveawayContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ScheduledGiveawayContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ScheduledGiveawayContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -833,7 +833,7 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGiveawayPublicResultsContent(
|
||||
fun <BC : BehaviourContext> BC.onGiveawayPublicResultsContent(
|
||||
initialFilter: CommonMessageFilter<GiveawayPublicResultsContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GiveawayPublicResultsContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GiveawayPublicResultsContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -862,7 +862,7 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayPublicResultsContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGiveawayWinners(
|
||||
fun <BC : BehaviourContext> BC.onGiveawayWinners(
|
||||
initialFilter: CommonMessageFilter<GiveawayPublicResultsContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GiveawayPublicResultsContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GiveawayPublicResultsContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -886,7 +886,7 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayWinners(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPaidMediaInfoContent(
|
||||
fun <BC : BehaviourContext> BC.onPaidMediaInfoContent(
|
||||
initialFilter: CommonMessageFilter<PaidMediaInfoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaInfoContentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PaidMediaInfoContentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -899,3 +899,33 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaInfoContent(
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onChecklistContent(
|
||||
initialFilter: CommonMessageFilter<ChecklistContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChecklistMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChecklistMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChecklistMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChecklistMessage>
|
||||
) = onContentMessageWithType(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -19,30 +19,32 @@ import io.ktor.http.decodeURLQueryComponent
|
||||
import kotlinx.coroutines.Job
|
||||
|
||||
private val startRegex = Regex("start")
|
||||
suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
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,
|
||||
SimpleFilter<Pair<TextMessage, String>> { (message, _) ->
|
||||
message.content.textSources.size == 2
|
||||
&& message.content.textSources.firstOrNull() ?.asBotCommandTextSource() ?.command == "start"
|
||||
&& message.content.textSources.getOrNull(1) is RegularTextSource
|
||||
} * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver,
|
||||
) {
|
||||
(it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
|
||||
message to (message.content.textSources.getOrNull(1) ?.source ?.removePrefix(" ") ?.decodeURLQueryComponent() ?: return@let null)
|
||||
} ?.let(::listOfNotNull)
|
||||
}.also {
|
||||
triggersHolder.handleableCommandsHolder.registerHandleable(startRegex)
|
||||
it.invokeOnCompletion {
|
||||
this@onDeepLink.launchSafelyWithoutExceptions { triggersHolder.handleableCommandsHolder.unregisterHandleable(startRegex) }
|
||||
): Job = launchInNewSubContext {
|
||||
on(
|
||||
markerFactory,
|
||||
SimpleFilter<Pair<TextMessage, String>> { (message, _) ->
|
||||
message.content.textSources.size == 2
|
||||
&& message.content.textSources.firstOrNull() ?.asBotCommandTextSource() ?.command == "start"
|
||||
&& message.content.textSources.getOrNull(1) is RegularTextSource
|
||||
} * initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver,
|
||||
) {
|
||||
(it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
|
||||
message to (message.content.textSources.getOrNull(1) ?.source ?.removePrefix(" ") ?.decodeURLQueryComponent() ?: return@let null)
|
||||
} ?.let(::listOfNotNull)
|
||||
}.also {
|
||||
triggersHolder.handleableCommandsHolder.registerHandleable(startRegex)
|
||||
it.invokeOnCompletion {
|
||||
this@onDeepLink.launchSafelyWithoutExceptions { triggersHolder.handleableCommandsHolder.unregisterHandleable(startRegex) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +53,7 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
regex: Regex,
|
||||
initialFilter: SimpleFilter<Pair<TextMessage, String>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Pair<TextMessage, String>, Update>? = { (message, _), update -> MessageFilterByChat(this, message, update) },
|
||||
@@ -70,7 +72,7 @@ suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
fun <BC : BehaviourContext> BC.onDeepLink(
|
||||
deepLink: String,
|
||||
initialFilter: SimpleFilter<Pair<TextMessage, String>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Pair<TextMessage, String>, Update>? = { (message, _), update -> MessageFilterByChat(this, message, update) },
|
||||
|
||||
@@ -28,7 +28,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onBusinessMessagesDeleted(
|
||||
fun <BC : BehaviourContext> BC.onBusinessMessagesDeleted(
|
||||
initialFilter: SimpleFilter<BusinessMessagesDeleted>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessMessagesDeleted, Update>? = null,
|
||||
markerFactory: MarkerFactory<in BusinessMessagesDeleted, Any>? = ByBusinessConnectionIdBusinessMessagesDeletedMarkerFactory,
|
||||
|
||||
@@ -14,7 +14,7 @@ import dev.inmo.tgbotapi.types.message.content.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onEditedContent(
|
||||
internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onEditedContent(
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -38,7 +38,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MessageContent>
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedContentMessage(
|
||||
fun <BC : BehaviourContext> BC.onEditedContentMessage(
|
||||
initialFilter: CommonMessageFilter<MessageContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MessageContent>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CommonMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -65,7 +65,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedContentMessage(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedContact(
|
||||
fun <BC : BehaviourContext> BC.onEditedContact(
|
||||
initialFilter: CommonMessageFilter<ContactContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ContactMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ContactMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -92,7 +92,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedContact(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedDice(
|
||||
fun <BC : BehaviourContext> BC.onEditedDice(
|
||||
initialFilter: CommonMessageFilter<DiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -119,7 +119,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedDice(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedGame(
|
||||
fun <BC : BehaviourContext> BC.onEditedGame(
|
||||
initialFilter: CommonMessageFilter<GameContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, GameMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in GameMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -146,7 +146,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedGame(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedLocation(
|
||||
fun <BC : BehaviourContext> BC.onEditedLocation(
|
||||
initialFilter: CommonMessageFilter<LocationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in LocationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -173,7 +173,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedLocation(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedText(
|
||||
fun <BC : BehaviourContext> BC.onEditedText(
|
||||
initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -200,7 +200,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedText(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedVenue(
|
||||
fun <BC : BehaviourContext> BC.onEditedVenue(
|
||||
initialFilter: CommonMessageFilter<VenueContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VenueMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VenueMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -227,7 +227,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedVenue(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedAudioMediaGroup(
|
||||
fun <BC : BehaviourContext> BC.onEditedAudioMediaGroup(
|
||||
initialFilter: CommonMessageFilter<AudioMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -254,7 +254,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedAudioMediaGroup(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedDocumentMediaGroupContent(
|
||||
fun <BC : BehaviourContext> BC.onEditedDocumentMediaGroupContent(
|
||||
initialFilter: CommonMessageFilter<DocumentMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMediaGroupMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMediaGroupMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -281,7 +281,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedDocumentMediaGroupContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedTextedMediaContent(
|
||||
fun <BC : BehaviourContext> BC.onEditedTextedMediaContent(
|
||||
initialFilter: CommonMessageFilter<TextedMediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextedMediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in TextedMediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -308,7 +308,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedTextedMediaContent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedMediaCollection(
|
||||
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,
|
||||
@@ -335,7 +335,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedMediaCollection(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedMedia(
|
||||
fun <BC : BehaviourContext> BC.onEditedMedia(
|
||||
initialFilter: CommonMessageFilter<MediaContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in MediaMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -362,7 +362,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedMedia(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedAnimation(
|
||||
fun <BC : BehaviourContext> BC.onEditedAnimation(
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AnimationMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AnimationMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -389,7 +389,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedAnimation(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedAudio(
|
||||
fun <BC : BehaviourContext> BC.onEditedAudio(
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, AudioMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in AudioMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -416,7 +416,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedAudio(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedDocument(
|
||||
fun <BC : BehaviourContext> BC.onEditedDocument(
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, DocumentMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in DocumentMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -443,7 +443,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedDocument(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedPhoto(
|
||||
fun <BC : BehaviourContext> BC.onEditedPhoto(
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PhotoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PhotoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -470,7 +470,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedPhoto(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedSticker(
|
||||
fun <BC : BehaviourContext> BC.onEditedSticker(
|
||||
initialFilter: CommonMessageFilter<StickerContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, StickerMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in StickerMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -497,7 +497,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedSticker(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedVideo(
|
||||
fun <BC : BehaviourContext> BC.onEditedVideo(
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -524,7 +524,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedVideo(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedVideoNote(
|
||||
fun <BC : BehaviourContext> BC.onEditedVideoNote(
|
||||
initialFilter: CommonMessageFilter<VideoNoteContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VideoNoteMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VideoNoteMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -551,7 +551,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedVideoNote(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedVoice(
|
||||
fun <BC : BehaviourContext> BC.onEditedVoice(
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, VoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in VoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -578,7 +578,7 @@ suspend fun <BC : BehaviourContext> BC.onEditedVoice(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onEditedInvoice(
|
||||
fun <BC : BehaviourContext> BC.onEditedInvoice(
|
||||
initialFilter: CommonMessageFilter<InvoiceContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InvoiceMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in InvoiceMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -591,3 +591,31 @@ suspend fun <BC : BehaviourContext> BC.onEditedInvoice(
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onEditedChecklist(
|
||||
initialFilter: CommonMessageFilter<ChecklistContent>? = CommonMessageFilterExcludeMediaGroups,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChecklistMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChecklistMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChecklistMessage>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChecklistMessage>
|
||||
)= onEditedContent(
|
||||
initialFilter,
|
||||
subcontextUpdatesFilter,
|
||||
markerFactory,
|
||||
additionalSubcontextInitialAction,
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
@@ -10,11 +10,15 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.Mar
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times
|
||||
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
|
||||
import dev.inmo.tgbotapi.extensions.utils.chatEventMessageOrNull
|
||||
import dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
||||
import dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
|
||||
import dev.inmo.tgbotapi.types.message.ChannelEventMessage
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
|
||||
@@ -35,7 +39,7 @@ import dev.inmo.tgbotapi.types.request.ChatSharedRequest
|
||||
import dev.inmo.tgbotapi.types.request.UsersShared
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : ChatEvent> BC.onEvent(
|
||||
internal inline fun <BC : BehaviourContext, reified T : ChatEvent> BC.onEvent(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<T>>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<T>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -46,7 +50,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChatEvent> BC.on
|
||||
(it.baseSentMessageUpdateOrNull() ?.data ?.chatEventMessageOrNull() ?.takeIf { it.chatEvent is T } as? ChatEventMessage<T>) ?.let(::listOfNotNull)
|
||||
}
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : ChatEvent, reified CEM : ChatEventMessage<T>> BC.onEventWithCustomChatEventMessage(
|
||||
internal inline fun <BC : BehaviourContext, reified T : ChatEvent, reified CEM : ChatEventMessage<T>> BC.onEventWithCustomChatEventMessage(
|
||||
initialFilter: SimpleFilter<CEM>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CEM, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in CEM, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -70,7 +74,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : ChatEvent, reifi
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChannelEvent(
|
||||
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,
|
||||
@@ -91,7 +95,7 @@ suspend fun <BC : BehaviourContext> BC.onChannelEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPrivateEvent(
|
||||
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,
|
||||
@@ -112,7 +116,7 @@ suspend fun <BC : BehaviourContext> BC.onPrivateEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatEvent(
|
||||
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,
|
||||
@@ -133,7 +137,7 @@ suspend fun <BC : BehaviourContext> BC.onChatEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoChatEvent(
|
||||
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,
|
||||
@@ -154,7 +158,7 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoChatStartedEvent(
|
||||
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,
|
||||
@@ -175,7 +179,7 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatStartedEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoChatEndedEvent(
|
||||
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,
|
||||
@@ -196,7 +200,7 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatEndedEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoChatParticipantsInvitedEvent(
|
||||
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,
|
||||
@@ -217,7 +221,7 @@ suspend fun <BC : BehaviourContext> BC.onVideoChatParticipantsInvitedEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMessageAutoDeleteTimerChangedEvent(
|
||||
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,
|
||||
@@ -238,7 +242,7 @@ suspend fun <BC : BehaviourContext> BC.onMessageAutoDeleteTimerChangedEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPublicChatEvent(
|
||||
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,
|
||||
@@ -259,7 +263,7 @@ suspend fun <BC : BehaviourContext> BC.onPublicChatEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onCommonEvent(
|
||||
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,
|
||||
@@ -280,7 +284,7 @@ suspend fun <BC : BehaviourContext> BC.onCommonEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGroupEvent(
|
||||
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,
|
||||
@@ -301,7 +305,7 @@ suspend fun <BC : BehaviourContext> BC.onGroupEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onSupergroupEvent(
|
||||
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,
|
||||
@@ -322,7 +326,7 @@ suspend fun <BC : BehaviourContext> BC.onSupergroupEvent(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChannelChatCreated(
|
||||
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,
|
||||
@@ -343,7 +347,7 @@ suspend fun <BC : BehaviourContext> BC.onChannelChatCreated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDeleteChatPhoto(
|
||||
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,
|
||||
@@ -364,7 +368,7 @@ suspend fun <BC : BehaviourContext> BC.onDeleteChatPhoto(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGroupChatCreated(
|
||||
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,
|
||||
@@ -385,7 +389,7 @@ suspend fun <BC : BehaviourContext> BC.onGroupChatCreated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onLeftChatMember(
|
||||
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,
|
||||
@@ -406,7 +410,7 @@ suspend fun <BC : BehaviourContext> BC.onLeftChatMember(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onNewChatMembers(
|
||||
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,
|
||||
@@ -427,7 +431,7 @@ suspend fun <BC : BehaviourContext> BC.onNewChatMembers(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onNewChatPhoto(
|
||||
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,
|
||||
@@ -448,7 +452,7 @@ suspend fun <BC : BehaviourContext> BC.onNewChatPhoto(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onNewChatTitle(
|
||||
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,
|
||||
@@ -469,7 +473,7 @@ suspend fun <BC : BehaviourContext> BC.onNewChatTitle(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPinnedMessage(
|
||||
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,
|
||||
@@ -490,7 +494,7 @@ suspend fun <BC : BehaviourContext> BC.onPinnedMessage(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onProximityAlertTriggered(
|
||||
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,
|
||||
@@ -511,7 +515,7 @@ suspend fun <BC : BehaviourContext> BC.onProximityAlertTriggered(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onSupergroupChatCreated(
|
||||
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,
|
||||
@@ -535,7 +539,7 @@ suspend fun <BC : BehaviourContext> BC.onSupergroupChatCreated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onSuccessfulPayment(
|
||||
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,
|
||||
@@ -556,7 +560,7 @@ suspend fun <BC : BehaviourContext> BC.onSuccessfulPayment(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onRefundedPayment(
|
||||
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,
|
||||
@@ -577,7 +581,7 @@ suspend fun <BC : BehaviourContext> BC.onRefundedPayment(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onUserLoggedIn(
|
||||
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,
|
||||
@@ -598,7 +602,7 @@ suspend fun <BC : BehaviourContext> BC.onUserLoggedIn(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onWebAppData(
|
||||
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,
|
||||
@@ -619,7 +623,7 @@ suspend fun <BC : BehaviourContext> BC.onWebAppData(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onForumTopicClosed(
|
||||
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,
|
||||
@@ -640,7 +644,7 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicClosed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onForumTopicCreated(
|
||||
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,
|
||||
@@ -661,7 +665,7 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicCreated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onForumTopicReopened(
|
||||
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,
|
||||
@@ -683,7 +687,7 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicReopened(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onForumTopicEdited(
|
||||
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,
|
||||
@@ -704,7 +708,7 @@ suspend fun <BC : BehaviourContext> BC.onForumTopicEdited(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGeneralForumTopicHidden(
|
||||
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,
|
||||
@@ -725,7 +729,7 @@ suspend fun <BC : BehaviourContext> BC.onGeneralForumTopicHidden(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGeneralForumTopicUnhidden(
|
||||
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,
|
||||
@@ -747,7 +751,7 @@ suspend fun <BC : BehaviourContext> BC.onGeneralForumTopicUnhidden(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowed(
|
||||
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,
|
||||
@@ -769,7 +773,7 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowed(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromRequest(
|
||||
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,
|
||||
@@ -791,7 +795,7 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromRequest(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromAttachmentMenu(
|
||||
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,
|
||||
@@ -813,7 +817,7 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromAttachmentMenu(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedOther(
|
||||
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,
|
||||
@@ -835,7 +839,7 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedOther(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromWebAppLink(
|
||||
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,
|
||||
@@ -858,7 +862,7 @@ suspend fun <BC : BehaviourContext> BC.onWriteAccessAllowedFromWebAppLink(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatSharedRequest(
|
||||
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,
|
||||
@@ -880,7 +884,7 @@ suspend fun <BC : BehaviourContext> BC.onChatSharedRequest(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onUsersShared(
|
||||
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,
|
||||
@@ -902,7 +906,7 @@ suspend fun <BC : BehaviourContext> BC.onUsersShared(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onUserShared(
|
||||
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,
|
||||
@@ -925,7 +929,7 @@ suspend fun <BC : BehaviourContext> BC.onUserShared(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatShared(
|
||||
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,
|
||||
@@ -948,7 +952,7 @@ suspend fun <BC : BehaviourContext> BC.onChatShared(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatBoostAdded(
|
||||
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,
|
||||
@@ -970,7 +974,7 @@ suspend fun <BC : BehaviourContext> BC.onChatBoostAdded(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onChatBackgroundSet(
|
||||
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,
|
||||
@@ -992,7 +996,7 @@ suspend fun <BC : BehaviourContext> BC.onChatBackgroundSet(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGiveawayCreated(
|
||||
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,
|
||||
@@ -1015,7 +1019,7 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayCreated(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGiveawayCompleted(
|
||||
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,
|
||||
@@ -1039,7 +1043,7 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayCompleted(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onGiveawayCompletedWithPrivateWinners(
|
||||
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,
|
||||
@@ -1061,7 +1065,7 @@ suspend fun <BC : BehaviourContext> BC.onGiveawayCompletedWithPrivateWinners(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPaidMessagePriceChanged(
|
||||
fun <BC : BehaviourContext> BC.onPaidMessagePriceChanged(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<PaidMessagePriceChanged>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<PaidMessagePriceChanged>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<PaidMessagePriceChanged>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -1083,7 +1087,7 @@ suspend fun <BC : BehaviourContext> BC.onPaidMessagePriceChanged(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onRegularGiftSentOrReceived(
|
||||
fun <BC : BehaviourContext> BC.onRegularGiftSentOrReceived(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GiftSentOrReceived.Regular>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GiftSentOrReceived.Regular>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GiftSentOrReceived.Regular>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -1105,10 +1109,76 @@ suspend fun <BC : BehaviourContext> BC.onRegularGiftSentOrReceived(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onUniqueGiftSentOrReceived(
|
||||
fun <BC : BehaviourContext> BC.onUniqueGiftSentOrReceived(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<GiftSentOrReceived.Unique>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<GiftSentOrReceived.Unique>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<GiftSentOrReceived.Unique>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<GiftSentOrReceived.Unique>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<GiftSentOrReceived.Unique>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onChecklistTasksDone(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChecklistTasksDone>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChecklistTasksDone>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChecklistTasksDone>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChecklistTasksDone>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChecklistTasksDone>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onChecklistTasksAdded(
|
||||
initialFilter: SimpleFilter<ChatEventMessage<ChecklistTasksAdded>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChecklistTasksAdded>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChatEventMessage<ChecklistTasksAdded>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChecklistTasksAdded>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChecklistTasksAdded>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
|
||||
/**
|
||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||
* to combinate several filters
|
||||
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
fun <BC : BehaviourContext> BC.onChannelDirectMessagesConfigurationChanged(
|
||||
initialFilter: SimpleFilter<ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>, Any>? = ByChatMessageMarkerFactory,
|
||||
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>>? = null,
|
||||
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChannelEventMessage<ChannelDirectMessagesConfigurationChanged>>
|
||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||
|
||||
@@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.extensions.utils.inlineQueryUpdateOrNull
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.query.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : InlineQuery> BC.onInlineQuery(
|
||||
internal inline fun <BC : BehaviourContext, reified T : InlineQuery> BC.onInlineQuery(
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
@@ -32,7 +32,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : InlineQuery> BC.
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onAnyInlineQuery(
|
||||
fun <BC : BehaviourContext> BC.onAnyInlineQuery(
|
||||
initialFilter: SimpleFilter<InlineQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, InlineQuery, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in InlineQuery, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
@@ -54,7 +54,7 @@ suspend fun <BC : BehaviourContext> BC.onAnyInlineQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onBaseInlineQuery(
|
||||
fun <BC : BehaviourContext> BC.onBaseInlineQuery(
|
||||
initialFilter: SimpleFilter<BaseInlineQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BaseInlineQuery, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in BaseInlineQuery, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
@@ -76,7 +76,7 @@ suspend fun <BC : BehaviourContext> BC.onBaseInlineQuery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onLocationInlineQuery(
|
||||
fun <BC : BehaviourContext> BC.onLocationInlineQuery(
|
||||
initialFilter: SimpleFilter<LocationInlineQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LocationInlineQuery, Update>? = InlineQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in LocationInlineQuery, Any>? = ByUserInlineQueryMarkerFactory,
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlinx.coroutines.flow.emptyFlow
|
||||
import kotlinx.coroutines.flow.filter
|
||||
import kotlinx.coroutines.flow.flatMapLatest
|
||||
|
||||
internal suspend fun <BC : BehaviourContext, T> BC.on(
|
||||
internal fun <BC : BehaviourContext, T> BC.on(
|
||||
markerFactory: MarkerFactory<in T, Any>?,
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
|
||||
@@ -15,7 +15,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.utils.PreviewFeature
|
||||
|
||||
@PreviewFeature
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupPartContent> BC.buildMediaGroupMessagesTrigger(
|
||||
internal inline fun <BC : BehaviourContext, reified T : MediaGroupPartContent> BC.buildMediaGroupMessagesTrigger(
|
||||
initialFilter: SimpleFilter<MediaGroupMessage<T>>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupMessage<T>, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -44,7 +44,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupPartCo
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMediaGroupMessages(
|
||||
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,
|
||||
@@ -65,7 +65,7 @@ suspend fun <BC : BehaviourContext> BC.onMediaGroupMessages(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPlaylistMessages(
|
||||
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,
|
||||
@@ -86,7 +86,7 @@ suspend fun <BC : BehaviourContext> BC.onPlaylistMessages(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDocumentsGroupMessages(
|
||||
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,
|
||||
@@ -107,7 +107,7 @@ suspend fun <BC : BehaviourContext> BC.onDocumentsGroupMessages(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVisualGalleryMessages(
|
||||
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,
|
||||
@@ -128,7 +128,7 @@ suspend fun <BC : BehaviourContext> BC.onVisualGalleryMessages(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVisualMediaGroupMessages(
|
||||
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,
|
||||
@@ -149,7 +149,7 @@ suspend fun <BC : BehaviourContext> BC.onVisualMediaGroupMessages(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPhotoGalleryMessages(
|
||||
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,
|
||||
@@ -170,7 +170,7 @@ suspend fun <BC : BehaviourContext> BC.onPhotoGalleryMessages(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoGalleryMessages(
|
||||
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,
|
||||
|
||||
@@ -15,7 +15,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.utils.PreviewFeature
|
||||
|
||||
@PreviewFeature
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupPartContent> BC.buildMediaGroupTrigger(
|
||||
internal inline fun <BC : BehaviourContext, reified T : MediaGroupPartContent> BC.buildMediaGroupTrigger(
|
||||
initialFilter: SimpleFilter<MediaGroupContent<T>>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<T>, Update>? = null,
|
||||
markerFactory: MarkerFactory<in MediaGroupContent<T>, Any>? = AnyMarkerFactory(),
|
||||
@@ -44,7 +44,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : MediaGroupPartCo
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMediaGroup(
|
||||
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(),
|
||||
@@ -65,7 +65,7 @@ suspend fun <BC : BehaviourContext> BC.onMediaGroup(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPlaylist(
|
||||
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(),
|
||||
@@ -86,7 +86,7 @@ suspend fun <BC : BehaviourContext> BC.onPlaylist(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onDocumentsGroup(
|
||||
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(),
|
||||
@@ -107,7 +107,7 @@ suspend fun <BC : BehaviourContext> BC.onDocumentsGroup(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVisualGallery(
|
||||
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(),
|
||||
@@ -128,7 +128,7 @@ suspend fun <BC : BehaviourContext> BC.onVisualGallery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVisualMediaGroup(
|
||||
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(),
|
||||
@@ -149,7 +149,7 @@ suspend fun <BC : BehaviourContext> BC.onVisualMediaGroup(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPhotoGallery(
|
||||
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(),
|
||||
@@ -170,7 +170,7 @@ suspend fun <BC : BehaviourContext> BC.onPhotoGallery(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onVideoGallery(
|
||||
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(),
|
||||
|
||||
@@ -25,7 +25,7 @@ import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent
|
||||
import dev.inmo.tgbotapi.types.message.content.VoiceContent
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention(
|
||||
internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
|
||||
@@ -42,7 +42,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onTextMention(
|
||||
internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onTextMention(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
|
||||
@@ -59,7 +59,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
scenarioReceiver
|
||||
)
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention(
|
||||
internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
|
||||
@@ -82,7 +82,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : TextedContent> B
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
|
||||
@@ -96,7 +96,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
|
||||
@@ -110,7 +110,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<TextedContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
|
||||
@@ -126,7 +126,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
|
||||
@@ -140,7 +140,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
|
||||
@@ -154,7 +154,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
|
||||
@@ -170,7 +170,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
|
||||
@@ -184,7 +184,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
|
||||
@@ -198,7 +198,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
|
||||
@@ -214,7 +214,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
|
||||
@@ -228,7 +228,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
|
||||
@@ -242,7 +242,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
|
||||
@@ -258,7 +258,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
|
||||
@@ -272,7 +272,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
|
||||
@@ -286,7 +286,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<AudioContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
|
||||
@@ -302,7 +302,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
|
||||
@@ -316,7 +316,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
|
||||
@@ -330,7 +330,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<DocumentContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
|
||||
@@ -346,7 +346,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
@@ -360,7 +360,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
@@ -374,7 +374,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartCont
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
|
||||
@@ -390,7 +390,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
|
||||
@@ -404,7 +404,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithVideoContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithVideoContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
|
||||
@@ -418,7 +418,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithVideoContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<VideoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
|
||||
@@ -434,7 +434,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
|
||||
@@ -448,7 +448,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
|
||||
@@ -462,7 +462,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<PhotoContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
|
||||
@@ -478,7 +478,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
|
||||
@@ -492,7 +492,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
|
||||
@@ -506,7 +506,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
|
||||
@@ -522,7 +522,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
username: Username,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
|
||||
@@ -536,7 +536,7 @@ suspend fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onTextMentionWithTextContent(
|
||||
fun <BC : BehaviourContext> BC.onTextMentionWithTextContent(
|
||||
userId: UserId,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
|
||||
@@ -550,7 +550,7 @@ suspend fun <BC : BehaviourContext> BC.onTextMentionWithTextContent(
|
||||
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||
* "stream"
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
fun <BC : BehaviourContext> BC.onMentionWithTextContent(
|
||||
user: User,
|
||||
initialFilter: CommonMessageFilter<TextContent>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
|
||||
|
||||
@@ -30,7 +30,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
initialFilter: SimpleFilter<PaidMediaPurchased>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaPurchased, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PaidMediaPurchased, Any>? = ByUserPaidMediaPurchasedMarkerFactory,
|
||||
@@ -54,7 +54,7 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
paidMediaPayloadRegex: Regex,
|
||||
initialFilter: SimpleFilter<PaidMediaPurchased>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaPurchased, Update>? = null,
|
||||
@@ -83,7 +83,7 @@ suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
fun <BC : BehaviourContext> BC.onPaidMediaPurchased(
|
||||
paidMediaPayload: PaidMediaPayload,
|
||||
initialFilter: SimpleFilter<PaidMediaPurchased>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PaidMediaPurchased, Update>? = null,
|
||||
|
||||
@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.PassportMessage
|
||||
import dev.inmo.tgbotapi.types.passport.encrypted.abstracts.EncryptedPassportElement
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : EncryptedPassportElement> BC.onPassportMessageWith(
|
||||
internal inline fun <BC : BehaviourContext, reified T : EncryptedPassportElement> BC.onPassportMessageWith(
|
||||
initialFilter: SimpleFilter<PassportMessage>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PassportMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PassportMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
@@ -35,7 +35,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : EncryptedPasspor
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPassportMessage(
|
||||
fun <BC : BehaviourContext> BC.onPassportMessage(
|
||||
initialFilter: SimpleFilter<PassportMessage>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PassportMessage, Update>? = MessageFilterByChat,
|
||||
markerFactory: MarkerFactory<in PassportMessage, Any>? = ByChatMessageMarkerFactory,
|
||||
|
||||
@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.extensions.utils.pollAnswerUpdateOrNull
|
||||
import dev.inmo.tgbotapi.types.polls.PollAnswer
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext> BC.onPollAnswered(
|
||||
internal inline fun <BC : BehaviourContext> BC.onPollAnswered(
|
||||
initialFilter: SimpleFilter<PollAnswer>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PollAnswer, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PollAnswer, Any>? = ByIdPollAnswerMarkerFactory,
|
||||
@@ -33,7 +33,7 @@ internal suspend inline fun <BC : BehaviourContext> BC.onPollAnswered(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPollAnswer(
|
||||
fun <BC : BehaviourContext> BC.onPollAnswer(
|
||||
initialFilter: SimpleFilter<PollAnswer>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PollAnswer, Update>? = null,
|
||||
markerFactory: MarkerFactory<in PollAnswer, Any>? = ByIdPollAnswerMarkerFactory,
|
||||
|
||||
@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.extensions.utils.pollUpdateOrNull
|
||||
import dev.inmo.tgbotapi.types.polls.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
|
||||
internal suspend inline fun <BC : BehaviourContext, reified T : Poll> BC.onPollUpdatedBase(
|
||||
internal inline fun <BC : BehaviourContext, reified T : Poll> BC.onPollUpdatedBase(
|
||||
initialFilter: SimpleFilter<T>? = null,
|
||||
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, T, Update>? = null,
|
||||
markerFactory: MarkerFactory<in T, Any>? = ByIdPollMarkerFactory,
|
||||
@@ -33,7 +33,7 @@ internal suspend inline fun <BC : BehaviourContext, reified T : Poll> BC.onPollU
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPollUpdates(
|
||||
fun <BC : BehaviourContext> BC.onPollUpdates(
|
||||
initialFilter: SimpleFilter<Poll>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, Poll, Update>? = null,
|
||||
markerFactory: MarkerFactory<in Poll, Any>? = ByIdPollMarkerFactory,
|
||||
@@ -60,7 +60,7 @@ suspend fun <BC : BehaviourContext> BC.onPollUpdates(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onRegularPollUpdates(
|
||||
fun <BC : BehaviourContext> BC.onRegularPollUpdates(
|
||||
initialFilter: SimpleFilter<RegularPoll>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, RegularPoll, Update>? = null,
|
||||
markerFactory: MarkerFactory<in RegularPoll, Any>? = ByIdPollMarkerFactory,
|
||||
@@ -87,7 +87,7 @@ suspend fun <BC : BehaviourContext> BC.onRegularPollUpdates(
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onQuizPollUpdates(
|
||||
fun <BC : BehaviourContext> BC.onQuizPollUpdates(
|
||||
initialFilter: SimpleFilter<QuizPoll>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, QuizPoll, Update>? = null,
|
||||
markerFactory: MarkerFactory<in QuizPoll, Any>? = ByIdPollMarkerFactory,
|
||||
|
||||
@@ -26,7 +26,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onPreCheckoutQuery(
|
||||
fun <BC : BehaviourContext> BC.onPreCheckoutQuery(
|
||||
initialFilter: SimpleFilter<PreCheckoutQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, PreCheckoutQuery, Update>? = PreCheckoutQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in PreCheckoutQuery, Any>? = ByUserPreCheckoutQueryMarkerFactory,
|
||||
|
||||
@@ -26,7 +26,7 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||
* data
|
||||
*/
|
||||
suspend fun <BC : BehaviourContext> BC.onShippingQuery(
|
||||
fun <BC : BehaviourContext> BC.onShippingQuery(
|
||||
initialFilter: SimpleFilter<ShippingQuery>? = null,
|
||||
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ShippingQuery, Update>? = ShippingQueryFilterByUser,
|
||||
markerFactory: MarkerFactory<in ShippingQuery, Any>? = ByUserShippingQueryMarkerFactory,
|
||||
|
||||
@@ -134,6 +134,18 @@ public abstract interface class dev/inmo/tgbotapi/abstracts/Titled {
|
||||
public abstract fun getTitle ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/abstracts/TitledInput : dev/inmo/tgbotapi/abstracts/TextedInput {
|
||||
public abstract fun getText ()Ljava/lang/String;
|
||||
public abstract fun getTextSources ()Ljava/util/List;
|
||||
public abstract fun getTitle ()Ljava/lang/String;
|
||||
public abstract fun getTitleTextSources ()Ljava/util/List;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/abstracts/TitledInput$DefaultImpls {
|
||||
public static fun getText (Ldev/inmo/tgbotapi/abstracts/TitledInput;)Ljava/lang/String;
|
||||
public static fun getTextSources (Ldev/inmo/tgbotapi/abstracts/TitledInput;)Ljava/util/List;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/abstracts/WithCustomStartMediaData {
|
||||
public abstract fun getStartTimestamp ()Ljava/lang/Integer;
|
||||
}
|
||||
@@ -241,11 +253,17 @@ public final class dev/inmo/tgbotapi/abstracts/types/WithReplyParameters$Default
|
||||
|
||||
public abstract class dev/inmo/tgbotapi/bot/BaseRequestsExecutor : dev/inmo/tgbotapi/bot/RequestsExecutor {
|
||||
public fun <init> (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;)V
|
||||
public fun getLog ()Ldev/inmo/kslog/common/KSLog;
|
||||
protected final fun getTelegramAPIUrlsKeeper ()Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/bot/RequestsExecutor : java/io/Closeable {
|
||||
public abstract fun execute (Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public abstract fun getLog ()Ldev/inmo/kslog/common/KSLog;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/bot/RequestsExecutor$DefaultImpls {
|
||||
public static fun getLog (Ldev/inmo/tgbotapi/bot/RequestsExecutor;)Ldev/inmo/kslog/common/KSLog;
|
||||
}
|
||||
|
||||
public abstract class dev/inmo/tgbotapi/bot/exceptions/BotException : java/io/IOException, kotlinx/coroutines/CopyableThrowable {
|
||||
@@ -416,6 +434,7 @@ public final class dev/inmo/tgbotapi/bot/ktor/base/AbstractRequestCallFactoryKt
|
||||
public final class dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor : dev/inmo/tgbotapi/bot/BaseRequestsExecutor {
|
||||
public fun close ()V
|
||||
public fun execute (Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public fun getLog ()Ldev/inmo/kslog/common/KSLog;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/bot/ktor/base/DownloadFileChannelRequestCallFactory : dev/inmo/tgbotapi/bot/ktor/KtorCallFactory {
|
||||
@@ -439,6 +458,7 @@ public final class dev/inmo/tgbotapi/bot/ktor/base/MultipleClientKtorRequestsExe
|
||||
public fun <init> (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Ljava/util/List;ZLdev/inmo/tgbotapi/bot/settings/limiters/RequestLimiter;Lkotlinx/serialization/json/Json;Ldev/inmo/tgbotapi/bot/ktor/TelegramBotPipelinesHandler;ILdev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function0;)V
|
||||
public fun close ()V
|
||||
public fun execute (Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public fun getLog ()Ldev/inmo/kslog/common/KSLog;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/bot/ktor/base/SimpleRequestCallFactory : dev/inmo/tgbotapi/bot/ktor/base/AbstractRequestCallFactory {
|
||||
@@ -541,6 +561,7 @@ public final class dev/inmo/tgbotapi/bot/multiserver/SimpleMultiServerRequestsEx
|
||||
public synthetic fun <init> (Ljava/util/List;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun close ()V
|
||||
public fun execute (Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public fun getLog ()Ldev/inmo/kslog/common/KSLog;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/bot/multiserver/SimpleMultiServerRequestsExecutor$Companion {
|
||||
@@ -1716,6 +1737,14 @@ public final class dev/inmo/tgbotapi/requests/bot/GetMyShortDescription$Companio
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/bot/GetMyStarBalance : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/requests/bot/GetMyStarBalance;
|
||||
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
|
||||
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
|
||||
public fun method ()Ljava/lang/String;
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/requests/bot/MyCommandsRequest : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest, dev/inmo/tgbotapi/types/abstracts/WithOptionalLanguageCode {
|
||||
public abstract fun getScope ()Ldev/inmo/tgbotapi/types/commands/BotCommandScope;
|
||||
}
|
||||
@@ -4301,6 +4330,50 @@ public final class dev/inmo/tgbotapi/requests/edit/caption/EditInlineMessageCapt
|
||||
public static synthetic fun EditInlineMessageCaption-3bQJ72M$default (Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/caption/EditInlineMessageCaption;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist : dev/inmo/tgbotapi/requests/edit/abstracts/EditChatMessage, dev/inmo/tgbotapi/requests/edit/abstracts/EditReplyMessage {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist$Companion;
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
|
||||
public final fun component2-APLFQys ()J
|
||||
public final fun component3-T-_HSQI ()Ljava/lang/String;
|
||||
public final fun component4 ()Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public final fun component5 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
|
||||
public final fun copy--CEwGbA (Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;)Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist;
|
||||
public static synthetic fun copy--CEwGbA$default (Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String;
|
||||
public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
|
||||
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
|
||||
public final fun getChecklist ()Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public fun getMessageId-APLFQys ()J
|
||||
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;
|
||||
public synthetic fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
|
||||
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
|
||||
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
|
||||
public fun hashCode ()I
|
||||
public fun method ()Ljava/lang/String;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklist$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/edit/checklist/EditMessageChecklistKt {
|
||||
public static final field editMessageChecklistMethod Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/edit/location/live/EditChatMessageLiveLocation : dev/inmo/tgbotapi/requests/edit/abstracts/EditChatMessage, dev/inmo/tgbotapi/requests/edit/abstracts/EditLocationMessage, dev/inmo/tgbotapi/requests/edit/abstracts/EditReplyMessage {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/requests/edit/location/live/EditChatMessageLiveLocation$Companion;
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;JDDLjava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
@@ -5465,6 +5538,55 @@ public final class dev/inmo/tgbotapi/requests/send/SendAction$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/send/SendChecklist : dev/inmo/tgbotapi/abstracts/types/DisableNotification, dev/inmo/tgbotapi/abstracts/types/OptionallyWithEffectId, dev/inmo/tgbotapi/abstracts/types/ProtectContent, dev/inmo/tgbotapi/abstracts/types/WithBusinessConnectionId, dev/inmo/tgbotapi/abstracts/types/WithReplyMarkup, dev/inmo/tgbotapi/abstracts/types/WithReplyParameters, dev/inmo/tgbotapi/requests/send/abstracts/SendChatMessageRequest {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/requests/send/SendChecklist$Companion;
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Lkotlin/Pair;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Lkotlin/Pair;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
|
||||
public final fun component2 ()Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public final fun component3-T-_HSQI ()Ljava/lang/String;
|
||||
public final fun component4 ()Z
|
||||
public final fun component5 ()Z
|
||||
public final fun component6-Ts0V7ak ()Ljava/lang/String;
|
||||
public final fun component7 ()Ldev/inmo/tgbotapi/types/ReplyParameters;
|
||||
public final fun component8 ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
|
||||
public final fun copy-4oVOAy8 (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/requests/send/SendChecklist;
|
||||
public static synthetic fun copy-4oVOAy8$default (Ldev/inmo/tgbotapi/requests/send/SendChecklist;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendChecklist;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getAllowSendingWithoutReply ()Ljava/lang/Boolean;
|
||||
public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String;
|
||||
public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String;
|
||||
public fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier;
|
||||
public final fun getChecklist ()Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public fun getDisableNotification ()Z
|
||||
public fun getEffectId-Ts0V7ak ()Ljava/lang/String;
|
||||
public fun getProtectContent ()Z
|
||||
public fun getReplyMarkup ()Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;
|
||||
public fun getReplyParameters ()Ldev/inmo/tgbotapi/types/ReplyParameters;
|
||||
public fun getReplyToMessageId-CigXjpw ()Ldev/inmo/tgbotapi/types/MessageId;
|
||||
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
|
||||
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
|
||||
public fun hashCode ()I
|
||||
public fun method ()Ljava/lang/String;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/requests/send/SendChecklist$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/requests/send/SendChecklist$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/send/SendChecklist;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/send/SendChecklist;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/send/SendChecklist$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/requests/send/SendContact : dev/inmo/tgbotapi/requests/send/abstracts/ReplyingMarkupSendMessageRequest, dev/inmo/tgbotapi/requests/send/abstracts/SendContentMessageRequest {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/requests/send/SendContact$Companion;
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/Contact;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
@@ -9264,6 +9386,58 @@ public final class dev/inmo/tgbotapi/types/CallbackQueryId$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChannelEvent {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Companion;
|
||||
public abstract fun getCost ()Ljava/lang/Integer;
|
||||
public abstract fun getEnabled ()Z
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Companion : kotlinx/serialization/KSerializer {
|
||||
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Disabled : dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Disabled;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCost ()Ljava/lang/Integer;
|
||||
public fun getEnabled ()Z
|
||||
public fun hashCode ()I
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Free : dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Free;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCost ()Ljava/lang/Integer;
|
||||
public fun getEnabled ()Z
|
||||
public fun hashCode ()I
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid : dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid$Companion;
|
||||
public fun <init> (I)V
|
||||
public final fun component1 ()I
|
||||
public final fun copy (I)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCost ()Ljava/lang/Integer;
|
||||
public fun getEnabled ()Z
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/ChatId : dev/inmo/tgbotapi/types/IdChatIdentifier {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/ChatId$Companion;
|
||||
public static final synthetic fun box-impl (J)Ldev/inmo/tgbotapi/types/ChatId;
|
||||
@@ -9684,12 +9858,16 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field chatIsForumField Ljava/lang/String;
|
||||
public static final field chatTypeField Ljava/lang/String;
|
||||
public static final field chatsField Ljava/lang/String;
|
||||
public static final field checklistField Ljava/lang/String;
|
||||
public static final field checklistMessageField Ljava/lang/String;
|
||||
public static final field cityField Ljava/lang/String;
|
||||
public static final field closeDateField Ljava/lang/String;
|
||||
public static final field closingMinuteField Ljava/lang/String;
|
||||
public static final field colorField Ljava/lang/String;
|
||||
public static final field colorsField Ljava/lang/String;
|
||||
public static final field commissionPerMilleField Ljava/lang/String;
|
||||
public static final field completedByUserField Ljava/lang/String;
|
||||
public static final field completionDateField Ljava/lang/String;
|
||||
public static final field containsMasksField Ljava/lang/String;
|
||||
public static final field contentField Ljava/lang/String;
|
||||
public static final field convertStarCountField Ljava/lang/String;
|
||||
@@ -9850,6 +10028,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field lastErrorDateField Ljava/lang/String;
|
||||
public static final field lastErrorMessageField Ljava/lang/String;
|
||||
public static final field lastNameField Ljava/lang/String;
|
||||
public static final field lastResaleStarCountField Ljava/lang/String;
|
||||
public static final field lastSynchronizationErrorDateField Ljava/lang/String;
|
||||
public static final field latitudeField Ljava/lang/String;
|
||||
public static final field lengthField Ljava/lang/String;
|
||||
@@ -9862,6 +10041,8 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field loginUrlField Ljava/lang/String;
|
||||
public static final field longitudeField Ljava/lang/String;
|
||||
public static final field mainFrameTimestampField Ljava/lang/String;
|
||||
public static final field markedAsDoneTaskIdsField Ljava/lang/String;
|
||||
public static final field markedAsNotDoneTaskIdsField Ljava/lang/String;
|
||||
public static final field maskPositionField Ljava/lang/String;
|
||||
public static final field maxAllowedConnectionsField Ljava/lang/String;
|
||||
public static final field maxQuantityField Ljava/lang/String;
|
||||
@@ -9894,6 +10075,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field newOwnerChatIdField Ljava/lang/String;
|
||||
public static final field newReactionField Ljava/lang/String;
|
||||
public static final field nextOffsetField Ljava/lang/String;
|
||||
public static final field nextTransferDateField Ljava/lang/String;
|
||||
public static final field nonceField Ljava/lang/String;
|
||||
public static final field numberField Ljava/lang/String;
|
||||
public static final field offsetField Ljava/lang/String;
|
||||
@@ -9911,6 +10093,8 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field optionsField Ljava/lang/String;
|
||||
public static final field orderInfoField Ljava/lang/String;
|
||||
public static final field originField Ljava/lang/String;
|
||||
public static final field othersCanAddTasksField Ljava/lang/String;
|
||||
public static final field othersCanMarkTasksAsDoneField Ljava/lang/String;
|
||||
public static final field ownedGiftIdField Ljava/lang/String;
|
||||
public static final field paidMediaField Ljava/lang/String;
|
||||
public static final field paidMediaPayloadField Ljava/lang/String;
|
||||
@@ -10066,6 +10250,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field switchPmTextField Ljava/lang/String;
|
||||
public static final field symbolColorField Ljava/lang/String;
|
||||
public static final field symbolField Ljava/lang/String;
|
||||
public static final field tasksField Ljava/lang/String;
|
||||
public static final field telegramPaymentChargeIdField Ljava/lang/String;
|
||||
public static final field temperatureField Ljava/lang/String;
|
||||
public static final field temporaryRegistrationField Ljava/lang/String;
|
||||
@@ -10082,6 +10267,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
||||
public static final field thumbnailUrlField Ljava/lang/String;
|
||||
public static final field thumbnailWidthField Ljava/lang/String;
|
||||
public static final field timeZoneNameField Ljava/lang/String;
|
||||
public static final field titleEntitiesField Ljava/lang/String;
|
||||
public static final field titleField Ljava/lang/String;
|
||||
public static final field topColorField Ljava/lang/String;
|
||||
public static final field totalAmountField Ljava/lang/String;
|
||||
@@ -17581,6 +17767,295 @@ public final class dev/inmo/tgbotapi/types/chat/member/SubscriptionMemberChatMem
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/types/checklists/Checklist : dev/inmo/tgbotapi/abstracts/TitledInput {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/Checklist$Companion;
|
||||
public abstract fun getOthersCanAddTasks ()Z
|
||||
public abstract fun getOthersCanCompleteTasks ()Z
|
||||
public abstract fun getTasks ()Ljava/util/List;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/Checklist$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/Checklist$Created : dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant, dev/inmo/tgbotapi/types/checklists/Checklist {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/Checklist$Created$Companion;
|
||||
public fun <init> (Ljava/util/List;Ljava/util/List;ZZ)V
|
||||
public synthetic fun <init> (Ljava/util/List;Ljava/util/List;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ljava/util/List;
|
||||
public final fun component2 ()Ljava/util/List;
|
||||
public final fun component3 ()Z
|
||||
public final fun component4 ()Z
|
||||
public final fun copy (Ljava/util/List;Ljava/util/List;ZZ)Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;Ljava/util/List;Ljava/util/List;ZZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getOthersCanAddTasks ()Z
|
||||
public fun getOthersCanCompleteTasks ()Z
|
||||
public fun getTasks ()Ljava/util/List;
|
||||
public fun getText ()Ljava/lang/String;
|
||||
public fun getTextSources ()Ljava/util/List;
|
||||
public fun getTitle ()Ljava/lang/String;
|
||||
public fun getTitleTextSources ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/Checklist$Created$Companion : kotlinx/serialization/KSerializer {
|
||||
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/Checklist$DefaultImpls {
|
||||
public static fun getText (Ldev/inmo/tgbotapi/types/checklists/Checklist;)Ljava/lang/String;
|
||||
public static fun getTextSources (Ldev/inmo/tgbotapi/types/checklists/Checklist;)Ljava/util/List;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/Checklist$Input : dev/inmo/tgbotapi/types/checklists/Checklist {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/Checklist$Input$Companion;
|
||||
public fun <init> (Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZZ)V
|
||||
public synthetic fun <init> (Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZ)V
|
||||
public synthetic fun <init> (Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ljava/util/List;Ljava/util/List;ZZ)V
|
||||
public synthetic fun <init> (Ljava/util/List;Ljava/util/List;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ljava/util/List;ZZLkotlin/jvm/functions/Function1;)V
|
||||
public synthetic fun <init> (Ljava/util/List;ZZLkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ljava/lang/String;
|
||||
public final fun component2 ()Ljava/util/List;
|
||||
public final fun component3 ()Ldev/inmo/tgbotapi/types/message/ParseMode;
|
||||
public final fun component4 ()Ljava/util/List;
|
||||
public final fun component5 ()Z
|
||||
public final fun component6 ()Z
|
||||
public final fun copy (Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZZ)Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getOthersCanAddTasks ()Z
|
||||
public fun getOthersCanCompleteTasks ()Z
|
||||
public final fun getParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
|
||||
public fun getTasks ()Ljava/util/List;
|
||||
public fun getText ()Ljava/lang/String;
|
||||
public fun getTextSources ()Ljava/util/List;
|
||||
public fun getTitle ()Ljava/lang/String;
|
||||
public fun getTitleTextSources ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/Checklist$Input$Companion : kotlinx/serialization/KSerializer {
|
||||
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/checklists/Checklist$Input;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/types/checklists/ChecklistTask : dev/inmo/tgbotapi/abstracts/TextedInput {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Companion;
|
||||
public abstract fun getId-9XrXEx4 ()I
|
||||
public abstract fun getText ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Created : dev/inmo/tgbotapi/types/checklists/ChecklistTask {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Created$Companion;
|
||||
public abstract fun getCompletedByUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||
public abstract fun getCompletionDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Created$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Created$DefaultImpls {
|
||||
public static fun getCompletedByUser (Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Created;)Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||
public static fun getCompletionDate (Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Created;)Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Created$Serializer : kotlinx/serialization/KSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Created$Serializer;
|
||||
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Created;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Created;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Done : dev/inmo/tgbotapi/types/checklists/ChecklistTask$Created {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Done$Companion;
|
||||
public synthetic fun <init> (ILdev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/TelegramDate;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILdev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/TelegramDate;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1-9XrXEx4 ()I
|
||||
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||
public final fun component3 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public final fun component4 ()Ljava/util/List;
|
||||
public final fun copy-egrVBYk (ILdev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/TelegramDate;Ljava/util/List;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Done;
|
||||
public static synthetic fun copy-egrVBYk$default (Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Done;ILdev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/TelegramDate;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Done;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCompletedByUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||
public fun getCompletionDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public fun getId-9XrXEx4 ()I
|
||||
public fun getText ()Ljava/lang/String;
|
||||
public fun getTextSources ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Done$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Input : dev/inmo/tgbotapi/types/checklists/ChecklistTask {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Input$Companion;
|
||||
public synthetic fun <init> (ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILkotlin/jvm/functions/Function1;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1-9XrXEx4 ()I
|
||||
public final fun component2 ()Ljava/lang/String;
|
||||
public final fun component3 ()Ldev/inmo/tgbotapi/types/message/ParseMode;
|
||||
public final fun component4 ()Ljava/util/List;
|
||||
public final fun copy-egrVBYk (ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Input;
|
||||
public static synthetic fun copy-egrVBYk$default (Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Input;ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Input;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getId-9XrXEx4 ()I
|
||||
public final fun getParseMode ()Ldev/inmo/tgbotapi/types/message/ParseMode;
|
||||
public fun getText ()Ljava/lang/String;
|
||||
public fun getTextSources ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Input$Companion : kotlinx/serialization/KSerializer {
|
||||
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Input;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Input;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Undone : dev/inmo/tgbotapi/types/checklists/ChecklistTask$Created {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Undone$Companion;
|
||||
public synthetic fun <init> (ILjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (ILjava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1-9XrXEx4 ()I
|
||||
public final fun component2 ()Ljava/util/List;
|
||||
public final fun copy--FO1ySU (ILjava/util/List;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Undone;
|
||||
public static synthetic fun copy--FO1ySU$default (Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Undone;ILjava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTask$Undone;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCompletedByUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||
public fun getCompletionDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public fun getId-9XrXEx4 ()I
|
||||
public fun getText ()Ljava/lang/String;
|
||||
public fun getTextSources ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTask$Undone$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTaskId {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId$Companion;
|
||||
public static final synthetic fun box-impl (I)Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId;
|
||||
public static fun constructor-impl (I)I
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (ILjava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (II)Z
|
||||
public final fun getInt-pVg5ArA ()I
|
||||
public fun hashCode ()I
|
||||
public static fun hashCode-impl (I)I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public static fun toString-impl (I)Ljava/lang/String;
|
||||
public final synthetic fun unbox-impl ()I
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/types/checklists/ChecklistTaskId$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/checklists/ChecklistTaskId$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun deserialize-YVfj6vI (Lkotlinx/serialization/encoding/Decoder;)I
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public final fun serialize-sSeF6h8 (Lkotlinx/serialization/encoding/Encoder;I)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTaskId$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/CommonEvent {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded$Companion;
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;
|
||||
public final fun component2 ()Ljava/util/List;
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getChecklistMessage ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;
|
||||
public final fun getTasks ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTasksDone : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/CommonEvent {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone$Companion;
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;Ljava/util/List;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;
|
||||
public final fun component2 ()Ljava/util/List;
|
||||
public final fun component3 ()Ljava/util/List;
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;Ljava/util/List;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getChecklistMessage ()Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;
|
||||
public final fun getMarkedAsDone ()Ljava/util/List;
|
||||
public final fun getMarkedAsNotDone ()Ljava/util/List;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/types/checklists/ChecklistTasksDone$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/checklists/ChecklistTasksDone$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/colors/ColorId {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/colors/ColorId$Companion;
|
||||
public static final synthetic fun box-impl (I)Ldev/inmo/tgbotapi/types/colors/ColorId;
|
||||
@@ -19375,6 +19850,7 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Unique$Companion {
|
||||
public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/CommonEvent {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Companion;
|
||||
public abstract fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift;
|
||||
public abstract fun getNextTransferDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public abstract fun getOwnedGiftId-FhTg01o ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
@@ -19402,21 +19878,23 @@ public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common$Companion;
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;Z)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;
|
||||
public final fun component2 ()Ljava/lang/Integer;
|
||||
public final fun component3 ()Ljava/lang/Integer;
|
||||
public final fun component4 ()Z
|
||||
public final fun component5 ()Ljava/lang/String;
|
||||
public final fun component7 ()Z
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;Z)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;
|
||||
public final fun component8 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCanBeUpgraded ()Z
|
||||
public fun getConvertStarCount ()Ljava/lang/Integer;
|
||||
public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;
|
||||
public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift;
|
||||
public fun getNextTransferDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public fun getOwnedGiftId-FhTg01o ()Ljava/lang/String;
|
||||
public fun getPrepaidUpgradeStarCount ()Ljava/lang/Integer;
|
||||
public fun getText ()Ljava/lang/String;
|
||||
@@ -19453,8 +19931,8 @@ public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Comp
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount, dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount$Companion;
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;
|
||||
public final fun component2-OyCYJok ()Ljava/lang/String;
|
||||
public final fun component3 ()Ljava/lang/Integer;
|
||||
@@ -19462,13 +19940,15 @@ public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Rece
|
||||
public final fun component5 ()Z
|
||||
public final fun component6 ()Ljava/lang/String;
|
||||
public final fun component8 ()Z
|
||||
public final fun copy-xVLKMpc (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;Z)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;
|
||||
public static synthetic fun copy-xVLKMpc$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;
|
||||
public final fun component9 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public final fun copy-3gWu8WQ (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;
|
||||
public static synthetic fun copy-3gWu8WQ$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLdev/inmo/tgbotapi/types/TelegramDate;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getCanBeUpgraded ()Z
|
||||
public fun getConvertStarCount ()Ljava/lang/Integer;
|
||||
public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;
|
||||
public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift;
|
||||
public fun getNextTransferDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public synthetic fun getOwnedGiftId-FhTg01o ()Ljava/lang/String;
|
||||
public fun getOwnedGiftId-OyCYJok ()Ljava/lang/String;
|
||||
public fun getPrepaidUpgradeStarCount ()Ljava/lang/Integer;
|
||||
@@ -19496,23 +19976,32 @@ public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Rece
|
||||
public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Companion;
|
||||
public abstract fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;
|
||||
public abstract fun getLastResaleStarCount ()Ljava/lang/Integer;
|
||||
public abstract fun getOrigin ()Ljava/lang/String;
|
||||
public abstract fun getOriginTyped ()Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public abstract fun getTransferStarCount ()Ljava/lang/Integer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common$Companion;
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;
|
||||
public final fun component2 ()Ljava/lang/String;
|
||||
public final fun component2 ()Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public final fun component3 ()Ljava/lang/Integer;
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;
|
||||
public final fun component4 ()Ljava/lang/Integer;
|
||||
public final fun component5 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;
|
||||
public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift;
|
||||
public fun getLastResaleStarCount ()Ljava/lang/Integer;
|
||||
public fun getNextTransferDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public fun getOrigin ()Ljava/lang/String;
|
||||
public fun getOriginTyped ()Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public fun getOwnedGiftId-FhTg01o ()Ljava/lang/String;
|
||||
public fun getTransferStarCount ()Ljava/lang/Integer;
|
||||
public fun hashCode ()I
|
||||
@@ -19544,20 +20033,79 @@ public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Compa
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Companion;
|
||||
public abstract fun getString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Companion : kotlinx/serialization/KSerializer {
|
||||
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun fromString (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Resale : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Resale;
|
||||
public fun getString ()Ljava/lang/String;
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Transfer : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Transfer;
|
||||
public fun getString ()Ljava/lang/String;
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Unknown : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Unknown$Companion;
|
||||
public static final synthetic fun box-impl (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Unknown;
|
||||
public static fun constructor-impl (Ljava/lang/String;)Ljava/lang/String;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public static fun equals-impl (Ljava/lang/String;Ljava/lang/Object;)Z
|
||||
public static final fun equals-impl0 (Ljava/lang/String;Ljava/lang/String;)Z
|
||||
public fun getString ()Ljava/lang/String;
|
||||
public fun hashCode ()I
|
||||
public static fun hashCode-impl (Ljava/lang/String;)I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
public static fun toString-impl (Ljava/lang/String;)Ljava/lang/String;
|
||||
public final synthetic fun unbox-impl ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Unknown$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Upgrade : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin$Upgrade;
|
||||
public fun getString ()Ljava/lang/String;
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount, dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount$Companion;
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;
|
||||
public final fun component2-OyCYJok ()Ljava/lang/String;
|
||||
public final fun component3 ()Ljava/lang/String;
|
||||
public final fun component3 ()Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public final fun component4 ()Ljava/lang/Integer;
|
||||
public final fun copy-A6CMM0Q (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;
|
||||
public static synthetic fun copy-A6CMM0Q$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;
|
||||
public final fun component5 ()Ljava/lang/Integer;
|
||||
public final fun component6 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public final fun copy-gWCrhmI (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;
|
||||
public static synthetic fun copy-gWCrhmI$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/TelegramDate;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;
|
||||
public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift;
|
||||
public fun getLastResaleStarCount ()Ljava/lang/Integer;
|
||||
public fun getNextTransferDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||
public fun getOrigin ()Ljava/lang/String;
|
||||
public fun getOriginTyped ()Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Origin;
|
||||
public synthetic fun getOwnedGiftId-FhTg01o ()Ljava/lang/String;
|
||||
public fun getOwnedGiftId-OyCYJok ()Ljava/lang/String;
|
||||
public fun getTransferStarCount ()Ljava/lang/Integer;
|
||||
@@ -22635,6 +23183,34 @@ public final class dev/inmo/tgbotapi/types/message/content/AudioMediaGroupPartCo
|
||||
public static fun createResend-f_HYr08 (Ldev/inmo/tgbotapi/types/message/content/AudioMediaGroupPartContent;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/requests/abstracts/Request;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/message/content/ChecklistContent : dev/inmo/tgbotapi/types/message/content/MessageContent {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/message/content/ChecklistContent$Companion;
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;)V
|
||||
public final fun component1 ()Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;
|
||||
public final fun copy (Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public fun createResend-f_HYr08 (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageId;Ljava/lang/Boolean;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/requests/abstracts/Request;
|
||||
public fun createResend-rXDJoI8 (Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;)Ldev/inmo/tgbotapi/requests/abstracts/Request;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getChecklist ()Ldev/inmo/tgbotapi/types/checklists/Checklist$Created;
|
||||
public fun hashCode ()I
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/types/message/content/ChecklistContent$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/types/message/content/ChecklistContent$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;)V
|
||||
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/message/content/ChecklistContent$Companion {
|
||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/message/content/ContactContent : dev/inmo/tgbotapi/types/message/content/MessageContent {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/types/message/content/ContactContent$Companion;
|
||||
public fun <init> (Ldev/inmo/tgbotapi/types/Contact;)V
|
||||
|
||||
@@ -27,3 +27,12 @@ interface TextedOutput : ParsableOutput, EntitiesOutput
|
||||
interface TextedInput : TextedWithTextSources {
|
||||
override val textSources: List<TextSource>
|
||||
}
|
||||
|
||||
interface TitledInput : TextedInput {
|
||||
val title: String
|
||||
val titleTextSources: List<TextSource>
|
||||
override val text: String
|
||||
get() = title
|
||||
override val textSources: List<TextSource>
|
||||
get() = titleTextSources
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package dev.inmo.tgbotapi.bot
|
||||
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import io.ktor.utils.io.core.Closeable
|
||||
|
||||
/**
|
||||
@@ -11,6 +13,8 @@ import io.ktor.utils.io.core.Closeable
|
||||
* @see dev.inmo.tgbotapi.bot.Ktor.KtorRequestsExecutor
|
||||
*/
|
||||
interface RequestsExecutor : Closeable {
|
||||
val Log: KSLog
|
||||
get() = DefaultKTgBotAPIKSLog
|
||||
/**
|
||||
* Unsafe execution of incoming [request]. Can throw almost any exception. So, it is better to use
|
||||
* something like [dev.inmo.tgbotapi.extensions.utils.shortcuts.executeAsync] or
|
||||
|
||||
@@ -29,6 +29,7 @@ expect class KtorRequestsExecutor internal constructor(
|
||||
logger: KSLog,
|
||||
diff: Unit // just a diff property to know where constructor and where calling function with defaults
|
||||
) : BaseRequestsExecutor {
|
||||
override val Log: KSLog
|
||||
override suspend fun <T : Any> execute(request: Request<T>): T
|
||||
override fun close()
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class DefaultKtorRequestsExecutor internal constructor(
|
||||
private val logger: KSLog,
|
||||
diff: Unit
|
||||
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
||||
override val Log: KSLog = logger
|
||||
private val callsFactories: List<KtorCallFactory> = callsFactories.run {
|
||||
if (!excludeDefaultFactories) {
|
||||
this@DefaultKtorRequestsExecutor.logger.v { "Installing default factories" }
|
||||
|
||||
@@ -49,6 +49,7 @@ class MultipleClientKtorRequestsExecutor(
|
||||
logger: KSLog,
|
||||
clientFactory: () -> HttpClient,
|
||||
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
|
||||
override val Log: KSLog = logger
|
||||
private val requestExecutors = (0 until requestExecutorsCount).map {
|
||||
DefaultKtorRequestsExecutor(
|
||||
telegramAPIUrlsKeeper,
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package dev.inmo.tgbotapi.bot.multiserver
|
||||
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.tgbotapi.bot.ktor.KtorRequestsExecutorBuilder
|
||||
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||
import dev.inmo.tgbotapi.bot.RequestsExecutor
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||
import kotlinx.coroutines.*
|
||||
import kotlin.js.JsName
|
||||
@@ -29,6 +31,8 @@ class SimpleMultiServerRequestsExecutor(
|
||||
bots.forEach(TelegramBot::close)
|
||||
}
|
||||
) : RequestsExecutor {
|
||||
override val Log: KSLog
|
||||
get() = bots.firstNotNullOfOrNull { it.Log } ?: DefaultKTgBotAPIKSLog
|
||||
override suspend fun <T : Any> execute(request: Request<T>): T {
|
||||
var currentBot = bots.botSelector(-1, null)
|
||||
while (currentCoroutineContext().isActive) {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package dev.inmo.tgbotapi.requests.bot
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.chat.ExtendedBot
|
||||
import dev.inmo.tgbotapi.types.payments.stars.StarAmount
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
object GetMyStarBalance : SimpleRequest<StarAmount> {
|
||||
override fun method(): String = "getMyStarBalance"
|
||||
override val resultDeserializer: DeserializationStrategy<StarAmount>
|
||||
get() = StarAmount.serializer()
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package dev.inmo.tgbotapi.requests.edit.checklist
|
||||
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.EditChatMessage
|
||||
import dev.inmo.tgbotapi.requests.edit.abstracts.EditReplyMessage
|
||||
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.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.message.content.MessageContent
|
||||
import kotlinx.serialization.*
|
||||
|
||||
const val editMessageChecklistMethod = "editMessageChecklist"
|
||||
|
||||
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<ChecklistContent>>()
|
||||
|
||||
@Serializable
|
||||
data class EditMessageChecklist(
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@SerialName(messageIdField)
|
||||
override val messageId: MessageId,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId,
|
||||
@SerialName(checklistField)
|
||||
val checklist: Checklist.Input,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||
) : EditChatMessage<ChecklistContent>, EditReplyMessage {
|
||||
override fun method(): String = editMessageChecklistMethod
|
||||
override val resultDeserializer: DeserializationStrategy<ContentMessage<ChecklistContent>>
|
||||
get() = commonResultDeserializer
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package dev.inmo.tgbotapi.requests.send
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.types.AllowPaidBroadcast
|
||||
import dev.inmo.tgbotapi.abstracts.types.DisableNotification
|
||||
import dev.inmo.tgbotapi.abstracts.types.OptionallyWithEffectId
|
||||
import dev.inmo.tgbotapi.abstracts.types.ProtectContent
|
||||
import dev.inmo.tgbotapi.abstracts.types.WithBusinessConnectionId
|
||||
import dev.inmo.tgbotapi.abstracts.types.WithReplyMarkup
|
||||
import dev.inmo.tgbotapi.abstracts.types.WithReplyParameters
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.OptionallyMessageThreadRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendChatMessageRequest
|
||||
import dev.inmo.tgbotapi.requests.send.abstracts.SendContentMessageRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.message.content.GameContent
|
||||
import kotlinx.serialization.*
|
||||
|
||||
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<ChecklistContent>>
|
||||
= TelegramBotAPIMessageDeserializationStrategyClass()
|
||||
|
||||
@Serializable
|
||||
data class SendChecklist (
|
||||
@SerialName(chatIdField)
|
||||
override val chatId: ChatIdentifier,
|
||||
@SerialName(checklistField)
|
||||
val checklist: Checklist.Input,
|
||||
@SerialName(businessConnectionIdField)
|
||||
override val businessConnectionId: BusinessConnectionId,
|
||||
@SerialName(disableNotificationField)
|
||||
override val disableNotification: Boolean = false,
|
||||
@SerialName(protectContentField)
|
||||
override val protectContent: Boolean = false,
|
||||
@SerialName(messageEffectIdField)
|
||||
override val effectId: EffectId? = null,
|
||||
@SerialName(replyParametersField)
|
||||
override val replyParameters: ReplyParameters? = null,
|
||||
@SerialName(replyMarkupField)
|
||||
override val replyMarkup: KeyboardMarkup? = null
|
||||
) : SendChatMessageRequest<ContentMessage<ChecklistContent>>,
|
||||
WithReplyParameters,
|
||||
DisableNotification,
|
||||
ProtectContent,
|
||||
OptionallyWithEffectId,
|
||||
WithBusinessConnectionId,
|
||||
WithReplyMarkup {
|
||||
constructor(
|
||||
chatId: BusinessChatId,
|
||||
checklist: Checklist.Input,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
effectId: EffectId? = null,
|
||||
replyParameters: ReplyParameters? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) : this(
|
||||
chatId = chatId,
|
||||
checklist = checklist,
|
||||
businessConnectionId = chatId.businessConnectionId,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = replyParameters,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
|
||||
override fun method(): String = "sendChecklist"
|
||||
override val resultDeserializer: DeserializationStrategy<ContentMessage<ChecklistContent>>
|
||||
get() = commonResultDeserializer
|
||||
override val requestSerializer: SerializationStrategy<*>
|
||||
get() = serializer()
|
||||
}
|
||||
@@ -71,7 +71,7 @@ val invoicePayloadBytesLimit = 1 until 128
|
||||
|
||||
val pollOptionTextLength = 1 .. 100
|
||||
val pollQuestionTextLength = 1 .. 300
|
||||
val pollOptionsLimit = 2 .. 10
|
||||
val pollOptionsLimit = 2 .. 12
|
||||
|
||||
val livePeriodLimit = 60 .. LiveLocation.INDEFINITE_LIVE_PERIOD
|
||||
|
||||
@@ -308,6 +308,16 @@ const val pendingJoinRequestCountField = "pending_join_request_count"
|
||||
const val memberLimitField = "member_limit"
|
||||
const val iconColorField = "icon_color"
|
||||
const val emojiListField = "emoji_list"
|
||||
const val completedByUserField = "completed_by_user"
|
||||
const val completionDateField = "completion_date"
|
||||
const val titleEntitiesField = "title_entities"
|
||||
const val tasksField = "tasks"
|
||||
const val othersCanAddTasksField = "others_can_add_tasks"
|
||||
const val othersCanMarkTasksAsDoneField = "others_can_mark_tasks_as_done"
|
||||
const val checklistField = "checklist"
|
||||
const val checklistMessageField = "checklist_message"
|
||||
const val markedAsDoneTaskIdsField = "marked_as_done_task_ids"
|
||||
const val markedAsNotDoneTaskIdsField = "marked_as_not_done_task_ids"
|
||||
|
||||
const val requestContactField = "request_contact"
|
||||
const val requestLocationField = "request_location"
|
||||
@@ -524,7 +534,9 @@ const val convertStarCountField = "convert_star_count"
|
||||
const val prepaidUpgradeStarCountField = "prepaid_upgrade_star_count"
|
||||
const val canBeUpgradedField = "can_be_upgraded"
|
||||
const val isPrivateField = "is_private"
|
||||
const val nextTransferDateField = "next_transfer_date"
|
||||
const val transferStarCountField = "transfer_star_count"
|
||||
const val lastResaleStarCountField = "last_resale_star_count"
|
||||
const val newOwnerChatIdField = "new_owner_chat_id"
|
||||
|
||||
const val pointField = "point"
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChannelEvent
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
||||
sealed interface ChannelDirectMessagesConfigurationChanged : ChannelEvent {
|
||||
val enabled: Boolean
|
||||
val cost: Int?
|
||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
||||
data object Disabled : ChannelDirectMessagesConfigurationChanged {
|
||||
override val enabled: Boolean
|
||||
get() = false
|
||||
override val cost: Int?
|
||||
get() = null
|
||||
}
|
||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
||||
data object Free : ChannelDirectMessagesConfigurationChanged {
|
||||
override val enabled: Boolean
|
||||
get() = true
|
||||
override val cost: Int
|
||||
get() = 0
|
||||
}
|
||||
@Serializable(ChannelDirectMessagesConfigurationChanged.Companion::class)
|
||||
data class Paid(
|
||||
override val cost: Int
|
||||
) : ChannelDirectMessagesConfigurationChanged {
|
||||
override val enabled: Boolean
|
||||
get() = true
|
||||
}
|
||||
|
||||
companion object : KSerializer<ChannelDirectMessagesConfigurationChanged> {
|
||||
@Serializable
|
||||
private data class RawDirectMessagePriceChanged(
|
||||
val are_direct_messages_enabled: Boolean = false,
|
||||
val direct_message_star_count: Int? = null
|
||||
)
|
||||
override val descriptor: SerialDescriptor
|
||||
get() = RawDirectMessagePriceChanged.serializer().descriptor
|
||||
|
||||
override fun serialize(
|
||||
encoder: Encoder,
|
||||
value: ChannelDirectMessagesConfigurationChanged
|
||||
) {
|
||||
RawDirectMessagePriceChanged.serializer().serialize(
|
||||
encoder,
|
||||
RawDirectMessagePriceChanged(
|
||||
value.enabled,
|
||||
value.cost
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun deserialize(decoder: Decoder): ChannelDirectMessagesConfigurationChanged {
|
||||
val raw = RawDirectMessagePriceChanged.serializer().deserialize(decoder)
|
||||
|
||||
return when {
|
||||
raw.are_direct_messages_enabled == false -> Disabled
|
||||
raw.direct_message_star_count == null || raw.direct_message_star_count == 0 -> Free
|
||||
else -> Paid(
|
||||
raw.direct_message_star_count
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.types
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.SpoilerableData
|
||||
import dev.inmo.tgbotapi.types.chat.SuperPublicChat
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.dice.Dice
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.games.RawGame
|
||||
@@ -105,6 +106,7 @@ sealed interface ReplyInfo {
|
||||
private val invoice: Invoice? = null,
|
||||
private val dice: Dice? = null,
|
||||
private val giveaway: Giveaway? = null,
|
||||
private val checklist: Checklist.Created? = null,
|
||||
private val giveaway_winners: GiveawayPublicResults? = null,
|
||||
) {
|
||||
val asExternalReplyInfo: External
|
||||
@@ -137,6 +139,7 @@ sealed interface ReplyInfo {
|
||||
invoice != null -> invoice
|
||||
giveaway != null -> giveaway
|
||||
giveaway_winners != null -> giveaway_winners
|
||||
checklist != null -> checklist
|
||||
else -> null
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
package dev.inmo.tgbotapi.types.checklists
|
||||
|
||||
import dev.inmo.micro_utils.common.Warning
|
||||
import dev.inmo.tgbotapi.abstracts.TitledInput
|
||||
import dev.inmo.tgbotapi.types.ReplyInfo
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTask.Input
|
||||
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.parseModeField
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.othersCanAddTasksField
|
||||
import dev.inmo.tgbotapi.types.othersCanMarkTasksAsDoneField
|
||||
import dev.inmo.tgbotapi.types.tasksField
|
||||
import dev.inmo.tgbotapi.types.titleEntitiesField
|
||||
import dev.inmo.tgbotapi.types.titleField
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilder
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
|
||||
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
|
||||
sealed interface Checklist : TitledInput {
|
||||
val tasks: List<ChecklistTask>
|
||||
val othersCanAddTasks: Boolean
|
||||
val othersCanCompleteTasks: Boolean
|
||||
@Serializable(Input.Companion::class)
|
||||
data class Input @Warning("It is low level API. Do not use it without need") constructor(
|
||||
@SerialName(titleField)
|
||||
override val title: String,
|
||||
@SerialName(tasksField)
|
||||
override val tasks: List<ChecklistTask.Input>,
|
||||
@SerialName(parseModeField)
|
||||
val parseMode: ParseMode? = null,
|
||||
@SerialName(titleEntitiesField)
|
||||
override val titleTextSources: List<TextSource> = emptyList(),
|
||||
@SerialName(othersCanAddTasksField)
|
||||
override val othersCanAddTasks: Boolean = false,
|
||||
@SerialName(othersCanMarkTasksAsDoneField)
|
||||
override val othersCanCompleteTasks: Boolean = false,
|
||||
) : Checklist {
|
||||
constructor(
|
||||
text: String,
|
||||
tasks: List<ChecklistTask.Input>,
|
||||
parseMode: ParseMode? = null,
|
||||
othersCanAddTasks: Boolean = false,
|
||||
othersCanCompleteTasks: Boolean = false,
|
||||
) : this(
|
||||
title = text,
|
||||
parseMode = parseMode,
|
||||
titleTextSources = emptyList(),
|
||||
tasks = tasks,
|
||||
othersCanAddTasks = othersCanAddTasks,
|
||||
othersCanCompleteTasks = othersCanCompleteTasks
|
||||
)
|
||||
constructor(
|
||||
titleTextSources: List<TextSource>,
|
||||
tasks: List<ChecklistTask.Input>,
|
||||
othersCanAddTasks: Boolean = false,
|
||||
othersCanCompleteTasks: Boolean = false,
|
||||
) : this(
|
||||
title = titleTextSources.makeSourceString(),
|
||||
parseMode = null,
|
||||
titleTextSources = titleTextSources,
|
||||
tasks = tasks,
|
||||
othersCanAddTasks = othersCanAddTasks,
|
||||
othersCanCompleteTasks = othersCanCompleteTasks
|
||||
)
|
||||
constructor(
|
||||
tasks: List<ChecklistTask.Input>,
|
||||
othersCanAddTasks: Boolean = false,
|
||||
othersCanCompleteTasks: Boolean = false,
|
||||
builderBody: EntitiesBuilderBody
|
||||
) : this(
|
||||
titleTextSources = EntitiesBuilder().apply(builderBody).build(),
|
||||
tasks = tasks,
|
||||
othersCanAddTasks = othersCanAddTasks,
|
||||
othersCanCompleteTasks = othersCanCompleteTasks
|
||||
)
|
||||
|
||||
companion object : KSerializer<Input> {
|
||||
@Serializable
|
||||
private class RawChecklist(
|
||||
val title: String,
|
||||
val parseMode: ParseMode? = null,
|
||||
val title_entities: List<RawMessageEntity> = emptyList(),
|
||||
val tasks: List<ChecklistTask.Input>,
|
||||
val others_can_add_tasks: Boolean = false,
|
||||
val others_can_mark_tasks_as_done: Boolean = false,
|
||||
)
|
||||
override val descriptor: SerialDescriptor = RawChecklist.serializer().descriptor
|
||||
|
||||
override fun serialize(
|
||||
encoder: Encoder,
|
||||
value: Input
|
||||
) {
|
||||
RawChecklist.serializer().serialize(
|
||||
encoder,
|
||||
RawChecklist(
|
||||
title = value.title,
|
||||
title_entities = value.titleTextSources.toRawMessageEntities(),
|
||||
tasks = value.tasks,
|
||||
parseMode = value.parseMode,
|
||||
others_can_add_tasks = value.othersCanAddTasks,
|
||||
others_can_mark_tasks_as_done = value.othersCanCompleteTasks,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun deserialize(decoder: Decoder): Input {
|
||||
val raw = RawChecklist.serializer().deserialize(decoder)
|
||||
return Input(
|
||||
title = raw.title,
|
||||
titleTextSources = raw.title_entities.asTextSources(raw.title),
|
||||
tasks = raw.tasks,
|
||||
parseMode = raw.parseMode,
|
||||
othersCanAddTasks = raw.others_can_add_tasks,
|
||||
othersCanCompleteTasks = raw.others_can_mark_tasks_as_done
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable(Created.Companion::class)
|
||||
data class Created(
|
||||
override val titleTextSources: List<TextSource>,
|
||||
@SerialName(tasksField)
|
||||
override val tasks: List<ChecklistTask.Created>,
|
||||
@SerialName(othersCanAddTasksField)
|
||||
override val othersCanAddTasks: Boolean = false,
|
||||
@SerialName(othersCanMarkTasksAsDoneField)
|
||||
override val othersCanCompleteTasks: Boolean = false,
|
||||
): Checklist, ReplyInfo.External.ContentVariant {
|
||||
override val title: String by lazy {
|
||||
titleTextSources.makeSourceString()
|
||||
}
|
||||
|
||||
companion object : KSerializer<Created> {
|
||||
@Serializable
|
||||
private class RawChecklist(
|
||||
val title: String,
|
||||
val title_entities: List<RawMessageEntity> = emptyList(),
|
||||
val tasks: List<ChecklistTask.Created>,
|
||||
val others_can_add_tasks: Boolean = false,
|
||||
val others_can_mark_tasks_as_done: Boolean = false,
|
||||
)
|
||||
override val descriptor: SerialDescriptor = RawChecklist.serializer().descriptor
|
||||
|
||||
override fun serialize(
|
||||
encoder: Encoder,
|
||||
value: Created
|
||||
) {
|
||||
RawChecklist.serializer().serialize(
|
||||
encoder,
|
||||
RawChecklist(
|
||||
title = value.title,
|
||||
title_entities = value.titleTextSources.toRawMessageEntities(),
|
||||
tasks = value.tasks,
|
||||
others_can_add_tasks = value.othersCanAddTasks,
|
||||
others_can_mark_tasks_as_done = value.othersCanCompleteTasks,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun deserialize(decoder: Decoder): Created {
|
||||
val raw = RawChecklist.serializer().deserialize(decoder)
|
||||
return Created(
|
||||
titleTextSources = raw.title_entities.asTextSources(raw.title),
|
||||
tasks = raw.tasks,
|
||||
othersCanAddTasks = raw.others_can_add_tasks,
|
||||
othersCanCompleteTasks = raw.others_can_mark_tasks_as_done
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
package dev.inmo.tgbotapi.types.checklists
|
||||
|
||||
import dev.inmo.micro_utils.common.Warning
|
||||
import dev.inmo.tgbotapi.abstracts.TextedInput
|
||||
import dev.inmo.tgbotapi.abstracts.TitledInput
|
||||
import dev.inmo.tgbotapi.types.TelegramDate
|
||||
import dev.inmo.tgbotapi.types.chat.PreviewUser
|
||||
import dev.inmo.tgbotapi.types.completedByUserField
|
||||
import dev.inmo.tgbotapi.types.completionDateField
|
||||
import dev.inmo.tgbotapi.types.idField
|
||||
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.parseModeField
|
||||
import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.message.toRawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.tasksField
|
||||
import dev.inmo.tgbotapi.types.textEntitiesField
|
||||
import dev.inmo.tgbotapi.types.textField
|
||||
import dev.inmo.tgbotapi.types.textParseModeField
|
||||
import dev.inmo.tgbotapi.types.titleEntitiesField
|
||||
import dev.inmo.tgbotapi.types.titleField
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilder
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import dev.inmo.tgbotapi.utils.extensions.makeSourceString
|
||||
import kotlinx.serialization.EncodeDefault
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
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
|
||||
sealed interface ChecklistTask : TextedInput {
|
||||
val id: ChecklistTaskId
|
||||
override val text: String
|
||||
|
||||
@Serializable(Input.Companion::class)
|
||||
data class Input @Warning("It is low level API. Do not use it without need") constructor(
|
||||
@SerialName(idField)
|
||||
override val id: ChecklistTaskId,
|
||||
@SerialName(textField)
|
||||
override val text: String,
|
||||
@SerialName(textParseModeField)
|
||||
val parseMode: ParseMode? = null,
|
||||
@SerialName(textEntitiesField)
|
||||
override val textSources: List<TextSource> = emptyList(),
|
||||
) : ChecklistTask {
|
||||
constructor(id: ChecklistTaskId, text: String, parseMode: ParseMode? = null) : this(
|
||||
id = id,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
textSources = emptyList()
|
||||
)
|
||||
constructor(id: ChecklistTaskId, textSources: List<TextSource>) : this(
|
||||
id = id,
|
||||
text = textSources.makeSourceString(),
|
||||
parseMode = null,
|
||||
textSources = textSources
|
||||
)
|
||||
constructor(id: ChecklistTaskId, builderBody: EntitiesBuilderBody) : this(
|
||||
id = id,
|
||||
textSources = EntitiesBuilder().apply(builderBody).build()
|
||||
)
|
||||
|
||||
companion object : KSerializer<Input> {
|
||||
@Serializable
|
||||
private data class RawInput(
|
||||
@SerialName(idField)
|
||||
val id: ChecklistTaskId,
|
||||
@SerialName(textField)
|
||||
val text: String,
|
||||
@SerialName(textParseModeField)
|
||||
val parseMode: ParseMode? = null,
|
||||
@SerialName(textEntitiesField)
|
||||
val textSources: List<RawMessageEntity> = emptyList(),
|
||||
)
|
||||
override val descriptor: SerialDescriptor
|
||||
get() = RawInput.serializer().descriptor
|
||||
|
||||
override fun deserialize(decoder: Decoder): Input {
|
||||
val raw = RawInput.serializer().deserialize(decoder)
|
||||
return Input(
|
||||
raw.id,
|
||||
raw.text,
|
||||
raw.parseMode,
|
||||
raw.textSources.asTextSources(raw.text)
|
||||
)
|
||||
}
|
||||
|
||||
override fun serialize(encoder: Encoder, value: Input) {
|
||||
RawInput.serializer().serialize(
|
||||
encoder,
|
||||
RawInput(
|
||||
value.id,
|
||||
value.text,
|
||||
value.parseMode,
|
||||
value.textSources.toRawMessageEntities()
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable(Created.Serializer::class)
|
||||
data class Undone(
|
||||
@SerialName(idField)
|
||||
override val id: ChecklistTaskId,
|
||||
@SerialName(textEntitiesField)
|
||||
override val textSources: List<TextSource> = emptyList(),
|
||||
) : ChecklistTask.Created {
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@EncodeDefault
|
||||
@Serializable
|
||||
@SerialName(textField)
|
||||
override val text: String = textSources.makeSourceString()
|
||||
|
||||
constructor(id: ChecklistTaskId, text: String): this(
|
||||
id,
|
||||
listOf(
|
||||
RegularTextSource(text)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@Serializable(Created.Serializer::class)
|
||||
data class Done(
|
||||
@SerialName(idField)
|
||||
override val id: ChecklistTaskId,
|
||||
@SerialName(completedByUserField)
|
||||
override val completedByUser: PreviewUser,
|
||||
@SerialName(completionDateField)
|
||||
override val completionDate: TelegramDate,
|
||||
@SerialName(textEntitiesField)
|
||||
override val textSources: List<TextSource> = emptyList()
|
||||
) : ChecklistTask.Created {
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
@EncodeDefault
|
||||
@Serializable
|
||||
@SerialName(textField)
|
||||
override val text: String = textSources.makeSourceString()
|
||||
|
||||
constructor(
|
||||
id: ChecklistTaskId,
|
||||
text: String,
|
||||
completedByUser: PreviewUser,
|
||||
completionDate: TelegramDate,
|
||||
): this(
|
||||
id,
|
||||
completedByUser,
|
||||
completionDate,
|
||||
listOf(
|
||||
RegularTextSource(text)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@Serializable(Created.Serializer::class)
|
||||
sealed interface Created : ChecklistTask {
|
||||
val completedByUser: PreviewUser?
|
||||
get() = null
|
||||
val completionDate: TelegramDate?
|
||||
get() = null
|
||||
|
||||
@RiskFeature
|
||||
object Serializer : KSerializer<Created> {
|
||||
@Serializable
|
||||
private data class RawCreatedChecklistTask(
|
||||
@SerialName(idField)
|
||||
val id: ChecklistTaskId,
|
||||
@SerialName(textField)
|
||||
val text: String,
|
||||
@SerialName(textEntitiesField)
|
||||
val textSources: List<RawMessageEntity> = emptyList(),
|
||||
@SerialName(completedByUserField)
|
||||
val completedByUser: PreviewUser? = null,
|
||||
@SerialName(completionDateField)
|
||||
val completionDate: TelegramDate = TelegramDate(0), // TelegramDate(0) is the default according to https://core.telegram.org/bots/api#checklisttask
|
||||
)
|
||||
override val descriptor: SerialDescriptor = RawCreatedChecklistTask.serializer().descriptor
|
||||
|
||||
override fun deserialize(decoder: Decoder): Created {
|
||||
val raw = RawCreatedChecklistTask.serializer().deserialize(
|
||||
decoder
|
||||
)
|
||||
|
||||
return when {
|
||||
raw.completedByUser != null -> Done(
|
||||
id = raw.id,
|
||||
completedByUser = raw.completedByUser,
|
||||
completionDate = raw.completionDate,
|
||||
textSources = raw.textSources.asTextSources(raw.text),
|
||||
)
|
||||
else -> Undone(
|
||||
id = raw.id,
|
||||
textSources = raw.textSources.asTextSources(raw.text),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun serialize(encoder: Encoder, value: Created) {
|
||||
RawCreatedChecklistTask.serializer().serialize(
|
||||
encoder,
|
||||
RawCreatedChecklistTask(
|
||||
id = value.id,
|
||||
text = value.text,
|
||||
completedByUser = value.completedByUser,
|
||||
completionDate = value.completionDate ?: TelegramDate(0),
|
||||
textSources = value.textSources.toRawMessageEntities()
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package dev.inmo.tgbotapi.types.checklists
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class ChecklistTaskId(
|
||||
val int: UInt
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
package dev.inmo.tgbotapi.types.checklists
|
||||
|
||||
import dev.inmo.tgbotapi.types.checklistMessageField
|
||||
import dev.inmo.tgbotapi.types.markedAsDoneTaskIdsField
|
||||
import dev.inmo.tgbotapi.types.markedAsNotDoneTaskIdsField
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import dev.inmo.tgbotapi.types.message.RawMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.tasksField
|
||||
import dev.inmo.tgbotapi.types.userField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ChecklistTasksAdded(
|
||||
@SerialName(checklistMessageField)
|
||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializerClass::class)
|
||||
val checklistMessage: CommonMessage<ChecklistContent>,
|
||||
@SerialName(tasksField)
|
||||
val tasks: List<ChecklistTask.Created>,
|
||||
) : CommonEvent
|
||||
@@ -0,0 +1,23 @@
|
||||
package dev.inmo.tgbotapi.types.checklists
|
||||
|
||||
import dev.inmo.tgbotapi.types.checklistMessageField
|
||||
import dev.inmo.tgbotapi.types.markedAsDoneTaskIdsField
|
||||
import dev.inmo.tgbotapi.types.markedAsNotDoneTaskIdsField
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.userField
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ChecklistTasksDone(
|
||||
@SerialName(checklistMessageField)
|
||||
@Serializable(TelegramBotAPIMessageDeserializeOnlySerializerClass::class)
|
||||
val checklistMessage: CommonMessage<ChecklistContent>,
|
||||
@SerialName(markedAsDoneTaskIdsField)
|
||||
val markedAsDone: List<ChecklistTaskId>? = null,
|
||||
@SerialName(markedAsNotDoneTaskIdsField)
|
||||
val markedAsNotDone: List<ChecklistTaskId>? = null,
|
||||
) : CommonEvent
|
||||
@@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.types.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.TextedInput
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique.Common
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent
|
||||
import dev.inmo.tgbotapi.types.message.RawMessageEntities
|
||||
import dev.inmo.tgbotapi.types.message.asTextSources
|
||||
@@ -9,17 +10,21 @@ 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.internal.ClassCastsIncluded
|
||||
import kotlinx.serialization.EncodeDefault
|
||||
import kotlinx.serialization.KSerializer
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.Transient
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
import kotlinx.serialization.descriptors.SerialDescriptor
|
||||
import kotlinx.serialization.encoding.Decoder
|
||||
import kotlinx.serialization.encoding.Encoder
|
||||
import kotlin.jvm.JvmInline
|
||||
import kotlin.jvm.JvmName
|
||||
|
||||
|
||||
/**
|
||||
* Represent Telegram Bots API abstraction [GiftInfo](https://core.telegram.org/bots/api#giftinfo) and
|
||||
* Represent Telegram Bots API abstraction [OwnedGiftUnique](https://core.telegram.org/bots/api#giftinfo) and
|
||||
* [UniqueGiftInfo](https://core.telegram.org/bots/api#uniquegiftinfo)
|
||||
*
|
||||
* @see ReceivedInBusinessAccount
|
||||
@@ -32,6 +37,7 @@ import kotlin.jvm.JvmName
|
||||
sealed interface GiftSentOrReceived : CommonEvent {
|
||||
val ownedGiftId: GiftId?
|
||||
val gift: Gift
|
||||
val nextTransferDate: TelegramDate?
|
||||
|
||||
@Serializable
|
||||
sealed interface ReceivedInBusinessAccount : GiftSentOrReceived {
|
||||
@@ -61,7 +67,9 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
@SerialName(entitiesField)
|
||||
private val entities: RawMessageEntities? = null,
|
||||
@SerialName(isPrivateField)
|
||||
override val isPrivate: Boolean = false
|
||||
override val isPrivate: Boolean = false,
|
||||
@SerialName(nextTransferDateField)
|
||||
override val nextTransferDate: TelegramDate? = null
|
||||
) : Regular {
|
||||
override val textSources: List<TextSource> by lazy {
|
||||
entities ?.asTextSources(text ?: return@lazy emptyList()) ?: emptyList()
|
||||
@@ -87,7 +95,9 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
@SerialName(entitiesField)
|
||||
private val entities: RawMessageEntities? = null,
|
||||
@SerialName(isPrivateField)
|
||||
override val isPrivate: Boolean = false
|
||||
override val isPrivate: Boolean = false,
|
||||
@SerialName(nextTransferDateField)
|
||||
override val nextTransferDate: TelegramDate? = null
|
||||
) : Regular, GiftSentOrReceived.ReceivedInBusinessAccount {
|
||||
override val textSources: List<TextSource> by lazy {
|
||||
entities ?.asTextSources(text ?: return@lazy emptyList()) ?: emptyList()
|
||||
@@ -112,7 +122,9 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
@SerialName(entitiesField)
|
||||
val entities: RawMessageEntities? = null,
|
||||
@SerialName(isPrivateField)
|
||||
val isPrivate: Boolean = false
|
||||
val isPrivate: Boolean = false,
|
||||
@SerialName(nextTransferDateField)
|
||||
val nextTransferDate: TelegramDate? = null
|
||||
)
|
||||
|
||||
override val descriptor: SerialDescriptor
|
||||
@@ -137,7 +149,8 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
canBeUpgraded = surrogate.canBeUpgraded,
|
||||
text = surrogate.text,
|
||||
entities = surrogate.entities,
|
||||
isPrivate = surrogate.isPrivate
|
||||
isPrivate = surrogate.isPrivate,
|
||||
nextTransferDate = surrogate.nextTransferDate
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
@@ -149,7 +162,8 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
canBeUpgraded = surrogate.canBeUpgraded,
|
||||
text = surrogate.text,
|
||||
entities = surrogate.entities,
|
||||
isPrivate = surrogate.isPrivate
|
||||
isPrivate = surrogate.isPrivate,
|
||||
nextTransferDate = surrogate.nextTransferDate
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -192,19 +206,80 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
sealed interface Unique : GiftSentOrReceived {
|
||||
override val gift: Gift.Unique
|
||||
val origin: String?
|
||||
val originTyped: Origin?
|
||||
val lastResaleStarCount: Int?
|
||||
val transferStarCount: Int?
|
||||
|
||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||
@Serializable(Origin.Companion::class)
|
||||
sealed interface Origin {
|
||||
val string: String
|
||||
@Serializable(Origin.Companion::class)
|
||||
object Upgrade : Origin { override val string: String = "upgrade" }
|
||||
@Serializable(Origin.Companion::class)
|
||||
object Transfer : Origin { override val string: String = "transfer" }
|
||||
@Serializable(Origin.Companion::class)
|
||||
object Resale : Origin { override val string: String = "resale" }
|
||||
@Serializable(Origin.Companion::class)
|
||||
@JvmInline
|
||||
value class Unknown(override val string: String) : Origin
|
||||
|
||||
companion object : KSerializer<Origin> {
|
||||
override val descriptor: SerialDescriptor = String.serializer().descriptor
|
||||
|
||||
fun fromString(value: String): Origin = when (value) {
|
||||
Upgrade.string -> Upgrade
|
||||
Transfer.string -> Transfer
|
||||
Resale.string -> Resale
|
||||
else -> Unknown(value)
|
||||
}
|
||||
|
||||
override fun deserialize(decoder: Decoder): Origin {
|
||||
val value = decoder.decodeString()
|
||||
return fromString(value)
|
||||
}
|
||||
|
||||
override fun serialize(
|
||||
encoder: Encoder,
|
||||
value: Origin
|
||||
) {
|
||||
encoder.encodeString(value.string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Serializable
|
||||
data class Common(
|
||||
@SerialName(giftField)
|
||||
override val gift: Gift.Unique,
|
||||
@SerialName(originField)
|
||||
override val origin: String? = null,
|
||||
override val originTyped: Origin? = null,
|
||||
@SerialName(lastResaleStarCountField)
|
||||
override val lastResaleStarCount: Int? = null,
|
||||
@SerialName(transferStarCountField)
|
||||
override val transferStarCount: Int? = null
|
||||
override val transferStarCount: Int? = null,
|
||||
@SerialName(nextTransferDateField)
|
||||
override val nextTransferDate: TelegramDate? = null
|
||||
) : Unique {
|
||||
override val ownedGiftId: GiftId?
|
||||
get() = null
|
||||
|
||||
@Transient
|
||||
override val origin: String? = originTyped ?.string
|
||||
|
||||
constructor(
|
||||
gift: Gift.Unique,
|
||||
origin: String?,
|
||||
lastResaleStarCount: Int? = null,
|
||||
transferStarCount: Int? = null,
|
||||
nextTransferDate: TelegramDate? = null
|
||||
) : this(
|
||||
gift,
|
||||
origin ?.let { Origin.fromString(it) },
|
||||
lastResaleStarCount,
|
||||
transferStarCount,
|
||||
nextTransferDate
|
||||
)
|
||||
}
|
||||
|
||||
@Serializable
|
||||
@@ -214,10 +289,33 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
@SerialName(ownedGiftIdField)
|
||||
override val ownedGiftId: GiftId,
|
||||
@SerialName(originField)
|
||||
override val origin: String? = null,
|
||||
override val originTyped: Origin? = null,
|
||||
@SerialName(lastResaleStarCountField)
|
||||
override val lastResaleStarCount: Int? = null,
|
||||
@SerialName(transferStarCountField)
|
||||
override val transferStarCount: Int? = null
|
||||
) : Unique, GiftSentOrReceived.ReceivedInBusinessAccount
|
||||
override val transferStarCount: Int? = null,
|
||||
@SerialName(nextTransferDateField)
|
||||
override val nextTransferDate: TelegramDate? = null
|
||||
) : Unique, GiftSentOrReceived.ReceivedInBusinessAccount {
|
||||
@Transient
|
||||
override val origin: String? = originTyped ?.string
|
||||
|
||||
constructor(
|
||||
gift: Gift.Unique,
|
||||
ownedGiftId: GiftId,
|
||||
origin: String? = null,
|
||||
lastResaleStarCount: Int? = null,
|
||||
transferStarCount: Int? = null,
|
||||
nextTransferDate: TelegramDate? = null
|
||||
) : this(
|
||||
gift = gift,
|
||||
ownedGiftId = ownedGiftId,
|
||||
originTyped = origin ?.let { Origin.fromString(it) },
|
||||
lastResaleStarCount = lastResaleStarCount,
|
||||
transferStarCount = transferStarCount,
|
||||
nextTransferDate = nextTransferDate
|
||||
)
|
||||
}
|
||||
|
||||
companion object : KSerializer<GiftSentOrReceived.Unique> {
|
||||
@Serializable
|
||||
@@ -227,9 +325,13 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
@SerialName(ownedGiftIdField)
|
||||
val ownedGiftId: GiftId? = null,
|
||||
@SerialName(originField)
|
||||
val origin: String? = null,
|
||||
val origin: Origin? = null,
|
||||
@SerialName(lastResaleStarCountField)
|
||||
val lastResaleStarCount: Int? = null,
|
||||
@SerialName(transferStarCountField)
|
||||
val transferStarCount: Int? = null
|
||||
val transferStarCount: Int? = null,
|
||||
@SerialName(nextTransferDateField)
|
||||
val nextTransferDate: TelegramDate? = null
|
||||
)
|
||||
|
||||
override val descriptor: SerialDescriptor
|
||||
@@ -249,16 +351,20 @@ sealed interface GiftSentOrReceived : CommonEvent {
|
||||
surrogate.ownedGiftId == null -> {
|
||||
Common(
|
||||
gift = surrogate.gift,
|
||||
origin = surrogate.origin,
|
||||
transferStarCount = surrogate.transferStarCount
|
||||
originTyped = surrogate.origin,
|
||||
lastResaleStarCount = surrogate.lastResaleStarCount,
|
||||
transferStarCount = surrogate.transferStarCount,
|
||||
nextTransferDate = surrogate.nextTransferDate
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
ReceivedInBusinessAccount(
|
||||
gift = surrogate.gift,
|
||||
ownedGiftId = surrogate.ownedGiftId,
|
||||
origin = surrogate.origin,
|
||||
transferStarCount = surrogate.transferStarCount
|
||||
originTyped = surrogate.origin,
|
||||
lastResaleStarCount = surrogate.lastResaleStarCount,
|
||||
transferStarCount = surrogate.transferStarCount,
|
||||
nextTransferDate = surrogate.nextTransferDate
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chat.CommonBot
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.dice.Dice
|
||||
import dev.inmo.tgbotapi.types.files.*
|
||||
import dev.inmo.tgbotapi.types.files.Sticker
|
||||
@@ -165,6 +168,14 @@ internal data class RawMessage(
|
||||
private val giveaway_winners: GiveawayPublicResults? = null,
|
||||
private val giveaway_completed: GiveawayPrivateResults? = null,
|
||||
|
||||
// Checklists
|
||||
private val checklist: Checklist.Created? = null,
|
||||
private val checklist_tasks_done: ChecklistTasksDone? = null,
|
||||
private val checklist_tasks_added: ChecklistTasksAdded? = null,
|
||||
|
||||
// Channel direct messages
|
||||
private val direct_message_price_changed: ChannelDirectMessagesConfigurationChanged? = null,
|
||||
|
||||
// Gifts
|
||||
private val gift: GiftSentOrReceived.Regular? = null,
|
||||
private val unique_gift: GiftSentOrReceived.Unique? = null,
|
||||
@@ -240,6 +251,7 @@ internal data class RawMessage(
|
||||
venue != null -> VenueContent(venue)
|
||||
poll != null -> PollContent(poll)
|
||||
invoice != null -> InvoiceContent(invoice)
|
||||
checklist != null -> ChecklistContent(checklist)
|
||||
giveaway != null -> GiveawayContent(chat, messageId, giveaway)
|
||||
giveaway_winners is GiveawayPublicResults -> GiveawayPublicResultsContent(giveaway_winners)
|
||||
else -> null
|
||||
@@ -293,6 +305,9 @@ internal data class RawMessage(
|
||||
paid_message_price_changed != null -> paid_message_price_changed
|
||||
gift != null -> gift
|
||||
unique_gift != null -> unique_gift
|
||||
checklist_tasks_done != null -> checklist_tasks_done
|
||||
checklist_tasks_added != null -> checklist_tasks_added
|
||||
direct_message_price_changed != null -> direct_message_price_changed
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package dev.inmo.tgbotapi.types.message.content
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||
import dev.inmo.tgbotapi.requests.send.SendChecklist
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.EffectId
|
||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||
import dev.inmo.tgbotapi.types.ReplyParameters
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.checklists.Checklist
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTask
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class ChecklistContent(
|
||||
val checklist: Checklist.Created
|
||||
) : MessageContent {
|
||||
override fun createResend(
|
||||
chatId: ChatIdentifier,
|
||||
messageThreadId: MessageThreadId?,
|
||||
businessConnectionId: BusinessConnectionId?,
|
||||
disableNotification: Boolean,
|
||||
protectContent: Boolean,
|
||||
allowPaidBroadcast: Boolean,
|
||||
effectId: EffectId?,
|
||||
replyParameters: ReplyParameters?,
|
||||
replyMarkup: KeyboardMarkup?
|
||||
): Request<ContentMessage<ChecklistContent>> {
|
||||
return SendChecklist(
|
||||
chatId = chatId,
|
||||
checklist = Checklist.Input(
|
||||
titleTextSources = checklist.titleTextSources,
|
||||
tasks = checklist.tasks.map {
|
||||
ChecklistTask.Input(
|
||||
id = it.id,
|
||||
textSources = it.textSources,
|
||||
)
|
||||
},
|
||||
othersCanAddTasks = checklist.othersCanAddTasks,
|
||||
othersCanCompleteTasks = checklist.othersCanCompleteTasks,
|
||||
),
|
||||
businessConnectionId = businessConnectionId ?: error("Checklist can be sent only with business connection"),
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
effectId = effectId,
|
||||
replyParameters = replyParameters,
|
||||
replyMarkup = replyMarkup
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -35,5 +35,6 @@ typealias AnimationMessage = CommonMessage<AnimationContent>
|
||||
typealias ScheduledGiveawayContentMessage = CommonMessage<GiveawayContent>
|
||||
typealias GiveawayPublicResultsContentMessage = CommonMessage<GiveawayPublicResultsContent>
|
||||
typealias PaidMediaInfoContentMessage = CommonMessage<PaidMediaInfoContent>
|
||||
typealias ChecklistMessage = CommonMessage<ChecklistContent>
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,56 @@ import dev.inmo.tgbotapi.types.message.textsources.*
|
||||
typealias EntitiesBuilderBody = EntitiesBuilder.() -> Unit
|
||||
val newLine = regularTextSource("\n")
|
||||
|
||||
/**
|
||||
* Documentation: [DSL text](https://docs.inmo.dev/tgbotapi/dsls/text.html)
|
||||
*
|
||||
* Example: [PollsBot](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/blob/master/PollsBot/src/main/kotlin/PollsBot.kt)
|
||||
*
|
||||
* @see dev.inmo.tgbotapi.utils.bold
|
||||
* @see dev.inmo.tgbotapi.utils.blockquote
|
||||
* @see dev.inmo.tgbotapi.utils.expandableBlockquote
|
||||
* @see dev.inmo.tgbotapi.utils.spoiler
|
||||
* @see dev.inmo.tgbotapi.utils.botCommand
|
||||
* @see dev.inmo.tgbotapi.utils.cashTag
|
||||
* @see dev.inmo.tgbotapi.utils.code
|
||||
* @see dev.inmo.tgbotapi.utils.email
|
||||
* @see dev.inmo.tgbotapi.utils.hashtag
|
||||
* @see dev.inmo.tgbotapi.utils.italic
|
||||
* @see dev.inmo.tgbotapi.utils.mention
|
||||
* @see dev.inmo.tgbotapi.utils.phone
|
||||
* @see dev.inmo.tgbotapi.utils.pre
|
||||
* @see dev.inmo.tgbotapi.utils.regular
|
||||
* @see dev.inmo.tgbotapi.utils.strikethrough
|
||||
* @see dev.inmo.tgbotapi.utils.link
|
||||
* @see dev.inmo.tgbotapi.utils.underline
|
||||
* @see dev.inmo.tgbotapi.utils.customEmoji
|
||||
*/
|
||||
inline fun buildEntities(separator: TextSource? = null, init: EntitiesBuilderBody): TextSourcesList = EntitiesBuilder(separator).apply(init).build()
|
||||
|
||||
/**
|
||||
* Documentation: [DSL text](https://docs.inmo.dev/tgbotapi/dsls/text.html)
|
||||
*
|
||||
* Example: [PollsBot](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/blob/master/PollsBot/src/main/kotlin/PollsBot.kt)
|
||||
*
|
||||
* @see dev.inmo.tgbotapi.utils.bold
|
||||
* @see dev.inmo.tgbotapi.utils.blockquote
|
||||
* @see dev.inmo.tgbotapi.utils.expandableBlockquote
|
||||
* @see dev.inmo.tgbotapi.utils.spoiler
|
||||
* @see dev.inmo.tgbotapi.utils.botCommand
|
||||
* @see dev.inmo.tgbotapi.utils.cashTag
|
||||
* @see dev.inmo.tgbotapi.utils.code
|
||||
* @see dev.inmo.tgbotapi.utils.email
|
||||
* @see dev.inmo.tgbotapi.utils.hashtag
|
||||
* @see dev.inmo.tgbotapi.utils.italic
|
||||
* @see dev.inmo.tgbotapi.utils.mention
|
||||
* @see dev.inmo.tgbotapi.utils.phone
|
||||
* @see dev.inmo.tgbotapi.utils.pre
|
||||
* @see dev.inmo.tgbotapi.utils.regular
|
||||
* @see dev.inmo.tgbotapi.utils.strikethrough
|
||||
* @see dev.inmo.tgbotapi.utils.link
|
||||
* @see dev.inmo.tgbotapi.utils.underline
|
||||
* @see dev.inmo.tgbotapi.utils.customEmoji
|
||||
*/
|
||||
inline fun buildEntities(separator: String, init: EntitiesBuilderBody) = buildEntities(regularTextSource(separator), init)
|
||||
|
||||
/**
|
||||
|
||||
@@ -1163,6 +1163,14 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun channelContentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/ChannelContentMessage;
|
||||
public static final fun channelContentMessageOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/abstracts/ChannelContentMessage;
|
||||
public static final fun channelContentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/ChannelContentMessage;
|
||||
public static final fun channelDirectMessagesConfigurationChangedDisabledOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Disabled;
|
||||
public static final fun channelDirectMessagesConfigurationChangedDisabledOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Disabled;
|
||||
public static final fun channelDirectMessagesConfigurationChangedFreeOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Free;
|
||||
public static final fun channelDirectMessagesConfigurationChangedFreeOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Free;
|
||||
public static final fun channelDirectMessagesConfigurationChangedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged;
|
||||
public static final fun channelDirectMessagesConfigurationChangedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged;
|
||||
public static final fun channelDirectMessagesConfigurationChangedPaidOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid;
|
||||
public static final fun channelDirectMessagesConfigurationChangedPaidOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/ChannelDirectMessagesConfigurationChanged$Paid;
|
||||
public static final fun channelEventMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/ChannelEventMessage;
|
||||
public static final fun channelEventMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/ChannelEventMessage;
|
||||
public static final fun channelEventOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChannelEvent;
|
||||
@@ -1217,6 +1225,12 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun chatSharedRequestOrThrow (Ldev/inmo/tgbotapi/types/request/RequestResponse;)Ldev/inmo/tgbotapi/types/request/ChatSharedRequest;
|
||||
public static final fun chatThemeOrNull (Ldev/inmo/tgbotapi/types/BackgroundType;)Ldev/inmo/tgbotapi/types/BackgroundType$ChatTheme;
|
||||
public static final fun chatThemeOrThrow (Ldev/inmo/tgbotapi/types/BackgroundType;)Ldev/inmo/tgbotapi/types/BackgroundType$ChatTheme;
|
||||
public static final fun checklistContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public static final fun checklistContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/ChecklistContent;
|
||||
public static final fun checklistTasksAddedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
|
||||
public static final fun checklistTasksAddedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksAdded;
|
||||
public static final fun checklistTasksDoneOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
|
||||
public static final fun checklistTasksDoneOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/checklists/ChecklistTasksDone;
|
||||
public static final fun chooseStickerActionOrNull (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
||||
public static final fun chooseStickerActionOrThrow (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
||||
public static final fun chosenInlineResultOrNull (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/InlineQueries/ChosenInlineResult/ChosenInlineResult;
|
||||
@@ -1564,6 +1578,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifChannelChatCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelContentMessage (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelContentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelDirectMessagesConfigurationChanged (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelDirectMessagesConfigurationChangedDisabled (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelDirectMessagesConfigurationChangedFree (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelDirectMessagesConfigurationChangedPaid (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelEvent (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelEventMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChannelPostUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -1591,6 +1609,9 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
||||
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/request/RequestResponse;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChatTheme (Ldev/inmo/tgbotapi/types/BackgroundType;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChecklistContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChecklistTasksAdded (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChecklistTasksDone (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChosenInlineResult (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
public static final fun ifChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||
@@ -3609,20 +3630,21 @@ public final class dev/inmo/tgbotapi/extensions/utils/updates/retrieving/LongPol
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/utils/updates/retrieving/MediaGroupsIncluderKt {
|
||||
public static final fun updateHandlerWithMediaGroupsAdaptation (Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2;
|
||||
public static final fun updateHandlerWithMediaGroupsAdaptation (Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;J)Lkotlin/jvm/functions/Function2;
|
||||
public static synthetic fun updateHandlerWithMediaGroupsAdaptation$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JILjava/lang/Object;)Lkotlin/jvm/functions/Function2;
|
||||
public static final fun updateHandlerWithMediaGroupsAdaptation (Lkotlinx/coroutines/CoroutineScope;Ldev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;)Lkotlin/jvm/functions/Function2;
|
||||
public static final fun updateHandlerWithMediaGroupsAdaptation (Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;)Lkotlin/jvm/functions/Function2;
|
||||
public static synthetic fun updateHandlerWithMediaGroupsAdaptation$default (Lkotlinx/coroutines/CoroutineScope;Ldev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlin/jvm/functions/Function2;
|
||||
public static synthetic fun updateHandlerWithMediaGroupsAdaptation$default (Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;ILjava/lang/Object;)Lkotlin/jvm/functions/Function2;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/utils/updates/retrieving/WebhookKt {
|
||||
public static final fun includeWebhookHandlingInRoute (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLkotlin/jvm/functions/Function2;)V
|
||||
public static synthetic fun includeWebhookHandlingInRoute$default (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
|
||||
public static final fun includeWebhookHandlingInRouteWithFlows (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLkotlin/jvm/functions/Function1;)V
|
||||
public static synthetic fun includeWebhookHandlingInRouteWithFlows$default (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
||||
public static final fun setWebhookInfoAndStartListenWebhooks (Ldev/inmo/tgbotapi/bot/RequestsExecutor;ILio/ktor/server/engine/ApplicationEngineFactory;Ldev/inmo/tgbotapi/requests/webhook/SetWebhookRequest;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setWebhookInfoAndStartListenWebhooks$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;ILio/ktor/server/engine/ApplicationEngineFactory;Ldev/inmo/tgbotapi/requests/webhook/SetWebhookRequest;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun startListenWebhooks (ILio/ktor/server/engine/ApplicationEngineFactory;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lio/ktor/server/engine/EmbeddedServer;
|
||||
public static synthetic fun startListenWebhooks$default (ILio/ktor/server/engine/ApplicationEngineFactory;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lio/ktor/server/engine/EmbeddedServer;
|
||||
public static final fun includeWebhookHandlingInRoute (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;)V
|
||||
public static synthetic fun includeWebhookHandlingInRoute$default (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
|
||||
public static final fun includeWebhookHandlingInRouteWithFlows (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function1;)V
|
||||
public static synthetic fun includeWebhookHandlingInRouteWithFlows$default (Lio/ktor/server/routing/Route;Lkotlinx/coroutines/CoroutineScope;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
||||
public static final fun setWebhookInfoAndStartListenWebhooks (Ldev/inmo/tgbotapi/bot/RequestsExecutor;ILio/ktor/server/engine/ApplicationEngineFactory;Ldev/inmo/tgbotapi/requests/webhook/SetWebhookRequest;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ldev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setWebhookInfoAndStartListenWebhooks$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;ILio/ktor/server/engine/ApplicationEngineFactory;Ldev/inmo/tgbotapi/requests/webhook/SetWebhookRequest;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ldev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun startListenWebhooks (ILio/ktor/server/engine/ApplicationEngineFactory;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ldev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;)Lio/ktor/server/engine/EmbeddedServer;
|
||||
public static synthetic fun startListenWebhooks$default (ILio/ktor/server/engine/ApplicationEngineFactory;Lkotlin/jvm/functions/Function2;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/webhook/WebhookPrivateKeyConfig;Lkotlinx/coroutines/CoroutineScope;JLkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ldev/inmo/kslog/common/KSLog;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lio/ktor/server/engine/EmbeddedServer;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/types/files/PathedFileAsStreamKt {
|
||||
|
||||
@@ -21,6 +21,7 @@ import dev.inmo.tgbotapi.requests.stickers.InputSticker
|
||||
import dev.inmo.tgbotapi.types.BackgroundFill
|
||||
import dev.inmo.tgbotapi.types.BackgroundType
|
||||
import dev.inmo.tgbotapi.types.BusinessChatId
|
||||
import dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.ChatIdWithThreadId
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
@@ -173,6 +174,8 @@ import dev.inmo.tgbotapi.types.chat.member.RestrictedChatMember
|
||||
import dev.inmo.tgbotapi.types.chat.member.RestrictedMemberChatMember
|
||||
import dev.inmo.tgbotapi.types.chat.member.SpecialRightsChatMember
|
||||
import dev.inmo.tgbotapi.types.chat.member.SubscriptionMemberChatMember
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
import dev.inmo.tgbotapi.types.dice.BasketballDiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.dice.BowlingDiceAnimationType
|
||||
import dev.inmo.tgbotapi.types.dice.CubeDiceAnimationType
|
||||
@@ -325,6 +328,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.UnknownMessageType
|
||||
import dev.inmo.tgbotapi.types.message.content.AnimationContent
|
||||
import dev.inmo.tgbotapi.types.message.content.AudioContent
|
||||
import dev.inmo.tgbotapi.types.message.content.AudioMediaGroupPartContent
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
import dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||
import dev.inmo.tgbotapi.types.message.content.DiceContent
|
||||
import dev.inmo.tgbotapi.types.message.content.DocumentContent
|
||||
@@ -3330,6 +3334,54 @@ public inline fun <T>
|
||||
TelegramMedia.ifWithCustomizableCaptionTelegramMedia(block: (WithCustomizableCaptionTelegramMedia) -> T):
|
||||
T? = withCustomizableCaptionTelegramMediaOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedOrNull():
|
||||
ChannelDirectMessagesConfigurationChanged? = this as?
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedOrThrow():
|
||||
ChannelDirectMessagesConfigurationChanged = this as
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged
|
||||
|
||||
public inline fun <T>
|
||||
ChatEvent.ifChannelDirectMessagesConfigurationChanged(block: (ChannelDirectMessagesConfigurationChanged) -> T):
|
||||
T? = channelDirectMessagesConfigurationChangedOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedDisabledOrNull():
|
||||
ChannelDirectMessagesConfigurationChanged.Disabled? = this as?
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged.Disabled
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedDisabledOrThrow():
|
||||
ChannelDirectMessagesConfigurationChanged.Disabled = this as
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged.Disabled
|
||||
|
||||
public inline fun <T>
|
||||
ChatEvent.ifChannelDirectMessagesConfigurationChangedDisabled(block: (ChannelDirectMessagesConfigurationChanged.Disabled) -> T):
|
||||
T? = channelDirectMessagesConfigurationChangedDisabledOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedFreeOrNull():
|
||||
ChannelDirectMessagesConfigurationChanged.Free? = this as?
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged.Free
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedFreeOrThrow():
|
||||
ChannelDirectMessagesConfigurationChanged.Free = this as
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged.Free
|
||||
|
||||
public inline fun <T>
|
||||
ChatEvent.ifChannelDirectMessagesConfigurationChangedFree(block: (ChannelDirectMessagesConfigurationChanged.Free) -> T):
|
||||
T? = channelDirectMessagesConfigurationChangedFreeOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedPaidOrNull():
|
||||
ChannelDirectMessagesConfigurationChanged.Paid? = this as?
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged.Paid
|
||||
|
||||
public inline fun ChatEvent.channelDirectMessagesConfigurationChangedPaidOrThrow():
|
||||
ChannelDirectMessagesConfigurationChanged.Paid = this as
|
||||
dev.inmo.tgbotapi.types.ChannelDirectMessagesConfigurationChanged.Paid
|
||||
|
||||
public inline fun <T>
|
||||
ChatEvent.ifChannelDirectMessagesConfigurationChangedPaid(block: (ChannelDirectMessagesConfigurationChanged.Paid) -> T):
|
||||
T? = channelDirectMessagesConfigurationChangedPaidOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.paidMessagePriceChangedOrNull(): PaidMessagePriceChanged? = this as?
|
||||
dev.inmo.tgbotapi.types.PaidMessagePriceChanged
|
||||
|
||||
@@ -3348,6 +3400,24 @@ public inline fun ChatEvent.chatBackgroundOrThrow(): ChatBackground = this as
|
||||
public inline fun <T> ChatEvent.ifChatBackground(block: (ChatBackground) -> T): T? =
|
||||
chatBackgroundOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.checklistTasksAddedOrNull(): ChecklistTasksAdded? = this as?
|
||||
dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
|
||||
public inline fun ChatEvent.checklistTasksAddedOrThrow(): ChecklistTasksAdded = this as
|
||||
dev.inmo.tgbotapi.types.checklists.ChecklistTasksAdded
|
||||
|
||||
public inline fun <T> ChatEvent.ifChecklistTasksAdded(block: (ChecklistTasksAdded) -> T): T? =
|
||||
checklistTasksAddedOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.checklistTasksDoneOrNull(): ChecklistTasksDone? = this as?
|
||||
dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
|
||||
public inline fun ChatEvent.checklistTasksDoneOrThrow(): ChecklistTasksDone = this as
|
||||
dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
|
||||
|
||||
public inline fun <T> ChatEvent.ifChecklistTasksDone(block: (ChecklistTasksDone) -> T): T? =
|
||||
checklistTasksDoneOrNull() ?.let(block)
|
||||
|
||||
public inline fun ChatEvent.giftSentOrReceivedOrNull(): GiftSentOrReceived? = this as?
|
||||
dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived
|
||||
|
||||
@@ -4491,6 +4561,15 @@ public inline fun ResendableContent.audioContentOrThrow(): AudioContent = this a
|
||||
public inline fun <T> ResendableContent.ifAudioContent(block: (AudioContent) -> T): T? =
|
||||
audioContentOrNull() ?.let(block)
|
||||
|
||||
public inline fun ResendableContent.checklistContentOrNull(): ChecklistContent? = this as?
|
||||
dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
|
||||
public inline fun ResendableContent.checklistContentOrThrow(): ChecklistContent = this as
|
||||
dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
|
||||
public inline fun <T> ResendableContent.ifChecklistContent(block: (ChecklistContent) -> T): T? =
|
||||
checklistContentOrNull() ?.let(block)
|
||||
|
||||
public inline fun ResendableContent.contactContentOrNull(): ContactContent? = this as?
|
||||
dev.inmo.tgbotapi.types.message.content.ContactContent
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import dev.inmo.tgbotapi.types.update.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.*
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import io.ktor.client.plugins.HttpRequestTimeoutException
|
||||
import io.ktor.utils.io.CancellationException
|
||||
import kotlinx.coroutines.*
|
||||
@@ -33,20 +34,20 @@ fun TelegramBot.longPollingFlow(
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
): Flow<Update> = channelFlow {
|
||||
if (autoDisableWebhooks) {
|
||||
runCatchingSafely {
|
||||
runCatchingLogging(logger = Log) {
|
||||
execute(DeleteWebhook())
|
||||
}
|
||||
}
|
||||
|
||||
val contextSafelyExceptionHandler = coroutineContext[ContextSafelyExceptionHandlerKey]
|
||||
val contextToWork = if (contextSafelyExceptionHandler == null || !autoSkipTimeoutExceptions) {
|
||||
val contextSafelyExceptionHandler = coroutineContext[ContextSafelyExceptionHandlerKey] ?.handler ?: defaultSafelyExceptionHandler
|
||||
val contextToWork = if (!autoSkipTimeoutExceptions) {
|
||||
coroutineContext
|
||||
} else {
|
||||
coroutineContext + ContextSafelyExceptionHandler { e ->
|
||||
if (e is HttpRequestTimeoutException || (e is CommonBotException && e.cause is HttpRequestTimeoutException)) {
|
||||
return@ContextSafelyExceptionHandler
|
||||
} else {
|
||||
contextSafelyExceptionHandler.handler(e)
|
||||
contextSafelyExceptionHandler(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,7 +62,8 @@ fun TelegramBot.longPollingFlow(
|
||||
send(it)
|
||||
}
|
||||
},
|
||||
mediaGroupsDebounceTimeMillis
|
||||
mediaGroupsDebounceTimeMillis,
|
||||
logger = Log
|
||||
);
|
||||
{ originalUpdates: List<Update> ->
|
||||
originalUpdates.forEach {
|
||||
@@ -72,6 +74,13 @@ fun TelegramBot.longPollingFlow(
|
||||
} else {
|
||||
{ originalUpdates: List<Update> ->
|
||||
val converted = originalUpdates.convertWithMediaGroupUpdates()
|
||||
|
||||
/**
|
||||
* Dirty hack for cases when the media group was retrieved not fully:
|
||||
*
|
||||
* We are throw out the last media group and will reretrieve it again in the next get updates
|
||||
* and it will guarantee that it is full
|
||||
*/
|
||||
/**
|
||||
* Dirty hack for cases when the media group was retrieved not fully:
|
||||
*
|
||||
@@ -80,14 +89,14 @@ fun TelegramBot.longPollingFlow(
|
||||
*/
|
||||
val updates = if (
|
||||
originalUpdates.size == getUpdatesLimit.last
|
||||
&& ((converted.last() as? BaseSentMessageUpdate) ?.data as? CommonMessage<*>) ?.content is MediaGroupContent<*>
|
||||
&& ((converted.last() as? BaseSentMessageUpdate)?.data as? CommonMessage<*>)?.content is MediaGroupContent<*>
|
||||
) {
|
||||
converted - converted.last()
|
||||
} else {
|
||||
converted
|
||||
}
|
||||
|
||||
safelyWithResult {
|
||||
runCatching {
|
||||
for (update in updates) {
|
||||
send(update)
|
||||
|
||||
@@ -96,25 +105,16 @@ fun TelegramBot.longPollingFlow(
|
||||
}
|
||||
}
|
||||
}.onFailure {
|
||||
cancel(it as? CancellationException ?: return@onFailure)
|
||||
if (it is CancellationException) {
|
||||
cancel(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
withContext(contextToWork) {
|
||||
while (isActive) {
|
||||
safely(
|
||||
{ e ->
|
||||
val isHttpRequestTimeoutException = e is HttpRequestTimeoutException || (e is CommonBotException && e.cause is HttpRequestTimeoutException)
|
||||
if (isHttpRequestTimeoutException && autoSkipTimeoutExceptions) {
|
||||
return@safely
|
||||
}
|
||||
exceptionsHandler ?.invoke(e)
|
||||
if (e is RequestException) {
|
||||
delay(1000L)
|
||||
}
|
||||
}
|
||||
) {
|
||||
runCatching {
|
||||
execute(
|
||||
GetUpdates(
|
||||
offset = lastUpdateIdentifier?.plus(1),
|
||||
@@ -124,6 +124,16 @@ fun TelegramBot.longPollingFlow(
|
||||
).let { originalUpdates ->
|
||||
updatesHandler(originalUpdates)
|
||||
}
|
||||
}.onFailure { e ->
|
||||
val isHttpRequestTimeoutException =
|
||||
e is HttpRequestTimeoutException || (e is CommonBotException && e.cause is HttpRequestTimeoutException)
|
||||
if (isHttpRequestTimeoutException && autoSkipTimeoutExceptions) {
|
||||
return@onFailure
|
||||
}
|
||||
exceptionsHandler?.invoke(e)
|
||||
if (e is RequestException) {
|
||||
delay(1000L)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user