mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-11-16 20:10:18 +00:00
Compare commits
239 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 667c49f13d | |||
| e1d9ebff90 | |||
| fbc7088dad | |||
| 4ba9c8ee97 | |||
| 92611b5c26 | |||
| 2e1c0d41ec | |||
| 3ce56745f4 | |||
| 1bc9ee4d5a | |||
| 2f4de37489 | |||
| cec5a0af12 | |||
| 5e5dc6b36b | |||
| 19265357a2 | |||
| 49c2836e62 | |||
| f7476188eb | |||
| 2ba447b126 | |||
| 3bd4fab3fe | |||
| 9e4d7dd9f9 | |||
| 586a61157d | |||
| 045265f0f8 | |||
| c125eadaa4 | |||
| 3dd0a91c54 | |||
| 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 | |||
| ed6d4d07c6 | |||
| 78d9ce8d19 | |||
| 345009da32 | |||
| de47497223 | |||
| 7477625380 | |||
| 970abf8cde | |||
| 5a7741faf6 | |||
| 8aa29e56d3 | |||
| dab5e072d0 | |||
| 94078939d1 | |||
| 824d3862e3 | |||
| 44f92e8d6c | |||
| ddb79c0d8d | |||
| a9562cc8f9 | |||
| 8a351d5be0 | |||
| 8cd5659b7b | |||
| 1474a07b9e | |||
| c13a0d3193 | |||
| 172f49fa6b | |||
| 4d42972a7e | |||
| c0883d0180 | |||
| e7367da3cb | |||
| effd12711f | |||
| ef1d2e8242 | |||
| 881763f3af | |||
| d36b11c002 | |||
| d2395e836c | |||
| c8c008edd3 | |||
| 3b4fa06924 | |||
| 5d428a5e54 | |||
| 8964e08ce6 | |||
| 745168d181 | |||
| a408c6c7c7 | |||
| e0f5e9b640 | |||
| 0331ff2f42 | |||
| a21d0b56db | |||
|
|
6ea8afee8f | ||
|
|
8799aeca26 | ||
| c610f4eab2 | |||
| 92cd2a3def | |||
| 03d158b03b | |||
|
|
608fde4139 | ||
| 9e56a6cc1a | |||
| c0e3c1d02f | |||
| 341a527d27 | |||
|
|
8d6d70a06a | ||
|
|
67fb552d01 | ||
|
|
93e937aa6a | ||
|
|
09dee188d2 | ||
|
|
29c6bb5dac | ||
| c266ab0120 | |||
|
|
b407fc5c86 | ||
|
|
1bde43ceaf | ||
|
|
389a508fa7 | ||
|
|
69c2586b50 | ||
|
|
7e80f4edac | ||
|
|
99987c3f51 | ||
|
|
713130fd13 | ||
| deb8d7b43a | |||
| b604444f7d | |||
|
|
cb6127bf91 | ||
|
|
d40919f099 | ||
|
|
7cb576e6b1 | ||
|
|
b53fb8da36 | ||
|
|
03ea8dfe7f | ||
|
|
314c8d9ad1 | ||
|
|
6fceee4199 | ||
|
|
e720da708c | ||
|
|
d65706631f | ||
|
|
3312b64564 | ||
|
|
1bfe431393 | ||
|
|
6485353704 | ||
|
|
46a1ed27b7 | ||
|
|
9f3024476c | ||
|
|
93d0e009bb | ||
|
|
ef60549e1c | ||
|
|
2ac83156f6 | ||
|
|
4c9d888668 | ||
|
|
cd3ba8f480 | ||
|
|
99559f477e | ||
|
|
a3949c752d | ||
| fd48a52266 | |||
| 3e0036f7df | |||
| 2978932c87 | |||
| c773736fb8 | |||
| 8a3a05ef12 | |||
| 0afbe8ef2d | |||
| 3f4018f969 | |||
| 097d82b4b4 | |||
| 7c2a379161 | |||
| ba5f76e8cd | |||
| 8aec920a15 | |||
| c92bd33ba1 | |||
| 51927974f5 | |||
| 9350f87e19 | |||
| 6cb9950b36 | |||
| 974c2e883f | |||
| af6f98fd56 | |||
| 75a2b2c282 | |||
| d66d4b4209 | |||
| 9d54820fd7 | |||
| 1876df2c2d | |||
| d818592cd3 | |||
| c29737b6b3 | |||
| 46243a21eb | |||
| d5f45ead59 | |||
| 5a696cdac0 | |||
| 80955eeb55 | |||
| 6ee93e2d68 | |||
| d4490dec75 | |||
| 7d3e9325f1 | |||
| 31a66eb8e6 | |||
| b3b9070cd6 | |||
| 3504776344 | |||
| f22f69534a | |||
| a9c1d7b33c | |||
|
|
376ef0750c | ||
| cdf93e0d12 | |||
| 8c7261fda9 | |||
| 82acc8cb1f | |||
| 4ec1532597 | |||
| 13bfe681d8 | |||
| 5bbbcdb529 | |||
| 7f9d6ce626 | |||
| 71b944f9cc | |||
| d9d68749f1 | |||
| 561aad2274 | |||
| 6a3e95c488 | |||
| a09b3809e2 | |||
| 427b5775a2 | |||
| d222987fc7 | |||
| d211afa26a | |||
| 9952b6c6ae | |||
| 840c6b02a4 | |||
| a6f91d5600 | |||
| 8ec0c8804b | |||
| 2d08c447bc | |||
| 9a0793d81c | |||
| a95f556a5c | |||
| f774b11de4 | |||
|
|
5164903d05 | ||
| adaedb8040 | |||
| 9b4b60eb33 | |||
| b90f8ec389 | |||
| e95550a6eb | |||
| 696219df24 | |||
| 27241fad32 | |||
| a034fa18d7 | |||
| adcaffe115 | |||
| 6388d8db13 | |||
| 2964586cb9 | |||
| e3cb1e4faf | |||
| d7f14020d8 | |||
| 397197023e | |||
| 12dc93313a | |||
| 625760afae | |||
| 795328afdf | |||
| 57175b7698 | |||
| 2d05a334eb | |||
| 0b6d9e47b9 | |||
| 4cdae11adc | |||
| 04b2d1dbd6 | |||
| 4343d6d161 | |||
| 6824f2c992 | |||
| 9cde4927ce | |||
| 819982473a | |||
| 5559923339 | |||
| c7d08df3bf | |||
| 41a142addb | |||
| 652765bf46 | |||
| 32010cf1c7 | |||
| 1c6359f041 | |||
| 4ac5e405ac | |||
| bc00e1f28a | |||
| 191e4cff00 | |||
| ad4bac82dc | |||
| 300be87ffd | |||
| 05f46d08c8 | |||
| 4eb6fa7835 |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -1,3 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
custom: ['https://www.tinkoff.ru/rm/ovsyannikov.aleksey113/ObMJ712472', 'https://boosty.to/insanusmokrassar']
|
||||
custom: ['https://tonscan.org/address/UQAtuSLJ76Zehc3qP-eRYMR98fPIu_oOp_atcpVX55zxHwTU']
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,7 +9,9 @@ settings.xml
|
||||
.gradle/
|
||||
build/
|
||||
out/
|
||||
bin/
|
||||
|
||||
local.properties
|
||||
kotlin-js-store/
|
||||
secret.gradle
|
||||
.aider*
|
||||
|
||||
151
CHANGELOG.md
151
CHANGELOG.md
@@ -1,5 +1,152 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 27.1.1
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.26.1` -> `0.26.2`
|
||||
* `Core`:
|
||||
* Make `BusinessLocation#location` optional (fix of [#990](https://github.com/InsanusMokrassar/ktgbotapi/issues/990))
|
||||
|
||||
## 27.1.0
|
||||
|
||||
* `Core`:
|
||||
* Improve support of local bot api servers files. Next call factories will try to resolve file locally before real call:
|
||||
* [DownloadFileRequestCallFactory.kt](tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DownloadFileRequestCallFactory.kt) (for [DownloadFile.kt](tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/DownloadFile.kt) as well)
|
||||
* [DownloadFileChannelRequestCallFactory.kt](tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DownloadFileChannelRequestCallFactory.kt) (for [DownloadFileStream.kt](tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/DownloadFileStream.kt) as well)
|
||||
|
||||
## 27.0.0
|
||||
|
||||
**THIS UPDATE MAY CONTAIN BREAKING CHANGES. IN CASE OF ANY MIGRATION PROBLEMS FEEL FREE TO ASK IN [OUR CHAT](https://t.me/ktgbotapi_chat)**
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.1.20` -> `2.2.0`
|
||||
* `Serialization`: `1.8.1` -> `1.9.0`
|
||||
* `Ktor`: `3.1.3` -> `3.2.2`
|
||||
* `MicroUtils`: `0.25.7` -> `0.26.1`
|
||||
* `KSLog`: `1.4.1` -> `1.5.0`
|
||||
* `Common`:
|
||||
* In most `data` classes with non-public constructors has been added `ConsistentCopyVisibility` annotation, preventing
|
||||
public nature in difference with constructor
|
||||
* Absence of several API methods for requests has been fixed
|
||||
|
||||
## 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)**
|
||||
|
||||
* `Core`:
|
||||
* Previously named `Gift` now presented by `Gift.Regular`
|
||||
* Fixes in `MultipartRequestCallFactory` for correct handling of all `MultipartRequest.Common` inheritors
|
||||
* `Username` now can be safely created with `Username.prepare`
|
||||
* Add extensions `String.splitFor(Text|Caption|StoryCaption)` for preparing several texts for several
|
||||
messages/captions/story captions
|
||||
|
||||
## 24.0.2
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.1.10` -> `2.1.20`
|
||||
* `Ktor`: `3.1.0` -> `3.1.1`
|
||||
* `MicroUtils`: `0.24.7` -> `0.25.3`
|
||||
* `DefaultKTgBotAPIKSLog` will drop `CancellationException`s by default
|
||||
* You may configure `DefaultKTgBotAPIKSLog` in simple way with `SetDefaultKTgBotAPIKSLog`
|
||||
* `BehaviourBuilder`:
|
||||
* `FSM`:
|
||||
* Fix chains cancelling on their ends
|
||||
|
||||
## 24.0.1
|
||||
|
||||
* `Core`:
|
||||
* Now you may upload photos with `EditChatMessageMedia`
|
||||
|
||||
## 24.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES IN `subcontextUpdatesFilter` WORK. TAKE CARE IN MIGRATION**
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.24.6` -> `0.24.7`
|
||||
* `Core`:
|
||||
* `ForumContentMessage` got property `threadCreatingInfo` which represents information about topic where message has been sent
|
||||
* `BehaviourBuilder`:
|
||||
* Fix of overall `subcontextUpdatesFilter` behaviour. In fact, this update will fix its affection on scenaries
|
||||
|
||||
## 23.2.1
|
||||
|
||||
* `Core`:
|
||||
* Fix of `year` field in `Birthdate`
|
||||
|
||||
## 23.2.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 8.3](https://core.telegram.org/bots/api-changelog#february-12-2025)**
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.24.5` -> `0.24.6`
|
||||
* `Ktor`: `3.0.3` -> `3.1.0`
|
||||
|
||||
## 23.1.2
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.1.0` -> `2.1.10`
|
||||
* `Serialization`: `1.7.3` -> `1.8.0`
|
||||
* `MicroUtils`: `0.24.4` -> `0.24.5`
|
||||
* `KSLog`: `1.4.0` -> `1.4.1`
|
||||
|
||||
## 23.1.1
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.24.0` -> `0.24.4`
|
||||
* `Core`:
|
||||
* Replace `removeFirst` with `removeAt(0)` in `createTextSources`
|
||||
|
||||
## 23.1.0
|
||||
|
||||
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 8.2](https://core.telegram.org/bots/api-changelog#january-1-2025)**
|
||||
|
||||
## 23.0.0
|
||||
|
||||
* `Version`:
|
||||
* `Coroutines`: `1.9.0` -> `1.10.1`
|
||||
* `MicroUtils`: `0.23.2` -> `0.24.0`
|
||||
* `KSLog`: `1.3.6` -> `1.4.0`
|
||||
* `Ktor`: `3.0.2` -> `3.0.3`
|
||||
* `Core`:
|
||||
* All old factory methods for `TextSource`s took suffix `TextSource`. For example: `regular` -> `regularTextSource`.
|
||||
That has been for excluding names resolution ambiguity with extensions for `EntitiesBuilder`
|
||||
|
||||
## 22.0.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||
|
||||
**IN THIS UPDATE HAS BEEN REWORKED EVENTS API IN WEBAPPS**
|
||||
|
||||
**THIS UPDATE ADDING SUPPORT OF [BOT API 8.0](https://core.telegram.org/bots/api-changelog#november-17-2024) AND [BOT API 8.1](https://core.telegram.org/bots/api-changelog#december-4-2024)**
|
||||
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.23.1` -> `0.23.2`
|
||||
* `Ktor`: `3.0.1` -> `3.0.2`
|
||||
|
||||
## 21.0.1
|
||||
|
||||
* `Core`:
|
||||
@@ -20,9 +167,9 @@ due to its redundancy
|
||||
* `BehaviourBuilder`:
|
||||
* Add special `val data: BehaviourContextData` into all realizations of `BehaviourContext`
|
||||
* Add `CombinedSubcontextInitialAction` and functions
|
||||
`buildSubcontextInitialAction`/`buildSubcontextInitialActionWithSubActions`
|
||||
`buildSubcontextInitialAction`/`buildSubcontextInitialActionWithSubActions`
|
||||
* Add `subcontextInitialAction` for all the functions-builders of `BehaviourContext` and
|
||||
`additionalSubcontextInitialAction` to all triggers
|
||||
`additionalSubcontextInitialAction` to all triggers
|
||||
|
||||
## 20.0.1
|
||||
|
||||
|
||||
19
README.md
19
README.md
@@ -1,4 +1,4 @@
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#october-31-2024)
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#july-3-2025)
|
||||
|
||||
| Docs | [](https://tgbotapi.inmo.dev/index.html) [](https://docs.inmo.dev/tgbotapi/index.html) |
|
||||
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||
@@ -120,3 +120,20 @@ suspend fun main() {
|
||||
You may find examples in [this project](https://github.com/InsanusMokrassar/TelegramBotAPI-examples). Besides, you are
|
||||
always welcome in our [docs](https://docs.inmo.dev/tgbotapi/index.html) and
|
||||
[chat](https://t.me/InMoTelegramBotAPIChat).
|
||||
|
||||
### Bot API Server Notice
|
||||
|
||||
Under the hood, default bots realizations will try to use links
|
||||
([PathedFile](tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/files/PathedFile.kt)#filePath) as files each
|
||||
time you are trying to download file from telegram in any way - via saving to file, use stream or download as byte array.
|
||||
To let bot correctly download files from bot api server, you must:
|
||||
|
||||
* Run bot api server locally
|
||||
to proxy requests for files to the server where bot api server has been hosted
|
||||
* In case of local bot api server (shared one host machine) you must ensure that access to bot api server has been
|
||||
granted for your bot. For example, [aiogram/telegram-bot-api](https://hub.docker.com/r/aiogram/telegram-bot-api) image
|
||||
use `101` UID/GID in linux for user and group as owners. So, your bot must run under user included in `101` group
|
||||
(like `systemd-journal`) or be `101` UID user (like `systemd-resolve`)
|
||||
* **OR** Use some reverse proxy (like nginx). It will allow you to broadcast your bots files without linux rights problems
|
||||
* Set [TelegramAPIUrlsKeeper](tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper.kt)#fileLinkUrlMapper
|
||||
to map urls to let bot execute requests to your nginx proxy
|
||||
35
build.gradle
35
build.gradle
@@ -1,8 +1,8 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -18,15 +18,30 @@ plugins {
|
||||
alias(libs.plugins.kotlin.dokka)
|
||||
alias(libs.plugins.versions)
|
||||
alias(libs.plugins.validator)
|
||||
alias(libs.plugins.nmcp.aggregation)
|
||||
}
|
||||
|
||||
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
nmcpAggregation {
|
||||
centralPortal {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
validationTimeout = Duration.ofSeconds(0)
|
||||
publishingType = "USER_MANAGED"
|
||||
}
|
||||
|
||||
publishAllProjectsProbablyBreakingProjectIsolation()
|
||||
}
|
||||
}
|
||||
|
||||
// temporal crutch until legacy tests will be stabled or legacy target will be removed
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
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")) {
|
||||
tasks.whenTaskAdded { task ->
|
||||
@@ -48,12 +63,20 @@ private String getCurrentVersionChangelog() {
|
||||
return changelogDataOS.toString().trim()
|
||||
}
|
||||
|
||||
if (new File(projectDir, "secret.gradle").exists()) {
|
||||
apply from: './secret.gradle'
|
||||
|
||||
def githubTokenVariableName = "GITHUB_RELEASE_TOKEN"
|
||||
def githubTokenVariableFromEnv = System.getenv(githubTokenVariableName)
|
||||
|
||||
def secretFile = new File(projectDir, "secret.gradle")
|
||||
if (secretFile.exists() || project.hasProperty(githubTokenVariableName) || (githubTokenVariableFromEnv != "" && githubTokenVariableFromEnv != null)) {
|
||||
if (secretFile.exists()) {
|
||||
apply from: './secret.gradle'
|
||||
}
|
||||
apply plugin: "com.github.breadmoirai.github-release"
|
||||
def githubReleaseToken = project.hasProperty(githubTokenVariableName) ? project.property(githubTokenVariableName).toString() : githubTokenVariableFromEnv
|
||||
|
||||
githubRelease {
|
||||
token "${project.property('GITHUB_RELEASE_TOKEN')}"
|
||||
token githubReleaseToken
|
||||
|
||||
owner = "InsanusMokrassar"
|
||||
repo = "TelegramBotAPI"
|
||||
|
||||
@@ -55,7 +55,7 @@ Object callback = {
|
||||
|
||||
sourceLink {
|
||||
localDirectory.set(file("../"))
|
||||
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/ktgbotapi/tree/master"))
|
||||
remoteUrl.set(new URL("https://github.com/InsanusMokrassar/ktgbotapi"))
|
||||
remoteLineSuffix.set("#L")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,3 +15,13 @@ allprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("getPublishableModules") {
|
||||
doLast {
|
||||
rootProject.subprojects.each { project ->
|
||||
if (project.plugins.hasPlugin('maven-publish')) {
|
||||
println(":${project.name}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,8 @@ kotlin.js.generate.externals=true
|
||||
kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
# https://github.com/google/ksp/issues/2491
|
||||
ksp.useKSP2=false
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=21.0.1
|
||||
library_version=27.1.1
|
||||
|
||||
@@ -1,27 +1,28 @@
|
||||
[versions]
|
||||
|
||||
kotlin = "2.1.0"
|
||||
kotlin-serialization = "1.7.3"
|
||||
kotlin-coroutines = "1.9.0"
|
||||
kotlin = "2.2.0"
|
||||
kotlin-serialization = "1.9.0"
|
||||
kotlin-coroutines = "1.10.2"
|
||||
|
||||
javax-activation = "1.1.1"
|
||||
|
||||
korlibs = "5.4.0"
|
||||
uuid = "0.8.4"
|
||||
ktor = "3.0.1"
|
||||
ktor = "3.2.2"
|
||||
|
||||
ksp = "2.1.0-1.0.29"
|
||||
kotlin-poet = "1.18.1"
|
||||
ksp = "2.2.0-2.0.2"
|
||||
kotlin-poet = "2.2.0"
|
||||
|
||||
microutils = "0.23.1"
|
||||
kslog = "1.3.6"
|
||||
microutils = "0.26.2"
|
||||
kslog = "1.5.0"
|
||||
|
||||
versions = "0.51.0"
|
||||
versions = "0.52.0"
|
||||
|
||||
github-release-plugin = "2.5.2"
|
||||
dokka = "1.9.20"
|
||||
dokka = "2.0.0"
|
||||
|
||||
validator = "0.16.3"
|
||||
validator = "0.18.1"
|
||||
nmcp = "1.0.2"
|
||||
|
||||
[libraries]
|
||||
|
||||
@@ -57,6 +58,11 @@ microutils-serialization-mapper = { module = "dev.inmo:micro_utils.serialization
|
||||
microutils-languageCodes = { module = "dev.inmo:micro_utils.language_codes", version.ref = "microutils" }
|
||||
microutils-ktor-common = { module = "dev.inmo:micro_utils.ktor.common", version.ref = "microutils" }
|
||||
microutils-fsm-common = { module = "dev.inmo:micro_utils.fsm.common", version.ref = "microutils" }
|
||||
microutils-ksp-generator = { module = "dev.inmo:micro_utils.ksp.generator", version.ref = "microutils" }
|
||||
microutils-ksp-sealed = { module = "dev.inmo:micro_utils.ksp.sealed", version.ref = "microutils" }
|
||||
microutils-ksp-sealed-generator = { module = "dev.inmo:micro_utils.ksp.sealed.generator", version.ref = "microutils" }
|
||||
microutils-ksp-variations = { module = "dev.inmo:micro_utils.ksp.variations", version.ref = "microutils" }
|
||||
microutils-ksp-variations-generator = { module = "dev.inmo:micro_utils.ksp.variations.generator", version.ref = "microutils" }
|
||||
|
||||
kslog = { module = "dev.inmo:kslog", version.ref = "kslog" }
|
||||
|
||||
@@ -81,3 +87,4 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
|
||||
kotlin-dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
|
||||
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
|
||||
validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "validator" }
|
||||
nmcp-aggregation = { id = "com.gradleup.nmcp.aggregation", version.ref = "nmcp" }
|
||||
|
||||
@@ -4,6 +4,9 @@ project.group = "$group"
|
||||
apply from: "$mpp_publish"
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xcontext-parameters")
|
||||
}
|
||||
js (IR) {
|
||||
browser()
|
||||
nodejs()
|
||||
|
||||
@@ -2,6 +2,9 @@ project.version = "$library_version"
|
||||
project.group = "$library_group"
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xcontext-parameters")
|
||||
}
|
||||
jvm {
|
||||
compilations.main {
|
||||
kotlinOptions {
|
||||
|
||||
@@ -19,59 +19,52 @@ publishing {
|
||||
}
|
||||
|
||||
developers {
|
||||
|
||||
developer {
|
||||
id = "InsanusMokrassar"
|
||||
name = "Ovsiannikov Aleksei"
|
||||
email = "ovsyannikov.alexey95@gmail.com"
|
||||
}
|
||||
|
||||
developer {
|
||||
id = "InsanusMokrassar"
|
||||
name = "Ovsiannikov Aleksei"
|
||||
email = "ovsyannikov.alexey95@gmail.com"
|
||||
}
|
||||
}
|
||||
|
||||
licenses {
|
||||
|
||||
license {
|
||||
name = "Apache Software License 2.0"
|
||||
url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"
|
||||
}
|
||||
|
||||
license {
|
||||
name = "Apache Software License 2.0"
|
||||
url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
if ((project.hasProperty('GITHUB_USER') || System.getenv('GITHUB_USER') != null) && (project.hasProperty('GITHUB_TOKEN') || System.getenv('GITHUB_TOKEN') != null)) {
|
||||
maven {
|
||||
name = "GithubPackages"
|
||||
url = uri("https://maven.pkg.github.com/InsanusMokrassar/ktgbotapi")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('GITHUB_USER') ? project.property('GITHUB_USER') : System.getenv('GITHUB_USER')
|
||||
password = project.hasProperty('GITHUB_TOKEN') ? project.property('GITHUB_TOKEN') : System.getenv('GITHUB_TOKEN')
|
||||
}
|
||||
|
||||
}
|
||||
repositories {
|
||||
if ((project.hasProperty('GITHUB_USER') || System.getenv('GITHUB_USER') != null) && (project.hasProperty('GITHUB_TOKEN') || System.getenv('GITHUB_TOKEN') != null)) {
|
||||
maven {
|
||||
name = "GithubPackages"
|
||||
url = uri("https://maven.pkg.github.com/InsanusMokrassar/ktgbotapi")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('GITHUB_USER') ? project.property('GITHUB_USER') : System.getenv('GITHUB_USER')
|
||||
password = project.hasProperty('GITHUB_TOKEN') ? project.property('GITHUB_TOKEN') : System.getenv('GITHUB_TOKEN')
|
||||
}
|
||||
}
|
||||
if ((project.hasProperty('INMONEXUS_USER') || System.getenv('INMONEXUS_USER') != null) && (project.hasProperty('INMONEXUS_PASSWORD') || System.getenv('INMONEXUS_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "InmoNexus"
|
||||
url = uri("https://nexus.inmo.dev/repository/maven-releases/")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('INMONEXUS_USER') ? project.property('INMONEXUS_USER') : System.getenv('INMONEXUS_USER')
|
||||
password = project.hasProperty('INMONEXUS_PASSWORD') ? project.property('INMONEXUS_PASSWORD') : System.getenv('INMONEXUS_PASSWORD')
|
||||
}
|
||||
|
||||
}
|
||||
if ((project.hasProperty('INMONEXUS_USER') || System.getenv('INMONEXUS_USER') != null) && (project.hasProperty('INMONEXUS_PASSWORD') || System.getenv('INMONEXUS_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "InmoNexus"
|
||||
url = uri("https://nexus.inmo.dev/repository/maven-releases/")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('INMONEXUS_USER') ? project.property('INMONEXUS_USER') : System.getenv('INMONEXUS_USER')
|
||||
password = project.hasProperty('INMONEXUS_PASSWORD') ? project.property('INMONEXUS_PASSWORD') : System.getenv('INMONEXUS_PASSWORD')
|
||||
}
|
||||
}
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
|
||||
}
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
|
||||
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,13 +73,13 @@ publishing {
|
||||
|
||||
if (project.hasProperty("signing.gnupg.keyName")) {
|
||||
apply plugin: 'signing'
|
||||
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
|
||||
|
||||
sign publishing.publications
|
||||
}
|
||||
|
||||
|
||||
task signAll {
|
||||
tasks.withType(Sign).forEach {
|
||||
dependsOn(it)
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"${project.name}","description":"${project.description}","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"GithubPackages","url":"https://maven.pkg.github.com/InsanusMokrassar/ktgbotapi","credsType":{"type":"dev.inmo.kmppscriptbuilder.core.models.MavenPublishingRepository.CredentialsType.UsernameAndPassword","usernameProperty":"GITHUB_USER","passwordProperty":"GITHUB_TOKEN"}},{"name":"InmoNexus","url":"https://nexus.inmo.dev/repository/maven-releases/"},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}}}
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"${project.name}","description":"${project.description}","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"GithubPackages","url":"https://maven.pkg.github.com/InsanusMokrassar/ktgbotapi","credsType":{"type":"dev.inmo.kmppscriptbuilder.core.models.MavenPublishingRepository.CredentialsType.UsernameAndPassword","usernameProperty":"GITHUB_USER","passwordProperty":"GITHUB_TOKEN"}},{"name":"InmoNexus","url":"https://nexus.inmo.dev/repository/maven-releases/"},{"name":"sonatype","url":"https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"},"includeCentralSonatypeUploadingScript":false}}
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
|
||||
@@ -3,8 +3,6 @@ public final class dev/inmo/tgbotapi/extensions/api/BotBuilder {
|
||||
public final fun component1 ()Ljava/net/Proxy;
|
||||
public final fun component2 ()Lio/ktor/client/engine/HttpClientEngineFactory;
|
||||
public final fun component3 ()Lkotlin/jvm/functions/Function1;
|
||||
public final fun copy (Ljava/net/Proxy;Lio/ktor/client/engine/HttpClientEngineFactory;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/extensions/api/BotBuilder;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/extensions/api/BotBuilder;Ljava/net/Proxy;Lio/ktor/client/engine/HttpClientEngineFactory;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/api/BotBuilder;
|
||||
public fun equals (Ljava/lang/Object;)Z
|
||||
public final fun getKtorClientConfig ()Lkotlin/jvm/functions/Function1;
|
||||
public final fun getKtorClientEngineFactory ()Lio/ktor/client/engine/HttpClientEngineFactory;
|
||||
@@ -17,8 +15,8 @@ public final class dev/inmo/tgbotapi/extensions/api/BotBuilder {
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/BotBuilderKt {
|
||||
public static final fun buildBot (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun buildBot$default (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun buildBot (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun buildBot$default (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/BotExtensionsKt {
|
||||
@@ -26,21 +24,21 @@ public final class dev/inmo/tgbotapi/extensions/api/BotExtensionsKt {
|
||||
public static final fun telegramBot (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Lio/ktor/client/engine/HttpClientEngineFactory;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngineFactory;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Ljava/lang/String;ZLio/ktor/client/HttpClient;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngineFactory;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lio/ktor/client/HttpClient;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static final fun telegramBot (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Lio/ktor/client/HttpClient;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ldev/inmo/tgbotapi/utils/TelegramAPIUrlsKeeper;Lio/ktor/client/engine/HttpClientEngineFactory;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngineFactory;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Ljava/lang/String;ZLio/ktor/client/HttpClient;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngineFactory;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lio/ktor/client/HttpClient;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
public static synthetic fun telegramBot$default (Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/bot/RequestsExecutor;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/CloseKt {
|
||||
public static final fun close (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun executeClose (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/DeleteMessageKt {
|
||||
@@ -88,7 +86,7 @@ public final class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo : dev/i
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public synthetic class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public final synthetic class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$$serializer;
|
||||
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo;
|
||||
@@ -104,18 +102,18 @@ public final class dev/inmo/tgbotapi/extensions/api/EditLiveLocationInfo$Compani
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/ForwardMessageKt {
|
||||
public static final fun forwardMessage-Jtj_99M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-Jtj_99M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-Jtj_99M$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-Jtj_99M$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-gJU3G-E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-gJU3G-E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-G0NMK-w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-G0NMK-w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-G0NMK-w$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-G0NMK-w$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun forwardMessage-otd5OVs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun forwardMessage-otd5OVs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/ForwardMessagesKt {
|
||||
@@ -295,6 +293,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;
|
||||
@@ -331,6 +333,89 @@ public final class dev/inmo/tgbotapi/extensions/api/bot/SetMyShortDescriptionKt
|
||||
public static synthetic fun setMyShortDescription$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/micro_utils/language_codes/IetfLang;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/ConvertGiftToStarsKt {
|
||||
public static final fun convertGiftToStars-D7eidZo (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun convertGiftToStars-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariationKt {
|
||||
public static final fun deleteBusinessMessages-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesKt {
|
||||
public static final fun deleteBusinessMessages-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountGiftsKt {
|
||||
public static final fun getBusinessAccountGifts-LATcL_E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun getBusinessAccountGifts-LATcL_E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun getBusinessAccountGiftsFlow-LATcL_E (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||
public static synthetic fun getBusinessAccountGiftsFlow-LATcL_E$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZZZZZZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalanceKt {
|
||||
public static final fun getBusinessAccountStarBalance-spp27rg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariationKt {
|
||||
public static final fun readBusinessMessage-1MWLODE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/Chat;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageKt {
|
||||
public static final fun readBusinessMessage-kYJnN-U (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JJLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun readBusinessMessage-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhotoKt {
|
||||
public static final fun removeBusinessAccountProfilePhoto-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun removeBusinessAccountProfilePhoto-wC12z2M$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBioKt {
|
||||
public static final fun setBusinessAccountBio-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountGiftSettingsKt {
|
||||
public static final fun setBusinessAccountGiftSettings (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;ZLdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setBusinessAccountGiftSettings-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ZLdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountNameKt {
|
||||
public static final fun setBusinessAccountName-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setBusinessAccountName-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhotoKt {
|
||||
public static final fun setBusinessAccountProfilePhoto-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setBusinessAccountProfilePhoto-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariationKt {
|
||||
public static final fun setBusinessAccountUsername-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameKt {
|
||||
public static final fun setBusinessAccountUsername-_dB6Ko0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalanceKt {
|
||||
public static final fun transferBusinessAccountStars-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ILkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/TransferGiftKt {
|
||||
public static final fun transferGift-cB4Rf94 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;JLjava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun transferGift-cB4Rf94$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;JLjava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun transferGift-gMFmPss (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;JLjava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun transferGift-gMFmPss$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;JLjava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/business/UpgradeGiftKt {
|
||||
public static final fun convertGiftToStars-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun convertGiftToStars-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun convertGiftToStars-fJJ4zuA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun convertGiftToStars-fJJ4zuA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/chat/ExportChatInviteLinkKt {
|
||||
public static final fun exportChatInviteLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun exportChatInviteLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -846,6 +931,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;
|
||||
@@ -898,6 +990,15 @@ public final class dev/inmo/tgbotapi/extensions/api/edit/media/EditInlineMessage
|
||||
public static synthetic fun editMessageMedia-FrLM24I$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/media/TelegramFreeMedia;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/edit/payments/EditUserStarSubscriptionKt {
|
||||
public static final fun cancelUserStarSubscription-0SkZb-I (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun cancelUserStarSubscription-AASCvMI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun editUserStarSubscription-0x-hEcU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun editUserStarSubscription-TFuYNzM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun enableUserStarSubscription-0SkZb-I (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun enableUserStarSubscription-AASCvMI (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/edit/reply_markup/EditChatMessageReplyMarkupKt {
|
||||
public static final fun editMessageReplyMarkup-iJMbh4A (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editMessageReplyMarkup-iJMbh4A$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
@@ -1076,6 +1177,55 @@ public final class dev/inmo/tgbotapi/extensions/api/get/GetUserProfilePhotosKt {
|
||||
public static synthetic fun getUserProfilePhotos-4iNBclM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/Integer;Ljava/lang/Integer;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/GetAvailableGiftsKt {
|
||||
public static final fun getAvailableGifts (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/GiftPremiumSubscriptionKt {
|
||||
public static final fun giftPremiumSubscription-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JIILdev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun giftPremiumSubscription-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JIILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun giftPremiumSubscription-VjR9mJc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JIILdev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun giftPremiumSubscription-VjR9mJc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JIILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun giftPremiumSubscription-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JIILjava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun giftPremiumSubscription-ySMgKnk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JIILjava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariationKt {
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt {
|
||||
public static final fun sendGift-1FWvrZc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGift-1FWvrZc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendGift-CrS58cM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGift-CrS58cM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGiftToChat-0SDnvgk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendGiftToChat-GROm3fU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/util/List;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariationKt {
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendGiftToChat-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/inline/SavePreparedInlineMessageKt {
|
||||
public static final fun savePreparedInlineMessage (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun savePreparedInlineMessage$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun savePreparedInlineMessage-W2FzMBY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun savePreparedInlineMessage-W2FzMBY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;ZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/passport/SetPassportDataErrorsKt {
|
||||
public static final fun setPassportDataErrors (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/passport/PassportData;Ldev/inmo/tgbotapi/utils/passport/Decryptor;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setPassportDataErrors (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -1085,30 +1235,30 @@ public final class dev/inmo/tgbotapi/extensions/api/passport/SetPassportDataErro
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/CopyMessageKt {
|
||||
public static final fun copyMessage-4vY2rXA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-4vY2rXA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-4vY2rXA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-4vY2rXA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-OcVbe1s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-OcVbe1s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-OcVbe1s$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-OcVbe1s$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-iAqBLco (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-iAqBLco$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-jlXqlwc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-jlXqlwc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-KRJ1h7Y (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-KRJ1h7Y (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-KRJ1h7Y$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-KRJ1h7Y$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-TZVTCXQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-TZVTCXQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-TZVTCXQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-TZVTCXQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-kYXRsd4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-kYXRsd4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun copyMessage-wTdqI8k (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun copyMessage-wTdqI8k$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Integer;ZZZLdev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/CopyMessagesKt {
|
||||
@@ -1179,6 +1329,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;
|
||||
@@ -1197,6 +1349,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;
|
||||
@@ -1253,6 +1407,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;
|
||||
@@ -1332,6 +1490,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;
|
||||
@@ -1410,6 +1570,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;
|
||||
@@ -1558,6 +1720,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;
|
||||
@@ -1727,6 +1896,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;
|
||||
@@ -1819,6 +1990,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;
|
||||
@@ -2071,10 +2244,6 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendStickerKt {
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVideoKt {
|
||||
public static final fun sendVideo-2mDteE4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-2mDteE4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-2mDteE4$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-CoeeeEM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-CoeeeEM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-CoeeeEM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
@@ -2083,10 +2252,14 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVideoKt {
|
||||
public static final fun sendVideo-ETv3X88 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-ETv3X88$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-ETv3X88$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-cRpLNPQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-cRpLNPQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-cRpLNPQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-cRpLNPQ$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-Ff7hz4g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-Ff7hz4g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-Ff7hz4g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-Ff7hz4g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-bKa3ifY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun sendVideo-bKa3ifY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-bKa3ifY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun sendVideo-bKa3ifY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/util/List;ZZLdev/inmo/tgbotapi/requests/abstracts/InputFile;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVideoNoteKt {
|
||||
@@ -2121,9 +2294,9 @@ public final class dev/inmo/tgbotapi/extensions/api/send/media/SendVoiceKt {
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/payments/CreateInvoiceLinkKt {
|
||||
public static final fun createInvoiceLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun createInvoiceLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun createInvoiceLink$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun createInvoiceLink$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun createInvoiceLink-1vVIECE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/time/Duration;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun createInvoiceLink-1vVIECE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Lkotlin/time/Duration;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;ZZZZZZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/send/payments/RefundStarPaymentKt {
|
||||
@@ -2172,6 +2345,15 @@ public final class dev/inmo/tgbotapi/extensions/api/send/polls/SendRegularPollKt
|
||||
public static synthetic fun sendRegularPoll-smr50Sk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;Ldev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;ZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/set/SetUserEmojiStatusKt {
|
||||
public static final fun setUserEmojiStatus-8OHYyMQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setUserEmojiStatus-OZgzbMQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;DLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setUserEmojiStatus-SrqJ0BM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setUserEmojiStatus-SrqJ0BM$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun setUserEmojiStatus-bic5Y5o (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun setUserEmojiStatus-bic5Y5o$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/stickers/AddStickerToSetKt {
|
||||
public static final fun addStickerToSet (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/types/StickerFormat;Ljava/util/List;Ldev/inmo/tgbotapi/types/stickers/MaskPosition;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun addStickerToSet (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ldev/inmo/tgbotapi/requests/abstracts/InputFile;Ldev/inmo/tgbotapi/types/StickerFormat;Ljava/util/List;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -2250,6 +2432,35 @@ public final class dev/inmo/tgbotapi/extensions/api/stickers/UploadStickerFileKt
|
||||
public static final fun uploadStickerFile-4iNBclM (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/requests/abstracts/MultipartFile;Ldev/inmo/tgbotapi/types/StickerFormat;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/stories/DeleteStoryKt {
|
||||
public static final fun deleteStory (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;Ldev/inmo/tgbotapi/types/stories/Story;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun deleteStory-8HGAsC4 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun deleteStory-CF6AVbg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun deleteStory-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/Story;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/stories/EditStoryKt {
|
||||
public static final fun editStory--jptdio (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/util/List;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editStory--jptdio$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/util/List;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun editStory-51PWt9w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun editStory-51PWt9w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editStory-51PWt9w$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun editStory-51PWt9w$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun editStory-RIEWIQk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun editStory-RIEWIQk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JLdev/inmo/tgbotapi/types/stories/InputStoryContent;Ljava/util/List;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/stories/PostStoryKt {
|
||||
public static final fun postStory-5wJhEVU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/util/List;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun postStory-5wJhEVU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/util/List;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun postStory-TVoEmL0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/util/List;Ljava/util/List;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun postStory-TVoEmL0$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/util/List;Ljava/util/List;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun postStory-rseRIdU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZZLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun postStory-rseRIdU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/util/List;ZZLdev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun postStory-rseRIdU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun postStory-rseRIdU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/stories/InputStoryContent;ILjava/util/List;ZZLdev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/thumbs/SetCustomEmojiStickerSetThumbKt {
|
||||
public static final fun setCustomEmojiStickerSetThumbnail-FMh0B1w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/stickers/StickerSet;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun setCustomEmojiStickerSetThumbnail-KofBPHw (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
@@ -2267,8 +2478,30 @@ public final class dev/inmo/tgbotapi/extensions/api/thumbs/SetStickerSetThumbnai
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/utils/UpdatesHandlingKt {
|
||||
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;Lkotlin/jvm/functions/Function2;JLdev/inmo/kslog/common/KSLog;)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/api/verifications/RemoveChatVerificationKt {
|
||||
public static final fun removeChatVerification (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/verifications/RemoveUserVerificationKt {
|
||||
public static final fun removeUserVerification-dEpx-Zg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/verifications/VerifyChatKt {
|
||||
public static final fun verifyChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static final fun verifyChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyChat$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyChat$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/verifications/VerifyUserKt {
|
||||
public static final fun verifyUser (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyUser$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun verifyUser-nc95W0g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun verifyUser-nc95W0g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLjava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/api/webhook/DeleteWebhookKt {
|
||||
|
||||
@@ -2,6 +2,7 @@ plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
id "org.jetbrains.kotlin.plugin.serialization"
|
||||
id "org.jetbrains.dokka"
|
||||
id "com.google.devtools.ksp"
|
||||
}
|
||||
|
||||
project.description = "API extensions with \"Telegram Bot API\"-like extensions for TelegramBot and RequestsExecutor"
|
||||
@@ -14,6 +15,7 @@ kotlin {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api project(":tgbotapi.core")
|
||||
api libs.microutils.ksp.variations
|
||||
}
|
||||
}
|
||||
configureEach {
|
||||
@@ -22,3 +24,8 @@ kotlin {
|
||||
}
|
||||
explicitApi()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
add("kspCommonMainMetadata", libs.microutils.ksp.variations.generator)
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,11 @@ import io.ktor.client.engine.*
|
||||
* @param ktorClientEngine Engine like [io.ktor.client.engine.cio.CIO]
|
||||
* @param ktorClientConfig Config block for preconfiguring of bot [HttpClient]
|
||||
*/
|
||||
@ConsistentCopyVisibility
|
||||
public data class BotBuilder internal constructor(
|
||||
var proxy: ProxyConfig? = null,
|
||||
var ktorClientEngineFactory: HttpClientEngineFactory<HttpClientEngineConfig>? = null,
|
||||
var ktorClientConfig: (HttpClientConfig<*>.() -> Unit) ? = null
|
||||
var ktorClientConfig: (HttpClientConfig<*>.() -> Unit) ? = null,
|
||||
) {
|
||||
internal fun createHttpClient(): HttpClient = ktorClientEngineFactory ?.let {
|
||||
HttpClient(
|
||||
@@ -41,8 +42,14 @@ public fun buildBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
block: BotBuilder.() -> Unit
|
||||
): TelegramBot = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
BotBuilder().apply(block).createHttpClient()
|
||||
urlsKeeper = TelegramAPIUrlsKeeper(
|
||||
token = token,
|
||||
testServer = testServer,
|
||||
hostUrl = apiUrl,
|
||||
fileLinkUrlMapper = fileLinkUrlMapper
|
||||
),
|
||||
client = BotBuilder().apply(block).createHttpClient()
|
||||
)
|
||||
|
||||
@@ -63,22 +63,24 @@ public inline fun telegramBot(
|
||||
* Allows to create bot using bot [token], [apiUrl] (for custom api servers) and already prepared [client]
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun telegramBot(
|
||||
public fun telegramBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
client: HttpClient = HttpClient()
|
||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, testServer, apiUrl), client)
|
||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, testServer, apiUrl, fileLinkUrlMapper), client)
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun <T: HttpClientEngineConfig> telegramBot(
|
||||
public fun <T: HttpClientEngineConfig> telegramBot(
|
||||
token: String,
|
||||
clientFactory: HttpClientEngineFactory<T>,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
noinline clientConfig: HttpClientConfig<T>.() -> Unit = {}
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
clientConfig: HttpClientConfig<T>.() -> Unit = {}
|
||||
): TelegramBot = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl, fileLinkUrlMapper),
|
||||
clientFactory,
|
||||
clientConfig
|
||||
)
|
||||
@@ -87,15 +89,15 @@ public inline fun <T: HttpClientEngineConfig> telegramBot(
|
||||
* Allows to create bot using bot [token] and specify [HttpClientEngine] by passing [clientEngine] param and optionally
|
||||
* configure [HttpClient] using [clientConfig]
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun telegramBot(
|
||||
public fun telegramBot(
|
||||
token: String,
|
||||
clientEngine: HttpClientEngine,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
noinline clientConfig: HttpClientConfig<*>.() -> Unit = {}
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
clientConfig: HttpClientConfig<*>.() -> Unit = {}
|
||||
): TelegramBot = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl, fileLinkUrlMapper),
|
||||
clientEngine,
|
||||
clientConfig
|
||||
)
|
||||
@@ -104,13 +106,13 @@ public inline fun telegramBot(
|
||||
* Allows to create bot using bot [token] and [apiUrl] and specify [HttpClientEngine] by configuring [HttpClient] using
|
||||
* [clientConfig]
|
||||
*/
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
public inline fun telegramBot(
|
||||
public fun telegramBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
noinline clientConfig: HttpClientConfig<*>.() -> Unit
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
clientConfig: HttpClientConfig<*>.() -> Unit
|
||||
): TelegramBot = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl, fileLinkUrlMapper),
|
||||
clientConfig
|
||||
)
|
||||
|
||||
@@ -3,5 +3,4 @@ package dev.inmo.tgbotapi.extensions.api
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.local.Close
|
||||
|
||||
@Suppress("unused")
|
||||
public suspend inline fun TelegramBot.close(): Boolean = execute(Close)
|
||||
public suspend inline fun TelegramBot.executeClose(): Boolean = execute(Close)
|
||||
|
||||
@@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.requests.ForwardMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.MessageThreadId
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage
|
||||
@@ -15,10 +16,11 @@ public suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = execute(
|
||||
ForwardMessage(fromChatId, toChatId, messageId, threadId, disableNotification, protectContent)
|
||||
ForwardMessage(fromChatId, toChatId, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
@@ -26,40 +28,45 @@ public suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChatId, messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChatId, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChat: Chat,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChatId, toChat.id, messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChatId, toChat.id, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
fromChat: Chat,
|
||||
toChat: Chat,
|
||||
messageId: MessageId,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChat.id, messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(fromChat.id, toChat.id, messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: AccessibleMessage,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChatId, message.messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChatId, message.messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
public suspend fun TelegramBot.forwardMessage(
|
||||
toChat: Chat,
|
||||
message: AccessibleMessage,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChat, message.messageId, threadId, disableNotification, protectContent)
|
||||
): PossiblyForwardedMessage = forwardMessage(message.chat, toChat, message.messageId, threadId, startTimestamp, disableNotification, protectContent)
|
||||
|
||||
@@ -17,6 +17,7 @@ internal fun List<Update>.convertWithMediaGroupUpdates(): List<Update> {
|
||||
for (update in this) {
|
||||
val message = (update.data as? PossiblySentViaBotCommonMessage<*>) ?.let {
|
||||
if (it.content is MediaGroupPartContent) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
it as PossiblySentViaBotCommonMessage<MediaGroupPartContent>
|
||||
} else {
|
||||
null
|
||||
@@ -48,10 +49,4 @@ internal fun List<Update>.convertWithMediaGroupUpdates(): List<Update> {
|
||||
return resultUpdates
|
||||
}
|
||||
|
||||
/**
|
||||
* @return [EditMessageMediaGroupUpdate] in case if [this] is [EditMessageUpdate]. When [this] object is
|
||||
* [EditChannelPostUpdate] instance - will return [EditChannelPostMediaGroupUpdate]
|
||||
*
|
||||
* @throws IllegalStateException
|
||||
*/
|
||||
internal fun BaseEditMessageUpdate.toEditMediaGroupUpdate() = this
|
||||
internal fun BaseEditMessageUpdate.toEditMediaGroupUpdate(): BaseEditMessageUpdate = this
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.api
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.LinkedSupervisorScope
|
||||
import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions
|
||||
import dev.inmo.tgbotapi.abstracts.Headed
|
||||
import dev.inmo.tgbotapi.abstracts.HorizontallyAccured
|
||||
import dev.inmo.tgbotapi.abstracts.Locationed
|
||||
@@ -19,6 +18,7 @@ import dev.inmo.tgbotapi.types.location.Location
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
import dev.inmo.tgbotapi.utils.launchWithBotLogger
|
||||
import kotlinx.coroutines.CoroutineStart
|
||||
import kotlinx.coroutines.currentCoroutineContext
|
||||
import kotlinx.coroutines.delay
|
||||
@@ -63,7 +63,7 @@ public suspend fun TelegramBot.handleLiveLocation(
|
||||
null
|
||||
} else {
|
||||
val scope = currentCoroutineContext().LinkedSupervisorScope()
|
||||
scope.launchSafelyWithoutExceptions(start = CoroutineStart.LAZY) {
|
||||
scope.launchWithBotLogger(start = CoroutineStart.LAZY) {
|
||||
while (scope.isActive) {
|
||||
delay(liveTimeMillis)
|
||||
// Remove previous location message info to resend live location message
|
||||
|
||||
@@ -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,25 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.ConvertGiftToStars
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
|
||||
public suspend fun TelegramBot.convertGiftToStars(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
ownedGiftId: GiftId
|
||||
): Boolean = execute(
|
||||
ConvertGiftToStars(businessConnectionId, ownedGiftId)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.convertGiftToStars(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
gift: Gift.Regular
|
||||
): Boolean = convertGiftToStars(
|
||||
businessConnectionId = businessConnectionId,
|
||||
ownedGiftId = with(gift) {id}
|
||||
)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.DeleteBusinessMessages
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.deleteBusinessMessages(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
@GenerationVariant(List::class, "messages.map { it.messageId }", "messages", AccessibleMessage::class)
|
||||
messageIds: List<MessageId>
|
||||
): Boolean = execute(
|
||||
DeleteBusinessMessages(businessConnectionId, messageIds)
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: DeleteBusinessMessages.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import kotlin.Boolean
|
||||
import kotlin.collections.List
|
||||
|
||||
public suspend fun TelegramBot.deleteBusinessMessages(businessConnectionId: BusinessConnectionId,
|
||||
messages: List<AccessibleMessage>): Boolean = deleteBusinessMessages(
|
||||
businessConnectionId = businessConnectionId, messageIds = with(messages) {messages.map {
|
||||
it.messageId }}
|
||||
)
|
||||
@@ -0,0 +1,94 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.GetBusinessAccountGifts
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.OwnedGifts
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.flow
|
||||
import kotlin.runCatching
|
||||
|
||||
public suspend fun TelegramBot.getBusinessAccountGifts(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
excludeUnsaved: Boolean = false,
|
||||
excludeSaved: Boolean = false,
|
||||
excludeUnlimited: Boolean = false,
|
||||
excludeLimited: Boolean = false,
|
||||
excludeUnique: Boolean = false,
|
||||
sortByPrice: Boolean = false,
|
||||
offset: String? = null,
|
||||
limit: Int? = null
|
||||
): OwnedGifts<GiftSentOrReceived.ReceivedInBusinessAccount> = execute(
|
||||
GetBusinessAccountGifts(
|
||||
businessConnectionId,
|
||||
excludeUnsaved,
|
||||
excludeSaved,
|
||||
excludeUnlimited,
|
||||
excludeLimited,
|
||||
excludeUnique,
|
||||
sortByPrice,
|
||||
offset,
|
||||
limit
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* Creates a flow that emits business account gifts in a paginated manner.
|
||||
*
|
||||
* This function will automatically handle pagination by using the `nextOffset` from each response
|
||||
* to fetch the next page of gifts until there are no more gifts to fetch.
|
||||
*
|
||||
* @param businessConnectionId The ID of the business connection
|
||||
* @param excludeUnsaved Whether to exclude unsaved gifts
|
||||
* @param excludeSaved Whether to exclude saved gifts
|
||||
* @param excludeUnlimited Whether to exclude unlimited gifts
|
||||
* @param excludeLimited Whether to exclude limited gifts
|
||||
* @param excludeUnique Whether to exclude unique gifts
|
||||
* @param sortByPrice Whether to sort gifts by price
|
||||
* @param initialOffset The initial offset to start fetching from. If null, starts from the beginning
|
||||
* @param limit The maximum number of gifts to fetch per request
|
||||
* @param onErrorContinueChecker A function that determines whether to continue fetching on error.
|
||||
* Returns true to continue, false to stop. Default is to stop on any error.
|
||||
* @return A flow that emits [OwnedGifts] containing the fetched gifts
|
||||
*/
|
||||
public fun TelegramBot.getBusinessAccountGiftsFlow(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
excludeUnsaved: Boolean = false,
|
||||
excludeSaved: Boolean = false,
|
||||
excludeUnlimited: Boolean = false,
|
||||
excludeLimited: Boolean = false,
|
||||
excludeUnique: Boolean = false,
|
||||
sortByPrice: Boolean = false,
|
||||
initialOffset: String? = null,
|
||||
limit: Int? = null,
|
||||
onErrorContinueChecker: suspend (Throwable?) -> Boolean = { false }
|
||||
): Flow<OwnedGifts<GiftSentOrReceived.ReceivedInBusinessAccount>> = flow {
|
||||
var currentOffset = initialOffset
|
||||
do {
|
||||
val response = runCatching {
|
||||
getBusinessAccountGifts(
|
||||
businessConnectionId,
|
||||
excludeUnsaved,
|
||||
excludeSaved,
|
||||
excludeUnlimited,
|
||||
excludeLimited,
|
||||
excludeUnique,
|
||||
sortByPrice,
|
||||
currentOffset,
|
||||
limit
|
||||
)
|
||||
}
|
||||
if (response.isSuccess) {
|
||||
val result = response.getOrThrow()
|
||||
emit(result)
|
||||
currentOffset = result.nextOffset
|
||||
} else {
|
||||
if (onErrorContinueChecker(response.exceptionOrNull())) {
|
||||
continue
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
} while (currentOffset != null)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.GetBusinessAccountStarBalance
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.payments.stars.StarAmount
|
||||
|
||||
public suspend fun TelegramBot.getBusinessAccountStarBalance(
|
||||
businessConnectionId: BusinessConnectionId
|
||||
): StarAmount = execute(
|
||||
GetBusinessAccountStarBalance(businessConnectionId)
|
||||
)
|
||||
@@ -0,0 +1,27 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.ReadBusinessMessage
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
|
||||
import dev.inmo.tgbotapi.types.toChatId
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.readBusinessMessage(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
@GenerationVariant(Chat::class, "chat.id.toChatId()", "chat")
|
||||
chatId: ChatId,
|
||||
messageId: MessageId
|
||||
): Boolean = execute(
|
||||
ReadBusinessMessage(businessConnectionId, chatId, messageId)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.readBusinessMessage(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
message: AccessibleMessage
|
||||
): Boolean = readBusinessMessage(businessConnectionId, message.chat.id.toChatId(), message.messageId)
|
||||
@@ -0,0 +1,20 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: ReadBusinessMessage.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.MessageId
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.toChatId
|
||||
import kotlin.Boolean
|
||||
|
||||
public suspend fun TelegramBot.readBusinessMessage(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
chat: Chat,
|
||||
messageId: MessageId,
|
||||
): Boolean = readBusinessMessage(
|
||||
businessConnectionId = businessConnectionId, chatId = with(chat) {chat.id.toChatId()}, messageId
|
||||
= messageId
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.RemoveBusinessAccountProfilePhoto
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.removeBusinessAccountProfilePhoto(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
isPublic: Boolean = false
|
||||
): Boolean = execute(
|
||||
RemoveBusinessAccountProfilePhoto(businessConnectionId = businessConnectionId, isPublic = isPublic)
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountBio
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.setBusinessAccountBio(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
bio: String
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountBio(businessConnectionId, bio)
|
||||
)
|
||||
@@ -0,0 +1,35 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountGiftSettings
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
|
||||
|
||||
/**
|
||||
* Sets the gift settings for a business account
|
||||
*/
|
||||
public suspend fun TelegramBot.setBusinessAccountGiftSettings(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
showGiftButton: Boolean,
|
||||
acceptedGiftTypes: AcceptedGiftTypes
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountGiftSettings(
|
||||
businessConnectionId = businessConnectionId,
|
||||
showGiftButton = showGiftButton,
|
||||
acceptedGiftTypes = acceptedGiftTypes
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* Sets the gift settings for a business account using business message context
|
||||
*/
|
||||
public suspend fun TelegramBot.setBusinessAccountGiftSettings(
|
||||
message: BusinessContentMessage<*>,
|
||||
showGiftButton: Boolean,
|
||||
acceptedGiftTypes: AcceptedGiftTypes
|
||||
): Boolean = setBusinessAccountGiftSettings(
|
||||
businessConnectionId = message.businessConnectionId,
|
||||
showGiftButton = showGiftButton,
|
||||
acceptedGiftTypes = acceptedGiftTypes
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountName
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.setBusinessAccountName(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
firstName: String,
|
||||
lastName: String? = null
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountName(businessConnectionId, firstName, lastName)
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.InputProfilePhoto
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountProfilePhoto
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.setBusinessAccountProfilePhoto(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
photo: InputProfilePhoto,
|
||||
isPublic: Boolean = false
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountProfilePhoto(businessConnectionId, photo, isPublic)
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountUsername
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.setBusinessAccountUsername(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
@GenerationVariant(String::class, "Username(username)", "username")
|
||||
username: Username
|
||||
): Boolean = execute(
|
||||
SetBusinessAccountUsername(businessConnectionId, username)
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: SetBusinessAccountUsername.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.Username
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import kotlin.Boolean
|
||||
import kotlin.String
|
||||
|
||||
public suspend
|
||||
fun TelegramBot.setBusinessAccountUsername(businessConnectionId: BusinessConnectionId,
|
||||
username: String): Boolean = setBusinessAccountUsername(
|
||||
businessConnectionId = businessConnectionId, username = with(username) { Username.prepare(username) }
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.TransferBusinessAccountStars
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
|
||||
public suspend fun TelegramBot.transferBusinessAccountStars(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
amount: Int
|
||||
): Boolean = execute(
|
||||
TransferBusinessAccountStars(businessConnectionId, amount)
|
||||
)
|
||||
@@ -0,0 +1,43 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.ConvertGiftToStars
|
||||
import dev.inmo.tgbotapi.requests.business_connection.TransferGift
|
||||
import dev.inmo.tgbotapi.requests.business_connection.UpgradeGift
|
||||
import dev.inmo.tgbotapi.types.ChatId
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.businessConnectionIdField
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.keepOriginalDetailsField
|
||||
import dev.inmo.tgbotapi.types.ownedGiftIdField
|
||||
import dev.inmo.tgbotapi.types.starCountField
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.transferGift(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
ownedGiftId: GiftId,
|
||||
newOwnerChatId: ChatId,
|
||||
transferPaymentStarCount: Int? = null,
|
||||
): Boolean = execute(
|
||||
TransferGift(
|
||||
businessConnectionId = businessConnectionId,
|
||||
ownedGiftId = ownedGiftId,
|
||||
newOwnerChatId = newOwnerChatId,
|
||||
transferPaymentStarCount = transferPaymentStarCount
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.transferGift(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
gift: Gift.Regular,
|
||||
newOwnerChatId: ChatId,
|
||||
transferPaymentStarCount: Int? = null,
|
||||
): Boolean = transferGift(
|
||||
businessConnectionId = businessConnectionId,
|
||||
ownedGiftId = gift.id,
|
||||
newOwnerChatId = newOwnerChatId,
|
||||
transferPaymentStarCount = transferPaymentStarCount
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.business
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.business_connection.ConvertGiftToStars
|
||||
import dev.inmo.tgbotapi.requests.business_connection.UpgradeGift
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.businessConnectionIdField
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.keepOriginalDetailsField
|
||||
import dev.inmo.tgbotapi.types.ownedGiftIdField
|
||||
import dev.inmo.tgbotapi.types.starCountField
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.convertGiftToStars(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
ownedGiftId: GiftId,
|
||||
keepOriginalDetails: Boolean = false,
|
||||
starCount: Int? = null
|
||||
): Boolean = execute(
|
||||
UpgradeGift(
|
||||
businessConnectionId = businessConnectionId,
|
||||
ownedGiftId = ownedGiftId,
|
||||
keepOriginalDetails = keepOriginalDetails,
|
||||
starCount = starCount
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.convertGiftToStars(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
gift: Gift.Regular,
|
||||
keepOriginalDetails: Boolean = false,
|
||||
): Boolean = execute(
|
||||
UpgradeGift(
|
||||
businessConnectionId = businessConnectionId,
|
||||
ownedGiftId = gift.id,
|
||||
keepOriginalDetails = keepOriginalDetails,
|
||||
starCount = gift.upgradeStarCount
|
||||
)
|
||||
)
|
||||
@@ -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
|
||||
)
|
||||
)
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("KDocUnresolvedReference")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.media
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
@@ -45,7 +47,7 @@ public suspend fun TelegramBot.editMessageMedia(
|
||||
* as a builder for that
|
||||
*/
|
||||
public suspend fun TelegramBot.editMessageMedia(
|
||||
message: ContentMessage<out MediaContent>,
|
||||
message: ContentMessage<MediaContent>,
|
||||
media: TelegramFreeMedia,
|
||||
businessConnectionId: BusinessConnectionId? = message.chat.id.businessConnectionId,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.payments
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.payments.EditUserStarSubscription
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.TelegramPaymentChargeId
|
||||
|
||||
public suspend fun TelegramBot.editUserStarSubscription(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
isCanceled: Boolean
|
||||
): Boolean = execute(
|
||||
EditUserStarSubscription(
|
||||
userId = userId,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = isCanceled
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.editUserStarSubscription(
|
||||
user: User,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
isCanceled: Boolean
|
||||
): Boolean = editUserStarSubscription(
|
||||
userId = user.id,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = isCanceled
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.cancelUserStarSubscription(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
userId = userId,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = true
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.cancelUserStarSubscription(
|
||||
user: User,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
user = user,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = true
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.enableUserStarSubscription(
|
||||
userId: UserId,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
userId = userId,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = false
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.enableUserStarSubscription(
|
||||
user: User,
|
||||
telegramPaymentChargeId: TelegramPaymentChargeId,
|
||||
): Boolean = editUserStarSubscription(
|
||||
user = user,
|
||||
telegramPaymentChargeId = telegramPaymentChargeId,
|
||||
isCanceled = false
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.gifts.GetAvailableGifts
|
||||
import dev.inmo.tgbotapi.types.gifts.Gifts
|
||||
|
||||
public suspend fun TelegramBot.getAvailableGifts(): Gifts = execute(GetAvailableGifts)
|
||||
@@ -0,0 +1,55 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.gifts.GiftPremiumSubscription
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.buildEntities
|
||||
|
||||
public suspend fun TelegramBot.giftPremiumSubscription(
|
||||
userId: UserId,
|
||||
monthCount: Int,
|
||||
starCount: Int,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null
|
||||
): Boolean = execute(
|
||||
GiftPremiumSubscription(
|
||||
userId = userId,
|
||||
monthCount = monthCount,
|
||||
starCount = starCount,
|
||||
text = text,
|
||||
parseMode = parseMode
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.giftPremiumSubscription(
|
||||
userId: UserId,
|
||||
monthCount: Int,
|
||||
starCount: Int,
|
||||
textSources: TextSourcesList? = null,
|
||||
): Boolean = execute(
|
||||
GiftPremiumSubscription(
|
||||
userId = userId,
|
||||
monthCount = monthCount,
|
||||
starCount = starCount,
|
||||
textSources = textSources
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.giftPremiumSubscription(
|
||||
userId: UserId,
|
||||
monthCount: Int,
|
||||
starCount: Int,
|
||||
separator: TextSource? = null,
|
||||
textBuilder: EntitiesBuilderBody
|
||||
): Boolean = execute(
|
||||
GiftPremiumSubscription(
|
||||
userId = userId,
|
||||
monthCount = monthCount,
|
||||
starCount = starCount,
|
||||
textSources = buildEntities(separator, textBuilder),
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,118 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerateVariations
|
||||
import dev.inmo.micro_utils.ksp.variations.GenerationVariant
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.gifts.SendGift
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
@GenerationVariant(
|
||||
User::class,
|
||||
"id",
|
||||
"user"
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
): Boolean = execute(
|
||||
SendGift.toUser(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
@GenerationVariant(
|
||||
PublicChat::class,
|
||||
"id",
|
||||
"chat"
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean = false
|
||||
): Boolean = execute(
|
||||
SendGift.toChat(
|
||||
chatId = chatId,
|
||||
giftId = giftId,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
@GenerationVariant(
|
||||
User::class,
|
||||
"id",
|
||||
"user"
|
||||
)
|
||||
userId: UserId,
|
||||
@GenerationVariant(
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList,
|
||||
upgradableToUnique: Boolean = false,
|
||||
): Boolean = execute(
|
||||
SendGift.toUser(
|
||||
userId = userId,
|
||||
giftId = giftId,
|
||||
textSources = textSources,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
|
||||
@GenerateVariations
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
@GenerationVariant(
|
||||
PublicChat::class,
|
||||
"id",
|
||||
"chat"
|
||||
)
|
||||
chatId: ChatIdentifier,
|
||||
@GenerationVariant(
|
||||
Gift.Regular::class,
|
||||
"id",
|
||||
"gift"
|
||||
)
|
||||
giftId: GiftId,
|
||||
textSources: TextSourcesList,
|
||||
upgradableToUnique: Boolean = false,
|
||||
): Boolean = execute(
|
||||
SendGift.toChat(
|
||||
chatId = chatId,
|
||||
giftId = giftId,
|
||||
textSources = textSources,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,73 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: SendGift.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import kotlin.Boolean
|
||||
import kotlin.String
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
userId = with(user) {id}, giftId = giftId, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGift(
|
||||
userId = with(user) {id}, giftId = giftId, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
userId = userId, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
userId: UserId,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGift(
|
||||
userId = userId, giftId = with(gift) {id}, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGift(
|
||||
user = user, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGift(
|
||||
user: User,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGift(
|
||||
user = user, giftId = with(gift) {id}, text = text, parseMode = parseMode, upgradableToUnique =
|
||||
upgradableToUnique
|
||||
)
|
||||
@@ -0,0 +1,73 @@
|
||||
// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY
|
||||
// TO REGENERATE IT JUST DELETE FILE
|
||||
// ORIGINAL FILE: SendGift.kt
|
||||
package dev.inmo.tgbotapi.extensions.api.gifts
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.GiftId
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.gifts.Gift
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import kotlin.Boolean
|
||||
import kotlin.String
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = with(chat) {id}, giftId = giftId, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
giftId: GiftId,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = with(chat) {id}, giftId = giftId, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = chatId, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chatId: ChatIdentifier,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGiftToChat(
|
||||
chatId = chatId, giftId = with(gift) {id}, text = text, parseMode = parseMode,
|
||||
upgradableToUnique = upgradableToUnique
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
): Boolean = sendGiftToChat(
|
||||
chat = chat, giftId = with(gift) {id}, text = text, parseMode = parseMode
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.sendGiftToChat(
|
||||
chat: PublicChat,
|
||||
gift: Gift.Regular,
|
||||
text: String,
|
||||
parseMode: ParseMode?,
|
||||
upgradableToUnique: Boolean,
|
||||
): Boolean = sendGiftToChat(
|
||||
chat = chat, giftId = with(gift) {id}, text = text, parseMode = parseMode, upgradableToUnique =
|
||||
upgradableToUnique
|
||||
)
|
||||
@@ -0,0 +1,45 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.inline
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.answers.InlineQueryAnswersResultsSerializer
|
||||
import dev.inmo.tgbotapi.requests.inline.SavePreparedInlineMessage
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.prepared.PreparedInlineMessage
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
public suspend fun TelegramBot.savePreparedInlineMessage(
|
||||
userId: UserId,
|
||||
result: InlineQueryResult,
|
||||
allowSendToUsers: Boolean = false,
|
||||
allowSendToBots: Boolean = false,
|
||||
allowSendToGroups: Boolean = false,
|
||||
allowSendToChannels: Boolean = false,
|
||||
): PreparedInlineMessage = execute(
|
||||
SavePreparedInlineMessage(
|
||||
userId = userId,
|
||||
result = result,
|
||||
allowSendToUsers = allowSendToUsers,
|
||||
allowSendToBots = allowSendToBots,
|
||||
allowSendToGroups = allowSendToGroups,
|
||||
allowSendToChannels = allowSendToChannels
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.savePreparedInlineMessage(
|
||||
user: User,
|
||||
result: InlineQueryResult,
|
||||
allowSendToUsers: Boolean = false,
|
||||
allowSendToBots: Boolean = false,
|
||||
allowSendToGroups: Boolean = false,
|
||||
allowSendToChannels: Boolean = false,
|
||||
): PreparedInlineMessage = savePreparedInlineMessage(
|
||||
userId = user.id,
|
||||
result = result,
|
||||
allowSendToUsers = allowSendToUsers,
|
||||
allowSendToBots = allowSendToBots,
|
||||
allowSendToGroups = allowSendToGroups,
|
||||
allowSendToChannels = allowSendToChannels
|
||||
)
|
||||
@@ -21,6 +21,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -35,6 +36,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -55,6 +57,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -68,6 +71,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -87,6 +91,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -100,6 +105,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -119,6 +125,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -132,6 +139,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -151,6 +159,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -164,6 +173,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -183,6 +193,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -195,6 +206,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -213,6 +225,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -225,6 +238,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -243,6 +257,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -255,6 +270,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -273,6 +289,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -286,6 +303,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -304,6 +322,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -317,6 +336,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -334,6 +354,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChatId.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -346,6 +367,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
@@ -363,6 +385,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
threadId: MessageThreadId? = toChat.id.threadId,
|
||||
startTimestamp: Seconds? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowPaidBroadcast: Boolean = false,
|
||||
@@ -375,6 +398,7 @@ public suspend inline fun TelegramBot.copyMessage(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
threadId = threadId,
|
||||
startTimestamp = startTimestamp,
|
||||
disableNotification = disableNotification,
|
||||
protectContent = protectContent,
|
||||
allowPaidBroadcast = allowPaidBroadcast,
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.message.content.MessageContent
|
||||
/**
|
||||
* This method will send [content] to the [chatId] as is
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
public suspend inline fun <T : MessageContent> TelegramBot.resend(
|
||||
chatId: ChatIdentifier,
|
||||
content: T,
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.send
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.LinkedSupervisorScope
|
||||
import dev.inmo.micro_utils.coroutines.runCatchingSafely
|
||||
import dev.inmo.micro_utils.coroutines.safelyWithResult
|
||||
import dev.inmo.micro_utils.coroutines.safelyWithoutExceptions
|
||||
import dev.inmo.micro_utils.coroutines.runCatchingLogging
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.send.SendAction
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
@@ -21,6 +19,7 @@ public suspend fun <T> TelegramBot.withAction(
|
||||
actionRequest: SendAction,
|
||||
block: TelegramBotActionCallback<T>
|
||||
): T {
|
||||
@Suppress("WRONG_INVOCATION_KIND")
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
@@ -33,7 +32,7 @@ public suspend fun <T> TelegramBot.withAction(
|
||||
delay(refreshTime)
|
||||
}
|
||||
}
|
||||
val result = runCatchingSafely { block() }
|
||||
val result = runCatchingLogging(logger = Log) { block() }
|
||||
actionScope.coroutineContext.job.cancel()
|
||||
return result.getOrThrow()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
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
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.ChecklistContent
|
||||
|
||||
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
|
||||
): ContentMessage<ChecklistContent> = 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
|
||||
): ContentMessage<ChecklistContent> = 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
|
||||
): ContentMessage<ChecklistContent> = 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
|
||||
): ContentMessage<ChecklistContent> = 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
|
||||
|
||||
@@ -25,6 +25,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -45,6 +47,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
@@ -87,6 +91,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = video.cover ?.fileId,
|
||||
startTimestamp = video.startTimestamp,
|
||||
duration = video.duration,
|
||||
width = video.width,
|
||||
height = video.height,
|
||||
@@ -112,6 +118,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode: ParseMode? = null,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -131,6 +139,8 @@ public suspend fun TelegramBot.sendVideo(
|
||||
parseMode = parseMode,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
@@ -192,6 +202,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -211,6 +223,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
@@ -251,6 +265,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = video.cover ?.fileId,
|
||||
startTimestamp = video.startTimestamp,
|
||||
duration = video.duration,
|
||||
width = video.width,
|
||||
height = video.height,
|
||||
@@ -275,6 +291,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities: TextSourcesList,
|
||||
showCaptionAboveMedia: Boolean = false,
|
||||
spoilered: Boolean = false,
|
||||
cover: InputFile? = null,
|
||||
startTimestamp: Seconds? = null,
|
||||
duration: Long? = null,
|
||||
width: Int? = null,
|
||||
height: Int? = null,
|
||||
@@ -293,6 +311,8 @@ public suspend inline fun TelegramBot.sendVideo(
|
||||
entities = entities,
|
||||
showCaptionAboveMedia = showCaptionAboveMedia,
|
||||
spoilered = spoilered,
|
||||
cover = cover,
|
||||
startTimestamp = startTimestamp,
|
||||
duration = duration,
|
||||
width = width,
|
||||
height = height,
|
||||
|
||||
@@ -2,9 +2,11 @@ package dev.inmo.tgbotapi.extensions.api.send.payments
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.send.payments.CreateInvoiceLink
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.payments.LabeledPrice
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.Currency
|
||||
import dev.inmo.tgbotapi.types.payments.abstracts.XTR
|
||||
import korlibs.time.TimeSpan
|
||||
|
||||
public suspend fun TelegramBot.createInvoiceLink(
|
||||
title: String,
|
||||
@@ -24,7 +26,25 @@ public suspend fun TelegramBot.createInvoiceLink(
|
||||
shouldSendEmailToProvider: Boolean = false,
|
||||
priceDependOnShipAddress: Boolean = false
|
||||
): String = execute(
|
||||
CreateInvoiceLink(title, description, payload, providerToken, currency, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
|
||||
CreateInvoiceLink(
|
||||
title = title,
|
||||
description = description,
|
||||
payload = payload,
|
||||
providerToken = providerToken,
|
||||
currency = currency,
|
||||
prices = prices,
|
||||
subscriptionPeriod = null,
|
||||
maxTipAmount = maxTipAmount,
|
||||
suggestedTipAmounts = suggestedTipAmounts ?.sorted(),
|
||||
providerData = providerData,
|
||||
requireName = requireName,
|
||||
requirePhoneNumber = requirePhoneNumber,
|
||||
requireEmail = requireEmail,
|
||||
requireShippingAddress = requireShippingAddress,
|
||||
shouldSendPhoneNumberToProvider = shouldSendPhoneNumberToProvider,
|
||||
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||
priceDependOnShipAddress = priceDependOnShipAddress
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -35,6 +55,8 @@ public suspend fun TelegramBot.createInvoiceLink(
|
||||
description: String,
|
||||
payload: String,
|
||||
prices: List<LabeledPrice>,
|
||||
businessConnectionId: BusinessConnectionId? = null,
|
||||
subscriptionPeriod: TimeSpan? = null,
|
||||
maxTipAmount: Int? = null,
|
||||
suggestedTipAmounts: List<Int>? = null,
|
||||
providerData: String? = null,
|
||||
@@ -46,5 +68,24 @@ public suspend fun TelegramBot.createInvoiceLink(
|
||||
shouldSendEmailToProvider: Boolean = false,
|
||||
priceDependOnShipAddress: Boolean = false
|
||||
): String = execute(
|
||||
CreateInvoiceLink(title, description, payload, null, Currency.XTR, prices, maxTipAmount, suggestedTipAmounts ?.sorted(), providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress)
|
||||
CreateInvoiceLink(
|
||||
title = title,
|
||||
description = description,
|
||||
payload = payload,
|
||||
providerToken = null,
|
||||
currency = Currency.XTR,
|
||||
businessConnectionId = businessConnectionId,
|
||||
prices = prices,
|
||||
subscriptionPeriod = subscriptionPeriod,
|
||||
maxTipAmount = maxTipAmount,
|
||||
suggestedTipAmounts = suggestedTipAmounts ?.sorted(),
|
||||
providerData = providerData,
|
||||
requireName = requireName,
|
||||
requirePhoneNumber = requirePhoneNumber,
|
||||
requireEmail = requireEmail,
|
||||
requireShippingAddress = requireShippingAddress,
|
||||
shouldSendPhoneNumberToProvider = shouldSendPhoneNumberToProvider,
|
||||
shouldSendEmailToProvider = shouldSendEmailToProvider,
|
||||
priceDependOnShipAddress = priceDependOnShipAddress
|
||||
)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.set
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.set.SetUserEmojiStatus
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import korlibs.time.DateTime
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
userId: UserId,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: TelegramDate? = null
|
||||
): Boolean = execute(
|
||||
SetUserEmojiStatus(
|
||||
userId = userId,
|
||||
customEmojiId = customEmojiId,
|
||||
expirationDate = expirationDate
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
user: User,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: TelegramDate? = null
|
||||
): Boolean = setUserEmojiStatus(
|
||||
user.id,
|
||||
customEmojiId,
|
||||
expirationDate
|
||||
)
|
||||
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
userId: UserId,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: DateTime
|
||||
): Boolean = setUserEmojiStatus(
|
||||
userId,
|
||||
customEmojiId,
|
||||
expirationDate.toTelegramDate()
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.setUserEmojiStatus(
|
||||
user: User,
|
||||
customEmojiId: CustomEmojiId,
|
||||
expirationDate: DateTime
|
||||
): Boolean = setUserEmojiStatus(
|
||||
user.id,
|
||||
customEmojiId,
|
||||
expirationDate
|
||||
)
|
||||
@@ -0,0 +1,42 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.stories
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.stories.DeleteStory
|
||||
import dev.inmo.tgbotapi.types.StoryId
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
|
||||
import dev.inmo.tgbotapi.types.stories.Story
|
||||
|
||||
/**
|
||||
* Deletes a story from a business account
|
||||
*/
|
||||
public suspend fun TelegramBot.deleteStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
storyId: StoryId
|
||||
): Boolean = execute(
|
||||
DeleteStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
storyId = storyId
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.deleteStory(
|
||||
message: BusinessContentMessage<*>,
|
||||
storyId: StoryId
|
||||
): Boolean = deleteStory(
|
||||
businessConnectionId = with(message) {message.businessConnectionId}, storyId = storyId
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.deleteStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
story: Story
|
||||
): Boolean = deleteStory(
|
||||
businessConnectionId = businessConnectionId, storyId = with(story) {story.id}
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.deleteStory(
|
||||
message: BusinessContentMessage<*>,
|
||||
story: Story
|
||||
): Boolean = deleteStory(
|
||||
message = message, storyId = with(story) {story.id}
|
||||
)
|
||||
@@ -0,0 +1,79 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.stories
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.stories.EditStory
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.StoryId
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.stories.InputStoryContent
|
||||
import dev.inmo.tgbotapi.types.stories.Story
|
||||
import dev.inmo.tgbotapi.types.stories.StoryArea
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.buildEntities
|
||||
|
||||
public suspend fun TelegramBot.editStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
storyId: StoryId,
|
||||
content: InputStoryContent,
|
||||
textSources: List<TextSource>,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
): Story = execute(
|
||||
EditStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
storyId = storyId,
|
||||
content = content,
|
||||
textSources = textSources,
|
||||
areas = areas,
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.editStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
storyId: StoryId,
|
||||
content: InputStoryContent,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
separator: TextSource? = null,
|
||||
textBuilder: EntitiesBuilderBody
|
||||
): Story = execute(
|
||||
EditStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
storyId = storyId,
|
||||
content = content,
|
||||
textSources = buildEntities(separator, textBuilder),
|
||||
areas = areas,
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.editStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
storyId: StoryId,
|
||||
content: InputStoryContent,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
): Story = execute(
|
||||
EditStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
storyId = storyId,
|
||||
content = content,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
areas = areas,
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.editStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
storyId: StoryId,
|
||||
content: InputStoryContent,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
): Story = execute(
|
||||
EditStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
storyId = storyId,
|
||||
content = content,
|
||||
areas = areas,
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,94 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.stories
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.stories.PostStory
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.stories.InputStoryContent
|
||||
import dev.inmo.tgbotapi.types.stories.Story
|
||||
import dev.inmo.tgbotapi.types.stories.StoryArea
|
||||
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
|
||||
import dev.inmo.tgbotapi.utils.buildEntities
|
||||
|
||||
public suspend fun TelegramBot.postStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
content: InputStoryContent,
|
||||
activePeriod: Seconds,
|
||||
textSources: List<TextSource>,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
postToChatPage: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
): Story = execute(
|
||||
PostStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
content = content,
|
||||
activePeriod = activePeriod,
|
||||
textSources = textSources,
|
||||
areas = areas,
|
||||
postToChatPage = postToChatPage,
|
||||
protectContent = protectContent
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.postStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
content: InputStoryContent,
|
||||
activePeriod: Seconds,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
postToChatPage: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
separator: TextSource? = null,
|
||||
textBuilder: EntitiesBuilderBody
|
||||
): Story = execute(
|
||||
PostStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
content = content,
|
||||
activePeriod = activePeriod,
|
||||
textSources = buildEntities(separator, textBuilder),
|
||||
areas = areas,
|
||||
postToChatPage = postToChatPage,
|
||||
protectContent = protectContent
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.postStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
content: InputStoryContent,
|
||||
activePeriod: Seconds,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
postToChatPage: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
): Story = execute(
|
||||
PostStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
content = content,
|
||||
activePeriod = activePeriod,
|
||||
text = text,
|
||||
parseMode = parseMode,
|
||||
areas = areas,
|
||||
postToChatPage = postToChatPage,
|
||||
protectContent = protectContent
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.postStory(
|
||||
businessConnectionId: BusinessConnectionId,
|
||||
content: InputStoryContent,
|
||||
activePeriod: Seconds,
|
||||
areas: List<StoryArea> = emptyList(),
|
||||
postToChatPage: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
): Story = execute(
|
||||
PostStory(
|
||||
businessConnectionId = businessConnectionId,
|
||||
content = content,
|
||||
activePeriod = activePeriod,
|
||||
areas = areas,
|
||||
postToChatPage = postToChatPage,
|
||||
protectContent = protectContent
|
||||
)
|
||||
)
|
||||
@@ -1,11 +1,13 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.utils
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions
|
||||
import dev.inmo.kslog.common.KSLog
|
||||
import dev.inmo.micro_utils.coroutines.launchLoggingDropExceptions
|
||||
import dev.inmo.tgbotapi.extensions.api.InternalUtils.convertWithMediaGroupUpdates
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.BaseMessageUpdate
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.UpdateReceiver
|
||||
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
|
||||
import dev.inmo.tgbotapi.utils.extensions.accumulateByKey
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
@@ -19,7 +21,8 @@ import kotlinx.coroutines.launch
|
||||
*/
|
||||
public fun CoroutineScope.updateHandlerWithMediaGroupsAdaptation(
|
||||
output: UpdateReceiver<Update>,
|
||||
mediaGroupsDebounceMillis: Long = 1000L
|
||||
mediaGroupsDebounceMillis: Long = 1000L,
|
||||
logger: KSLog = DefaultKTgBotAPIKSLog
|
||||
): UpdateReceiver<Update> {
|
||||
val updatesChannel = Channel<Update>(Channel.UNLIMITED)
|
||||
val mediaGroupChannel = Channel<Pair<String, BaseMessageUpdate>>(Channel.UNLIMITED)
|
||||
@@ -29,7 +32,7 @@ public fun CoroutineScope.updateHandlerWithMediaGroupsAdaptation(
|
||||
)
|
||||
|
||||
launch {
|
||||
launchSafelyWithoutExceptions {
|
||||
launchLoggingDropExceptions(logger = logger) {
|
||||
for (update in updatesChannel) {
|
||||
val data = update.data
|
||||
when {
|
||||
@@ -40,7 +43,7 @@ public fun CoroutineScope.updateHandlerWithMediaGroupsAdaptation(
|
||||
}
|
||||
}
|
||||
}
|
||||
launchSafelyWithoutExceptions {
|
||||
launchLoggingDropExceptions(logger = logger) {
|
||||
for ((_, mediaGroup) in mediaGroupAccumulatedChannel) {
|
||||
mediaGroup.convertWithMediaGroupUpdates().forEach {
|
||||
output(it)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.verifications.RemoveChatVerification
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
|
||||
public suspend fun TelegramBot.removeChatVerification(
|
||||
chatId: ChatIdentifier
|
||||
): Boolean = execute(
|
||||
RemoveChatVerification(chatId)
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.verifications.RemoveUserVerification
|
||||
import dev.inmo.tgbotapi.types.UserId
|
||||
|
||||
public suspend fun TelegramBot.removeUserVerification(
|
||||
userId: UserId
|
||||
): Boolean = execute(
|
||||
RemoveUserVerification(userId)
|
||||
)
|
||||
@@ -0,0 +1,39 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.verifications.VerifyChat
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chatIdField
|
||||
import dev.inmo.tgbotapi.types.customDescriptionField
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.verifyChat(
|
||||
chatId: ChatIdentifier,
|
||||
description: String? = null
|
||||
): Boolean = execute(
|
||||
VerifyChat(
|
||||
chatId = chatId,
|
||||
description = description
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* This method may call [verifyUser] in case when [chat] is [PrivateChat]
|
||||
*/
|
||||
public suspend fun TelegramBot.verifyChat(
|
||||
chat: Chat,
|
||||
description: String? = null
|
||||
): Boolean = when (chat) {
|
||||
is PrivateChat -> verifyUser(
|
||||
chat = chat,
|
||||
description = description
|
||||
)
|
||||
is UnknownExtendedChat,
|
||||
is UnknownChatType,
|
||||
is BusinessChat,
|
||||
is PublicChat -> verifyChat(
|
||||
chatId = chat.id,
|
||||
description = description
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.verifications
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.verifications.VerifyChat
|
||||
import dev.inmo.tgbotapi.requests.verifications.VerifyUser
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import kotlinx.serialization.SerialName
|
||||
|
||||
public suspend fun TelegramBot.verifyUser(
|
||||
userId: UserId,
|
||||
description: String? = null
|
||||
): Boolean = execute(
|
||||
VerifyUser(
|
||||
userId = userId,
|
||||
description = description
|
||||
)
|
||||
)
|
||||
|
||||
public suspend fun TelegramBot.verifyUser(
|
||||
chat: Chat,
|
||||
description: String? = null
|
||||
): Boolean = verifyUser(
|
||||
userId = chat.id.toChatId(),
|
||||
description = description
|
||||
)
|
||||
@@ -1,11 +1,13 @@
|
||||
public abstract interface class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM : dev/inmo/micro_utils/fsm/common/StatesMachine, dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext {
|
||||
public static final field Companion Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$Companion;
|
||||
public abstract fun add (Lkotlin/reflect/KClass;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public abstract fun addStrict (Lkotlin/reflect/KClass;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public static synthetic fun add$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Lkotlin/reflect/KClass;ZLdev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;ILjava/lang/Object;)V
|
||||
public fun addStrict (Lkotlin/reflect/KClass;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler;)V
|
||||
public abstract fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public abstract fun copy (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Lkotlinx/coroutines/CoroutineScope;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/flow/Flow;Lkotlin/jvm/functions/Function3;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/handlers_registrar/TriggersHolder;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;
|
||||
public abstract fun getStateInitialAction ()Lkotlin/jvm/functions/Function3;
|
||||
public abstract fun start (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public fun start (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM$Companion {
|
||||
@@ -24,6 +26,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;
|
||||
@@ -48,7 +51,7 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourConte
|
||||
}
|
||||
|
||||
public abstract interface class dev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandler : dev/inmo/micro_utils/fsm/common/StatesHandler {
|
||||
public abstract fun handleState (Ldev/inmo/micro_utils/fsm/common/StatesMachine;Ldev/inmo/micro_utils/fsm/common/State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public fun handleState (Ldev/inmo/micro_utils/fsm/common/StatesMachine;Ldev/inmo/micro_utils/fsm/common/State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public abstract fun handleState (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContextWithFSM;Ldev/inmo/micro_utils/fsm/common/State;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
@@ -102,6 +105,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;
|
||||
@@ -124,9 +128,9 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
|
||||
}
|
||||
|
||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/TelegramBotWithFSMKt {
|
||||
public static final fun telegramBotWithBehaviourAndFSM (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSM$default (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun telegramBotWithBehaviourAndFSMAndStartLongPolling (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSMAndStartLongPolling$default (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun telegramBotWithBehaviourAndFSM (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSM$default (Ljava/lang/String;Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
public static final fun telegramBotWithBehaviourAndFSMAndStartLongPolling (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
public static synthetic fun telegramBotWithBehaviourAndFSMAndStartLongPolling$default (Ljava/lang/String;Lkotlinx/coroutines/CoroutineScope;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Ldev/inmo/micro_utils/fsm/common/StatesManager;Ljava/util/List;Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourWithFSMStateHandlerHolder;ZLkotlin/jvm/functions/Function3;IZZLjava/lang/Long;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.*
|
||||
@@ -8,6 +10,8 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextWithFSM.Companion.DATA_FSM_KEY
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.handlers_registrar.TriggersHolder
|
||||
import dev.inmo.tgbotapi.utils.launchWithBotLogger
|
||||
import dev.inmo.tgbotapi.utils.subscribeWithBotLogger
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.channels.BufferOverflow
|
||||
import kotlinx.coroutines.flow.*
|
||||
@@ -72,6 +76,7 @@ interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T
|
||||
): BehaviourContextWithFSM<T>
|
||||
|
||||
companion object {
|
||||
@Suppress("RemoveExplicitTypeArguments")
|
||||
operator fun <T : State> invoke(
|
||||
behaviourContext: BehaviourContext,
|
||||
handlers: List<BehaviourWithFSMStateHandlerHolder<*, T>>,
|
||||
@@ -88,7 +93,7 @@ interface BehaviourContextWithFSM<T : State> : BehaviourContext, StatesMachine<T
|
||||
|
||||
/**
|
||||
* Add NON STRICT [handler] to list of available in future [BehaviourContextWithFSM]. Non strict means that
|
||||
* for input [State] will be used [KClass.isInstance] and any inheritor of [kClass] will pass this requirement
|
||||
* for input [State] will be used [KClass.isInstance] and any inheritor of I::class will pass this requirement
|
||||
*
|
||||
* @see BehaviourWithFSMStateHandlerHolder
|
||||
* @see BehaviourContextWithFSM.add
|
||||
@@ -98,7 +103,7 @@ inline fun <reified I : O, O: State> BehaviourContextWithFSM<O>.onStateOrSubstat
|
||||
|
||||
/**
|
||||
* Add STRICT [handler] to list of available in future [BehaviourContextWithFSM]. Strict means that
|
||||
* for input [State] will be used [State]::class == [kClass] and any [State] with exactly the same type will pass
|
||||
* for input [State] will be used [State]::class == I::class and any [State] with exactly the same type will pass
|
||||
* requirements
|
||||
*
|
||||
* @see BehaviourWithFSMStateHandlerHolder
|
||||
@@ -144,10 +149,12 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
state.context
|
||||
).apply {
|
||||
stateInitialAction(state)
|
||||
}.launchStateHandling(
|
||||
state,
|
||||
actualHandlersList
|
||||
)
|
||||
}.run {
|
||||
launchStateHandling(
|
||||
state,
|
||||
actualHandlersList
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun <I : T> add(kClass: KClass<I>, strict: Boolean, handler: BehaviourWithFSMStateHandler<I, T>) {
|
||||
@@ -155,7 +162,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
actualHandlersList = additionalHandlers + handlers
|
||||
}
|
||||
|
||||
override fun start(scope: CoroutineScope): Job = scope.launchSafelyWithoutExceptions {
|
||||
override fun start(scope: CoroutineScope): Job = scope.launchWithBotLogger {
|
||||
val statePerformer: suspend (T) -> Unit = { state: T ->
|
||||
val newState = getSubContext(state.context).launchStateHandling(state, actualHandlersList)
|
||||
if (newState != null) {
|
||||
@@ -167,7 +174,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
|
||||
fun Job.enableRemoveOnCompletion(state: T) {
|
||||
invokeOnCompletion {
|
||||
launchSafelyWithoutExceptions {
|
||||
launchWithBotLogger {
|
||||
statesJobsMutex.withLock {
|
||||
if (this@enableRemoveOnCompletion === statesJobs[state]) {
|
||||
statesJobs.remove(state)
|
||||
@@ -177,33 +184,33 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
}
|
||||
}
|
||||
|
||||
statesManager.onStartChain.subscribeSafelyWithoutExceptions(this) {
|
||||
statesManager.onStartChain.subscribeWithBotLogger(this) {
|
||||
statesJobsMutex.withLock {
|
||||
runCatchingSafely { statesJobs.remove(it) ?.cancel() }
|
||||
runCatching { statesJobs.remove(it) ?.cancel() }
|
||||
|
||||
statesJobs[it] = launch { statePerformer(it) }.apply { enableRemoveOnCompletion(it) }
|
||||
}
|
||||
}
|
||||
statesManager.onEndChain.subscribeSafelyWithoutExceptions(this) {
|
||||
statesManager.onEndChain.subscribeWithBotLogger(this) {
|
||||
statesJobsMutex.withLock {
|
||||
runCatchingSafely { statesJobs.remove(it) ?.cancel() }
|
||||
runCatching { statesJobs.remove(it) ?.cancel() }
|
||||
}
|
||||
updatesFlows.remove(it.context)
|
||||
updatesFlows.remove(it.context) ?.cancel()
|
||||
}
|
||||
statesManager.onChainStateUpdated.subscribeSafelyWithoutExceptions(this) { (old, new) ->
|
||||
statesManager.onChainStateUpdated.subscribeWithBotLogger(this) { (old, new) ->
|
||||
statesJobsMutex.withLock {
|
||||
runCatchingSafely { statesJobs.remove(old) ?.cancel() }
|
||||
runCatchingSafely { statesJobs.remove(new) ?.cancel() }
|
||||
runCatching { statesJobs.remove(old) ?.cancel() }
|
||||
runCatching { statesJobs.remove(new) ?.cancel() }
|
||||
statesJobs[new] = launch { statePerformer(new) }.apply { enableRemoveOnCompletion(new) }
|
||||
}
|
||||
if (old.context != new.context) {
|
||||
updatesFlows.remove(old.context)
|
||||
updatesFlows.remove(old.context) ?.cancel()
|
||||
}
|
||||
}
|
||||
|
||||
statesManager.getActiveStates().forEach {
|
||||
statesJobsMutex.withLock {
|
||||
runCatchingSafely { statesJobs.remove(it) ?.cancel() }
|
||||
runCatching { statesJobs.remove(it) ?.cancel() }
|
||||
|
||||
statesJobs[it] = launch { statePerformer(it) }.apply { enableRemoveOnCompletion(it) }
|
||||
}
|
||||
@@ -211,7 +218,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
}
|
||||
/**
|
||||
* Add NON STRICT [handler] to list of available in future [BehaviourContextWithFSM]. Non strict means that
|
||||
* for input [State] will be used [KClass.isInstance] and any inheritor of [kClass] will pass this requirement
|
||||
* for input [State] will be used [KClass.isInstance] and any inheritor of I::class will pass this requirement
|
||||
*
|
||||
* @see BehaviourWithFSMStateHandlerHolder
|
||||
* @see BehaviourContextWithFSM.add
|
||||
@@ -221,7 +228,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
|
||||
/**
|
||||
* Add STRICT [handler] to list of available in future [BehaviourContextWithFSM]. Strict means that
|
||||
* for input [State] will be used [State]::class == [kClass] and any [State] with exactly the same type will pass
|
||||
* for input [State] will be used [State]::class == I::class and any [State] with exactly the same type will pass
|
||||
* requirements
|
||||
*
|
||||
* @see BehaviourWithFSMStateHandlerHolder
|
||||
@@ -293,6 +300,7 @@ class DefaultBehaviourContextWithFSM<T : State>(
|
||||
* Extracting from [BehaviourContext.data] exists [StatesMachine] by key [DATA_FSM_KEY], which usually some [BehaviourContextWithFSM].
|
||||
* In case if value absent in [BehaviourContext.data] will return null
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T : State> BehaviourContext.fsmOrNull(): StatesMachine<T>? = data[DATA_FSM_KEY] as? StatesMachine<T>
|
||||
|
||||
/**
|
||||
@@ -301,4 +309,5 @@ fun <T : State> BehaviourContext.fsmOrNull(): StatesMachine<T>? = data[DATA_FSM_
|
||||
*
|
||||
* @throws NullPointerException
|
||||
*/
|
||||
@Suppress("RemoveExplicitTypeArguments")
|
||||
fun <T : State> BehaviourContext.fsmOrThrow(): StatesMachine<T> = fsmOrNull<T>()!!
|
||||
|
||||
@@ -15,6 +15,7 @@ import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMe
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Job
|
||||
@@ -56,11 +57,13 @@ suspend fun <T : State> telegramBotWithBehaviourAndFSM(
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): TelegramBot = telegramBot(
|
||||
token,
|
||||
apiUrl,
|
||||
testServer,
|
||||
fileLinkUrlMapper,
|
||||
builder
|
||||
).apply {
|
||||
buildBehaviourWithFSMAndStartLongPolling(
|
||||
@@ -113,12 +116,14 @@ suspend fun <T : State> telegramBotWithBehaviourAndFSMAndStartLongPolling(
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
stateInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContextWithFSM<T>, Unit, T> = {},
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
block: CustomBehaviourContextReceiver<DefaultBehaviourContextWithFSM<T>, Unit>
|
||||
): Pair<TelegramBot, Job> {
|
||||
return telegramBot(
|
||||
token,
|
||||
apiUrl,
|
||||
testServer,
|
||||
fileLinkUrlMapper,
|
||||
builder
|
||||
).let {
|
||||
it to it.buildBehaviourWithFSMAndStartLongPolling (
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,12 +2,14 @@
|
||||
|
||||
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
|
||||
import dev.inmo.tgbotapi.types.UpdateId
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.*
|
||||
import dev.inmo.tgbotapi.utils.launchWithBotLogger
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.channels.BufferOverflow
|
||||
import kotlinx.coroutines.flow.*
|
||||
@@ -149,16 +151,19 @@ inline fun <T> BehaviourContext(
|
||||
*
|
||||
* @param updatesFilter This param will not be used anymore
|
||||
*/
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
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 +179,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.launchWithBotLogger {
|
||||
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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.ExceptionHandler
|
||||
@@ -9,6 +11,7 @@ import dev.inmo.tgbotapi.extensions.utils.updates.retrieving.updateHandlerWithMe
|
||||
import dev.inmo.tgbotapi.types.Seconds
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
||||
import kotlinx.coroutines.*
|
||||
import kotlin.coroutines.coroutineContext
|
||||
@@ -35,11 +38,13 @@ suspend fun telegramBotWithBehaviour(
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,
|
||||
testServer: Boolean = false,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
): TelegramBot = telegramBot(
|
||||
token,
|
||||
apiUrl,
|
||||
testServer,
|
||||
fileLinkUrlMapper,
|
||||
builder
|
||||
).apply {
|
||||
buildBehaviour(
|
||||
@@ -80,12 +85,14 @@ suspend fun telegramBotWithBehaviourAndLongPolling(
|
||||
autoSkipTimeoutExceptions: Boolean = true,
|
||||
mediaGroupsDebounceTimeMillis: Long? = 1000L,
|
||||
subcontextInitialAction: CustomBehaviourContextAndTypeReceiver<BehaviourContext, Unit, Update> = {},
|
||||
fileLinkUrlMapper: TelegramAPIUrlsKeeper.(String) -> String = { "${fileBaseUrl}/$it" },
|
||||
block: BehaviourContextReceiver<Unit>
|
||||
): Pair<TelegramBot, Job> {
|
||||
return telegramBot(
|
||||
token,
|
||||
apiUrl,
|
||||
testServer,
|
||||
fileLinkUrlMapper,
|
||||
builder
|
||||
).let {
|
||||
it to it.buildBehaviourWithLongPolling(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder
|
||||
|
||||
import dev.inmo.micro_utils.coroutines.DeferredAction
|
||||
@@ -5,15 +7,15 @@ import dev.inmo.micro_utils.coroutines.invokeFirstOf
|
||||
import kotlinx.coroutines.Deferred
|
||||
import kotlinx.coroutines.async
|
||||
|
||||
suspend fun <T> BehaviourContext.parallel(
|
||||
fun <T> BehaviourContext.parallel(
|
||||
action: BehaviourContextReceiver<T>
|
||||
) = async {
|
||||
action()
|
||||
}
|
||||
|
||||
inline infix fun <T, O> Deferred<T>.withAction(noinline callback: suspend (T) -> O) = DeferredAction(this, callback)
|
||||
infix fun <T, O> Deferred<T>.withAction(callback: suspend (T) -> O) = DeferredAction(this, callback)
|
||||
|
||||
inline fun <T> Deferred<T>.asAction() = DeferredAction(this) { it }
|
||||
fun <T> Deferred<T>.asAction() = DeferredAction(this) { it }
|
||||
|
||||
suspend fun <O> BehaviourContext.oneOfActions(
|
||||
deferredActions: Iterable<DeferredAction<*, O>>
|
||||
|
||||
@@ -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 },
|
||||
@@ -44,7 +44,7 @@ suspend fun <T> FlowsUpdatesFilter.expectFlow(
|
||||
if (result.isFailure || result.getOrThrow().isEmpty()) {
|
||||
if (cancelTrigger(it)) {
|
||||
cancelRequestFactory(it) ?.also {
|
||||
safelyWithResult { bot.execute(it) }
|
||||
runCatching { bot.execute(it) }
|
||||
throw cancelledByFilterException
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
@@ -10,9 +12,9 @@ import dev.inmo.tgbotapi.utils.RiskFeature
|
||||
import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
|
||||
suspend inline fun BehaviourContext.waitChatMessageReactionsCountUpdated(
|
||||
fun BehaviourContext.waitChatMessageReactionsCountUpdated(
|
||||
initRequest: Request<*>? = null,
|
||||
noinline errorFactory: NullableRequestBuilder<*> = { null }
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
): Flow<ChatMessageReactionsCountUpdated> = expectFlow(
|
||||
initRequest,
|
||||
errorFactory
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("OPT_IN_USAGE")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
@@ -22,7 +24,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 +40,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,10 +5,14 @@ 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
|
||||
import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
|
||||
@@ -33,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(
|
||||
@@ -43,208 +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)
|
||||
|
||||
fun BehaviourContext.waitPaidMessagePriceChanged(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<PaidMessagePriceChanged>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitRegularGiftSentOrReceived(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEvents<GiftSentOrReceived.Regular>(initRequest, errorFactory)
|
||||
|
||||
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)
|
||||
|
||||
@@ -5,7 +5,9 @@ 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.PaidMessagePriceChanged
|
||||
import dev.inmo.tgbotapi.types.chat.ChatBackground
|
||||
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
|
||||
@@ -28,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(
|
||||
@@ -38,189 +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)
|
||||
|
||||
fun BehaviourContext.waitPaidMessagePriceChangedMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<PaidMessagePriceChanged>(initRequest, errorFactory)
|
||||
|
||||
fun BehaviourContext.waitRegularGiftSentOrReceivedMessages(
|
||||
initRequest: Request<*>? = null,
|
||||
errorFactory: NullableRequestBuilder<*> = { null }
|
||||
) = waitEventsMessages<GiftSentOrReceived.Regular>(initRequest, errorFactory)
|
||||
|
||||
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)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
||||
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
@@ -12,12 +14,13 @@ 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 ->
|
||||
update.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { message ->
|
||||
if (message.content.group.all { it is T }) {
|
||||
if (message.content.group.all { it.content is T }) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
listOf(message.content as MediaGroupContent<T>)
|
||||
} else {
|
||||
null
|
||||
@@ -25,27 +28,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,12 +12,13 @@ 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 ->
|
||||
update.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { message ->
|
||||
if (message.content.group.all { it is T }) {
|
||||
if (message.content.group.all { it.content is T }) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
listOf(message as MediaGroupMessage<T>)
|
||||
} else {
|
||||
null
|
||||
@@ -25,27 +26,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 }
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user