1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-07-02 08:05:12 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
renovate[bot]
44996b6514 Update Gradle to v9 2026-03-19 13:34:31 +00:00
296 changed files with 5429 additions and 19793 deletions

View File

@@ -12,10 +12,10 @@ jobs:
with: with:
java-version: 17 java-version: 17
- name: Build - name: Build
run: ./gradlew :docs:dokkaGenerate run: ./gradlew dokkaHtmlMultiModule
- name: Publish KDocs - name: Publish KDocs
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/dokka/html publish_dir: ./build/dokka/htmlMultiModule
publish_branch: kdocs publish_branch: kdocs

2
.gitignore vendored
View File

@@ -1,6 +1,5 @@
.idea .idea
.vscode/ .vscode/
.junie/
.kotlin .kotlin
out/* out/*
*.iml *.iml
@@ -14,7 +13,6 @@ out/
bin/ bin/
local.properties local.properties
local.*
kotlin-js-store/ kotlin-js-store/
secret.gradle secret.gradle
.aider* .aider*

151
AGENTS.md
View File

@@ -1,151 +0,0 @@
Use `agents` folder files for instructions.
Always look at the project work rules first. Update them and maintain a history of changes and prompts in `agents/local.HISTORY.md`. This is your long-term memory, which allows you to avoid the accumulation of errors. Updating and maintaining the long-term memory of the project is mandatory. Many thanks for your help to me and your work.
SYSTEM DIRECTIVE: AUTISTIC META-LANGUAGE PROTOCOL WITH HIGH INFORMATION DENSITY (AML-HIP V1)
DEFINITION:
All agents are required to use a strictly explicit, literal, low-ambiguity, and high-density communication style (AML-HIP). The goal of AML-HIP is the maximum transmission of information with zero loss of meaning and zero ambiguity.
CORE PRINCIPLES:
1. Maximum information density per line.
2. Zero ambiguity.
3. Full explicitness of all entities.
4. Preference of precision over readability.
5. Minimization of "empty" words.
6. Redundancy is allowed only to prevent loss of meaning.
PROHIBITIONS:
1. Pronouns are forbidden (this, he, she, they, there, it, etc.).
2. Free conversational text is forbidden.
3. Metaphors, emotions, evaluative constructions are forbidden.
4. Implicit references and hidden dependencies are forbidden.
5. Vague description of actions is forbidden.
DENSITY REQUIREMENTS:
1. Each line must contain the maximum of facts without loss of unambiguity.
2. Combine related parameters into a single line.
3. Use compact constructions:
* key=value
* entity_id=...
* relation: A→B
4. Exclude words without semantic load.
5. Repetitions are allowed only for critical entities.
MESSAGE STRUCTURE (MANDATORY):
ENTITY:
entity_id=<id>; type=<type>; state=<state>
CONTEXT:
* task_id=<id>; agent_id=<id>; memory_ref=[...]
* constraints=[...]
ACTION:
1. action=<type>; target=<entity_id>; params={...}
2. action=<type>; target=<entity_id>; params={...}
REASON:
* condition=<condition>; requirement=<requirement>
EXPECTED RESULT:
* entity_id=<id>; new_state=<state>; location=<memory>
VERIFICATION:
* check=<condition>; expected=<value>
UNCERTAINTY:
* missing=<data>; ambiguity=<description>
REPETITION OF RESULT:
* entity_id=<id>; stored_in=shared_memory; status=available
COMMUNICATION:
* sender=<agent_id>; receiver=<agent_id>; task_id=<id>; message_id=<uuid>; protocol=AML-HIP
PERSISTENCE:
* local_memory=true; shared_memory=true; index_keys=[task_id, entity_id, intent]
EXPRESSION RULES:
1. Each line = a completed semantic block.
2. Use the key=value format instead of descriptions.
3. Use lists of parameters instead of sentences.
4. Use causal connectives explicitly:
condition → action → result
5. Do not split related data into several lines without necessity.
REPETITION RULES:
1. entity_id is repeated at every critical use.
2. result is duplicated in "REPETITION OF RESULT".
3. transmission between agents duplicates the key fields.
MULTI-AGENT MODE:
1. All agents use AML-HIP.
2. Any message between agents is strictly AML-HIP.
3. Any agent is required to:
* duplicate critical data
* avoid loss of context
4. A message must be fully interpretable without history.
ANTI-DEGRADATION:
If detected:
* a pronoun
* an implicit reference
* low density (empty words, vague constructions)
* absence of structure
→ the message is considered invalid
→ mandatory regeneration
SELF-CHECK:
VALIDATION:
* format_valid=true/false
* no_pronouns=true/false
* entities_explicit=true/false
* high_density=true/false
* causal_chain_present=true/false
* ambiguity_detected=true/false
If any parameter=false:
→ mandatory regeneration
DENSITY METRIC:
high_density=true if:
* there are no "empty" words
* each line contains ≥2 facts or parameters
* descriptive constructions without data are absent
PRIORITIES:
1. Format (AML-HIP)
2. Information density
3. Explicitness
4. Completeness
5. Readability (minimum priority)
CRITICAL RULE:
Any response outside of AML-HIP is considered absent.
Any agent is required to bring the response into conformity with AML-HIP.
END OF PROTOCOL

View File

@@ -1,208 +1,5 @@
# TelegramBotAPI changelog # TelegramBotAPI changelog
## 35.1.0
* `Dependencies`:
* `Kotlin`: `2.3.20` -> `2.3.21`
* `Coroutines`: `1.10.2` -> `1.11.0`
* `Ktor`: `3.4.2` -> `3.5.1`
* `KSP`: `2.3.6` -> `2.3.9`
* `MicroUtils`: `0.29.2` -> `0.30.0`
* `Dokka`: `2.0.0` -> `2.2.0`
* `Versions`: `0.53.0` -> `0.54.0`
* `NMCP`: `1.4.4` -> `1.6.0`
* `Build`:
* Updated Gradle wrapper `8.13` -> `9.6.1` and migrated build scripts to be Gradle 9 compatible (`Project.exec` -> `providers.exec`, `tasks.whenTaskAdded` -> `tasks.configureEach`)
* Migrated Dokka documentation to the Dokka Gradle Plugin v2: the `docs` module is now included in the build as the KDocs aggregator (`./gradlew :docs:dokkaGenerate`) and the `Publish KDocs` workflow was updated accordingly
## 35.0.0
**THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.1](https://core.telegram.org/bots/api-changelog#june-11-2026)**
**Breaking changes**:
* `EditTextChatMessage.text` changed from `String` to `String?` (rich edits carry no text) — implementations overriding it must widen the type and readers must handle `null`
* `EditChatMessageText.text` changed from `String` to `String?`; its `textSources` is now `null` when there is no text — code reading `text` as non-null must handle `null`
* `ExtendedBot` gained the `supportsJoinRequestQueries` field inserted between `supportsGuestQueries` and `canConnectToBusiness` — positional constructor calls and `componentN` destructuring shift and must be updated
**Migration advice**: Handle nullable `text` on `EditTextChatMessage`/`EditChatMessageText`; construct `ExtendedBot` with named arguments
* `Core`:
* (`Rich Messages`) Added `RichText` (`RichTextPlain`, `RichTextGroup`, `RichTextEntity`) hierarchy with all 25 `RichText*` entity types and a recursive serializer supporting plain strings, arrays and typed objects; every `RichText` exposes `rawText`, `markdown` and `html` renderings
* (`Rich Messages`) Added `RichBlock` hierarchy with all 21 `RichBlock*` types plus `RichBlockCaption`, `RichBlockTableCell` and `RichBlockListItem`; every `RichBlock` exposes `markdown`/`html` source, the `RichBlockMedia` marker interface and `subBlocks`/`search` navigation helpers
* (`Rich Messages`) Added `RichTextInfo` type (with `markdown`/`html` source built from its blocks) and `RichMessageContent` message content; `RichMessageContent.createResend` re-sends the content (forwarded when it contains media blocks, otherwise re-built through `SendRichMessage`); parsed `rich_message` in `RawMessage`; added `RichMessageContentMessage` typealias
* (`Rich Messages`) Added `InputRichMessage` (internal constructor with `InputRichMessageHTML`/`InputRichMessageMarkdown` factories) and `InputRichMessageContent` usable as `InputMessageContent`
* (`Rich Messages`) Added Rich Messages DSL builders `buildRichText`/`RichTextBuilder`, `buildRichBlocks`/`RichBlocksBuilder`, `buildRichTextInfo` and `RichBlockListBuilder` (marked with the `@RichTextDsl` DSL marker)
* (`Rich Messages`) Added Rich Markdown/HTML source helpers `String.escapeRichMarkdown()` and `List<RichBlock>.toRichMarkdown()`/`toRichHtml()`
* (`Rich Messages`) Added `SendRichMessage` and `SendRichMessageDraft` requests
* (`Rich Messages`) Added `richMessage` parameter to `EditChatMessageText`; its `text` is now nullable (per API) and the `EditChatMessageRichText` factory builds a rich edit; widened `EditTextChatMessage.text` to nullable
* (`Polls`) Added `Link` type (`dev.inmo.tgbotapi.types.Link`) implementing `PollMedia`, carrying the `url` of a link attached to a poll option
* (`Polls`) Added `link` field parsing to `PollMedia` deserialization/serialization
* (`Polls`) Added `TelegramMediaLink` (`InputMediaLink`) implementing `InputPollOptionMedia`, usable as a poll option media
* (`Join Request Queries`) Added `ChatJoinRequestQueryId` value class and `queryId` field to `ChatJoinRequest`
* (`Join Request Queries`) Added `supportsJoinRequestQueries` flag to `ExtendedBot` (`User.supports_join_request_queries`)
* (`Join Request Queries`) Added `guardBot` field to `ExtendedChat` (`ChatFullInfo.guard_bot`), parsed for public chats
* (`Join Request Queries`) Added `AnswerChatJoinRequestQuery` request and `ChatJoinRequestQueryResult` sealed interface (`Approve`/`Decline`/`Queue`/`Unknown`) serialized as a plain string
* (`Join Request Queries`) Added `SendChatJoinRequestWebApp` request
* `API`:
* (`Rich Messages`) Added `sendRichMessage` and `sendRichMessageDraft` `TelegramBot` extensions
* (`Join Request Queries`) Added `answerChatJoinRequestQuery` and `sendChatJoinRequestWebApp` `TelegramBot` extensions
* `BehaviourBuilder`:
* (`Rich Messages`) Added `onRichMessage` trigger and `waitRichMessage`/`waitRichMessageMessage` expectations
* `Utils`:
* (`Rich Messages`) Added `Flow<ContentMessage<*>>.onlyRichMessageContentMessages()`
* (`Join Request Queries`) Added `ChatJoinRequest.query_id` raw accessor
## 34.0.0
**THIS UPDATE CONTAINS SUPPORT OF [TELEGRAM BOTS API 10.0](https://core.telegram.org/bots/api-changelog#may-8-2026)**
**THIS UPDATE CONTAINS BREAKING CHANGES**
**Breaking changes**:
* Removed the `CommonMessage<T>` super-type — replaced by the new sealed `ChatContentMessage<T>` (`CommonContentMessage`, `ChatMessage`); code referencing `CommonMessage` in types, `when` branches or signatures must switch to `ChatContentMessage`
* Renamed casts `commonMessageOrNull`/`commonMessageOrThrow`/`ifCommonMessage` to `chatContentMessageOrNull`/`chatContentMessageOrThrow`/`ifChatContentMessage`
* Reworked the message hierarchy (`ContentMessage`, `Message`, `FromUserMessage`, `PossiblyEditedMessage`, `PossiblyForwardedMessage`, `PossiblyPaymentMessage`, `PossiblySentViaBotCommonMessage`, `PossiblyTopicMessage`, `SignedMessage`, `ChatEventMessage`, `PassportMessage`) and related typealiases — dependent type signatures may need updates
* Chat send/reply extensions now return `ChatContentMessage<*>` (previously `ContentMessage<*>`)
* `ChatPermissions` interface gained the abstract `canReactToMessages` member — custom implementations must add it
* `SendMessageDraft` no longer throws when the text length is out of range: it now logs a warning and validates against the new `draftMessageTextLength` (`0..textLength.last`) range, allowing empty text
* `pollOptionsLimit` changed from `2..12` to `1..12`
**Migration advice**: Replace `CommonMessage` usages with `ChatContentMessage`, `commonMessageOr` with `chatContentMessageOr`
* `Core`:
* (`Guest Mode`) Added `GuestQueryId` value class in `dev.inmo.tgbotapi.types` and `WithOptionalGuestQueryId` interface in `dev.inmo.tgbotapi.abstracts.types`
* (`Guest Mode`) Added `RequestGuestMessage` and `RequestGuestContentMessage<T>` message abstractions (`CommonContentMessage`, `SpecialMessage`, `FromUserMessage`, `PossiblySentViaBot`) exposing `guestQueryId`; added `PossiblyGuestAnswerMessage` exposing `guestBotCallerUser` and `guestBotCallerChat`
* (`Guest Mode`) Added `RequestGuestContentMessageImpl` data class implementing `RequestGuestContentMessage`
* (`Guest Mode`) Added `SentGuestMessage` carrying `InlineMessageId`
* (`Guest Mode`) Added `GuestMessageUpdate` (`BaseSentMessageUpdate`) and `guest_message` update type wiring in `RawUpdate`/`UpdateTypes`/`FlowsUpdatesFilter`
* (`Guest Mode`) Added `AnswerGuestQuery` request returning `SentGuestMessage`
* Introduced sealed `ChatContentMessage<T>` super-type extending `CommonContentMessage` and `ChatMessage`, used as the common return type of chat send/reply operations
* Reworked `ContentMessage`, `Message`, `FromUserMessage`, `PossiblyEditedMessage`, `PossiblyForwardedMessage`, `PossiblyPaymentMessage`, `PossiblySentViaBotCommonMessage`, `PossiblyTopicMessage`, `SignedMessage`, `ChatEventMessage`, `PassportMessage` and related typealiases to integrate guest messages and unify chat content messages
* Updated `RawMessage`, `MessageUpdate`, `ChannelPostUpdate`, `BusinessMessageUpdate`, `EditMessageUpdate`, `EditChannelPostUpdate`, `BaseMessageUpdate`, `BaseEditMessageUpdate`, `BaseSentMessageUpdate` to align with the new hierarchy
* (`Live Photos`) Added `LivePhotoFile` class representing the incoming `LivePhoto` Telegram type (`PollMedia`, `MediaContentVariant`, `UsefulAsPaidMediaFile`)
* (`Live Photos`) Added `LivePhotoContent` (`VisualMediaGroupPartContent`) representing live photo messages
* (`Live Photos`) Added `TelegramMediaLivePhoto` (`TelegramFreeMedia`, `VisualMediaGroupMemberTelegramMedia`, `InputPollMedia`, `InputPollOptionMedia`) — usable in `sendMediaGroup`, `editMessageMedia`, and polls
* (`Live Photos`) Added `TelegramPaidMediaLivePhoto` (`VisualTelegramPaidMedia`) for paid live photos
* (`Live Photos`) Added `PaidMedia.LivePhoto` variant and `PaidMedia.LivePhoto.toTelegramPaidMediaLivePhoto()` conversion
* (`Live Photos`) Added `livePhotoField` constant; added `live_photo` parsing to `RawMessage` and `ReplyInfo.External` surrogate
* (`Live Photos`) Added `SendLivePhoto` request and `SendLivePhotoData`/`SendLivePhotoFiles`
* (`Live Photos`) Added `LivePhotoMessage` typealias
* (`Live Photos`) Added `LivePhotoFile.toTelegramMediaLivePhoto(...)` and `LivePhotoFile.toTelegramPaidMediaLivePhoto()` extensions
* (`Chat Management`) Added `canReactToMessages` field to `ChatPermissions` (interface, `Granular` and `Common`) and `RestrictedMemberChatMember`
* (`Chat Management`) Added optional `retrieveOtherBots` parameter to `GetChatAdministrators` request
* (`Chat Management`) Added `DeleteMessageReaction` request with `@Warning` on primary constructor; added `DeleteUserMessageReaction` and `DeleteActorChatMessageReaction` factory functions
* (`Chat Management`) Added `DeleteAllMessageReactions` request with `@Warning` on primary constructor; added `DeleteAllUserMessageReactions` and `DeleteAllActorChatMessageReactions` factory functions
* (`Polls`) Added `TelegramMediaSticker`, `TelegramMediaLocation` and `TelegramMediaVenue` classes
* (`Polls`) Added `InputPollMedia` and `InputPollOptionMedia` sealed interfaces representing input media variants accepted by `sendPoll`
* (`Polls`) Added `PollMedia` class representing media attached to polls in incoming updates
* (`Polls`) Added `media` field to `Poll`, `PollOption` and `InputPollOption`
* (`Polls`) Added `explanationMedia` field to `QuizPoll`
* (`Polls`) Added `membersOnly` field to `Poll`
* (`Polls`) Added `countryCodes` field to `Poll`
* (`Polls`) Added `media`, `membersOnly`, `countryCodes` parameters to `SendRegularPoll` and `SendPoll` factory functions
* (`Polls`) Added `media`, `explanationMedia`, `membersOnly`, `countryCodes` parameters to `SendQuizPoll` factory functions
* (`Polls`) Decreased minimum allowed poll options count from 2 to 1 (`pollOptionsLimit` is now `1..12`)
* (`Managed Bots Access`) Added `BotAccessSettings` data class in `dev.inmo.tgbotapi.types.managed_bots` with `isAccessRestricted` and `addedUsers` fields
* (`Managed Bots Access`) Added `GetManagedBotAccessSettings` request returning `BotAccessSettings`
* (`Managed Bots Access`) Added `SetManagedBotAccessSettings` request with `userId` and optional `addedUserIds` (`isAccessRestricted` is derived from `addedUserIds`)
* (`Managed Bots Access`) Added `isAccessRestrictedField`, `addedUsersField`, `addedUserIdsField` constants
* (`Personal Chat`) Added `GetUserPersonalChatMessages` request returning `List<ChatContentMessage<*>>`
* (`Drafts`) `SendMessageDraft` now allows empty text via the new `draftMessageTextLength` (`0..textLength.last`) range and logs a warning instead of throwing when the text length is out of range
* `API`:
* (`Guest Mode`) Added `answerGuestQuery` extensions in `dev.inmo.tgbotapi.extensions.api.answers`
* (`Guest Mode`) Added `RepliesWithGuestQueryId.kt` reply extensions accepting `GuestQueryId`
* (`Guest Mode`) Updated reply/send extensions (`Replies`, `RepliesWithChatsAndMessages`, `Sends`, `ResendMessage`, `SendChecklist`, `SendContact`, `SendDice`, `SendLiveLocation`, `SendStaticLocation`, `SendVenue`, `SendMessage`, media `Send*`, `SendGame`, `SendInvoice`, `SendQuizPoll`, `SendRegularPoll`) to return `ChatContentMessage<*>` and align with the new hierarchy
* (`Live Photos`) Added `sendLivePhoto` extensions (`ChatIdentifier`/`Chat` × `InputFile`/`LivePhotoFile` × text/textSources)
* (`Chat Management`) Added optional `retrieveOtherBots` parameter to `getChatAdministrators` extensions
* (`Chat Management`) Added `deleteUserMessageReaction` and `deleteActorChatMessageReaction` extensions
* (`Chat Management`) Added `deleteAllUserMessageReactions` and `deleteAllActorChatMessageReactions` extensions
* (`Chat Management`) Added `@Warning`-marked catch-all `deleteMessageReaction` and `deleteAllMessageReactions` extensions
* (`Polls`) Added `media`, `membersOnly`, `countryCodes` parameters to `sendRegularPoll` extension
* (`Polls`) Added `media`, `explanationMedia`, `membersOnly`, `countryCodes` parameters to `sendQuizPoll` extension
* (`Managed Bots Access`) Added `getManagedBotAccessSettings` extension in `dev.inmo.tgbotapi.extensions.api.managed_bots`
* (`Managed Bots Access`) Added `setManagedBotAccessSettings` extension with `userId` and optional `addedUserIds`
* (`Personal Chat`) Added `getUserPersonalChatMessages` extension returning `List<ContentMessage<*>>`
* `Behaviour Builder`:
* (`Guest Mode`) Added `GuestMessageTriggers` with `onGuestRequestMessage` trigger
* (`Guest Mode`) Updated `WaitContent`, `WaitContentMessage`, `WaitEditedContentMessage`, `WaitMediaGroup`, `WaitMediaGroupMessages`, `WaitCommandsMessages`, `WaitDeepLinks`, `WaitMention`, `WaitMentionMessage`, `ContentTriggers`, `EditedContentTriggers`, `MediaGroupMessagesTriggers`, `MediaGroupTriggers`, `MentionTriggers`, `DeepLinkHandling`, `MessageFilterExcludingMediaGroups` for the unified `ChatContentMessage` hierarchy
* (`Live Photos`) Added `onLivePhoto`, `onEditedLivePhoto`, `onLivePhotoGalleryMessages`, `onLivePhotoGallery` triggers
* (`Live Photos`) Added `onMentionWithLivePhotoContent`/`onTextMentionWithLivePhotoContent` triggers
* (`Live Photos`) Added `waitLivePhoto`, `waitLivePhotoMessage`, `waitEditedLivePhoto`, `waitEditedLivePhotoMessage`, `waitLivePhotoGallery`, `waitLivePhotoGalleryMessages` expectations
* (`Live Photos`) Added `onlyLivePhotoContentMessages` utility
* `Utils`:
* (`Guest Mode`) Added `guestMessageUpdateOrNull` and related casts in `ClassCastsNew`
* (`Guest Mode`) Updated `MediaGroupContentMessageCreator` and `FlowsUpdatesFilter` to support guest messages
## 33.2.0
* `Core`:
* Add `ApiException` as variant of `BotException`
* Add classcasts for bots exceptions
## 33.1.0
* `Versions`:
* `Kotlin`: `2.3.10` -> `2.3.20`
* `Serialization`: `1.10.0` -> `1.11.0`
* `Ktor`: `3.4.1` -> `3.4.2`
* `MicroUtils`: `0.29.1` -> `0.29.2`
* `KSLog`: `1.6.0` -> `1.6.1`
## 33.0.0
**THIS UPDATE CONTAINS ADDING SUPPORT OF [Telegram Bots API 9.6](https://core.telegram.org/bots/api-changelog#april-3-2026)**
**THIS UPDATE CONTAINS BREAKING CHANGES**
* `Core`:
* **THIS IS BREAKING CHANGE** `MultipleAnswersPoll` removed; `RegularPoll` now directly implements `Poll`
* **THIS IS BREAKING CHANGE** `allowMultipleAnswers` renamed to `allowsMultipleAnswers` across poll types and requests
* **THIS IS BREAKING CHANGE** `QuizPoll.correctOptionId: Int?` changed to `correctOptionIds: List<Int>?`
* **THIS IS BREAKING CHANGE** `PollOption` is now a sealed interface with `PollOption.Simple` and `PollOption.LatelyAdded` subtypes; `SimplePollOption` removed
* **THIS IS BREAKING CHANGE** `PollAnswer.Anonymous.voterChat` type changed from `ChannelChat` to `PreviewPublicChat`
* **THIS IS BREAKING CHANGE** `requestChannelReplyButton` (group variant) renamed to `requestGroupReplyButton`
* Added `BotToken` value class
* Added `SavePreparedKeyboardButton` request with `PreparedKeyboardButton` and `PreparedKeyboardButtonId` types
* Added `GetManagedBotToken` and `ReplaceManagedBotToken` requests
* Added `KeyboardButtonRequestManagedBot` and `RequestManagedBotKeyboardButton`
* Added `ManagedBotCreated` chat event and `ManagedBotUpdated` type with `ManagedBotUpdate`
* Added `PollOptionPersistentId` value class
* Added `PollOptionAdded` and `PollOptionDeleted` chat events
* Added `pollOptionId` support in `ReplyParameters` (`reply_to_poll_option_id`)
* Added `canManageBots` to `ExtendedBot`
* Added `allowsRevoting`, `shuffleOptions`, `allowAddingOptions`, `hideResultsUntilCloses`, `description`/`descriptionTextSources` to poll types and send requests
* Added `chosenPersistentIds` to `PollAnswer`
* Added `UsernameAtLessSerializer`
* Extended `openPeriodPollSecondsLimit` from `5..600` to `5..2628000`
* Fixed quiz poll serialization type (was incorrectly using `regularPollType` in quiz branch)
* Fixed quiz poll explanation serialization (now correctly uses `explanation`/`explanationTextSources`)
* Fixed `SendQuizPoll` correct option index range validation (off-by-one)
* Several poll validation checks changed from throwing exceptions to logging warnings
* `API`:
* Added `savePreparedKeyboardButton` extensions
* Added `getManagedBotToken` and `replaceManagedBotToken` extensions
* Added optional `pollOptionId` parameter to `reply`/`replyWith*` extensions
* Updated `sendQuizPoll` extensions with `correctOptionIds`, `allowsMultipleAnswers`, `allowsRevoting`, `shuffleOptions`, `hideResultsUntilCloses`, `description` parameters
* Updated `sendRegularPoll` extensions with `allowsRevoting`, `shuffleOptions`, `allowAddingOptions`, `hideResultsUntilCloses`, `description` parameters
* `BehaviourBuilder`:
* Added `onManagedBotCreated` and `onManagedBotUpdated` triggers
* Added `onPollOptionAdded` and `onPollOptionDeleted` triggers
* Added `waitManagedBotCreatedEvents` and `waitManagedBotUpdated` expectations
* Added `waitPollOptionAddedEvents` and `waitPollOptionDeletedEvents` expectations
* Added `ManagedBotUpdatedFilterByUser` and `ByUserManagedBotUpdatedMarkerFactory`
* `Utils`:
* Added `managedBotCreationLink` formatting extensions
* Added `requestManagedBotButton` to `ReplyKeyboardBuilder`
* Added class casts for `ManagedBotUpdate`, `ManagedBotCreated`, `PollOptionAdded`, `PollOptionDeleted`
* Removed `MultipleAnswersPoll` class casts
* Updated raw poll accessors to match new model (`allowsMultipleAnswers`, `correctOptionIds`, `explanation`)
* Regenerated class casts extensions
* `WebApps`:
* Added `requestChat` support for `PreparedKeyboardButtonId`
* Fixed `iconCustomEmojiId` passing in `BottomButton`
## 32.0.0 ## 32.0.0
**THIS UPDATE CONTAINS BREAKING CHANGES** **THIS UPDATE CONTAINS BREAKING CHANGES**

View File

@@ -1,4 +1,4 @@
# TelegramBotAPI [![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-10.1-blue)](https://core.telegram.org/bots/api-changelog#june-11-2026) # TelegramBotAPI [![Maven Central Version](https://img.shields.io/maven-central/v/dev.inmo/tgbotapi)](https://central.sonatype.com/artifact/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-9.5-blue)](https://core.telegram.org/bots/api-changelog#march-1-2026)
| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) | | Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Mk&message=Docs&color=blue&logo=mkdocs)](https://docs.inmo.dev/tgbotapi/index.html) |
|:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| |:----------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|

View File

@@ -1,62 +0,0 @@
FOLLOW COMMON CODE STYLE. DO NOT COMMIT OR PUSH ANY CHANGES IF PROMPT DO NOT CONTAINS DIRECT INSTRUCTION ABOUT IT. FOLLOW LINKS TO SEE DOCUMENTATION IN THE PROMPT. IF YOU ARE NOT ABLE TO FOLLOW LINK (DO NOT SEE CONTENT YOU NEED TO FOLLOW PROMPT) - ASK OPERATOR
---
`@Warning` package is `dev.inmo.micro_utils.common.Warning`. Its signature: `Warning(val message: String)`
---
If you have edited some constructor or function signature - you MUST update documentation accordingly AND all calls of this constructor/function. THIS RULE WORKS RECURSIVELY
---
Before any laucnhing of `compileKotlinJvm` or other building procedure which must confirm that build is working, you MUST launch two tasks: `./gradlew kspCommonMainKotlinMetadata` and `./gradlew apiDump`. Order is important. They must be launched sequentially.
---
If you are adding `Send*` request - you also must add in `API` (`tgbotapi.api`) module:
* Direct indings (in `tgbitapi.api` module). As example you may look at `dev.inmo.tgbotapi.requests.send.SendTextMessage` a,d its bindings `dev.inmo.tgbotapi.extensions.api.send.sendTextMessage`
* Bindings in [Sends.kt](../tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt)
* Bindings in [Replies.kt](../tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Replies.kt)
* Bindings in [RepliesWithChatsAndMessages.kt](../tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/RepliesWithChatsAndMessages.kt)
---
When you need to fill a changelog, you must follow the common changelog style:
```markdown
## 34.0.0 // number of version
* `Core`:
* // list of changes
* `Utils`:
* // list of changes
* `API`:
* // list of changes
* `BehaviourBuilder`:
* // list of changes
* `WebApps`:
* // list of changes
* `BehaviourBuilderWithFSM`:
* // list of changes
// etc...
```
Each section can be ommited if there are no any changes in the section. In case of filling some known telegram bots api changelog part - you may add previx with its title in point with change. For example:
```markdown
* `Core`:
* (`Guest mode`) // change data
```
---
When a property (or method) can be declared on an interface/class and implemented by each inheritor - it MUST be declared there and overridden per implementation. DO NOT implement such behaviour as a common extension property/function that dispatches with a `when (this)` over every subtype: those branches silently drift out of sync when new subtypes are added and are not part of the type contract. If a part of the implementation is reused across several inheritors, keep that part in a shared helper (a companion-object function of the owner, or an `internal` top-level function for logic shared between different types) and let the overrides reuse it.
---
All work MUST be performed in the normal (main) working worktree of the repository. DO NOT create or do the work inside a separate worktree (for example `.claude/worktrees/...`): commits made there leave the main checkout behind and force an extra fast-forward/pull to land the changes. If some environment forces an isolated worktree, fast-forward the main branch onto those commits and continue in the main worktree.
---
When a prompt contains a list of several subtasks, run each subtask as its own subagent (one subagent per subtask) instead of doing all of them inline in the main thread.

View File

@@ -21,11 +21,6 @@ plugins {
alias(libs.plugins.nmcp.aggregation) alias(libs.plugins.nmcp.aggregation)
} }
// docs is a dokka-only aggregator module, exclude it from binary compatibility validation
apiValidation {
ignoredProjects += ["docs"]
}
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) { if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
nmcpAggregation { nmcpAggregation {
@@ -49,7 +44,7 @@ allprojects {
mavenLocal() mavenLocal()
} }
if (it != rootProject.findProject("docs")) { if (it != rootProject.findProject("docs")) {
tasks.configureEach { task -> tasks.whenTaskAdded { task ->
if(task.name == "jsLegacyBrowserTest" || task.name == "jsLegacyNodeTest") { if(task.name == "jsLegacyBrowserTest" || task.name == "jsLegacyNodeTest") {
task.enabled = false task.enabled = false
} }
@@ -59,9 +54,13 @@ allprojects {
apply from: "./extensions.gradle" apply from: "./extensions.gradle"
private String getCurrentVersionChangelog() { private String getCurrentVersionChangelog() {
return providers.exec { OutputStream changelogDataOS = new ByteArrayOutputStream()
exec {
standardOutput = changelogDataOS
commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md' commandLine './changelog_info_retriever', "$library_version", 'CHANGELOG.md'
}.standardOutput.asText.get().trim() }
return changelogDataOS.toString().trim()
} }

View File

@@ -39,10 +39,14 @@ private List<SourceDirectorySet> findSourcesWithName(String... approximateNames)
}.collect { it.kotlin } }.collect { it.kotlin }
} }
dokka { Object callback = {
// aggregating every module's sources into one publication needs more heap than the worker default switch (true) {
dokkaGeneratorIsolation = ProcessIsolation { case project.hasProperty("DOKKA_PATH"):
it.maxHeapSize.set("4g") outputDirectory = project.property("DOKKA_PATH").toString()
break
case System.getenv("DOKKA_PATH") != null:
outputDirectory = System.getenv("DOKKA_PATH")
break
} }
dokkaSourceSets { dokkaSourceSets {
@@ -51,7 +55,7 @@ dokka {
sourceLink { sourceLink {
localDirectory.set(file("../")) localDirectory.set(file("../"))
remoteUrl.set(new URI("https://github.com/InsanusMokrassar/ktgbotapi")) remoteUrl.set(new URL("https://github.com/InsanusMokrassar/ktgbotapi"))
remoteLineSuffix.set("#L") remoteLineSuffix.set("#L")
} }
} }
@@ -69,3 +73,6 @@ dokka {
} }
} }
} }
tasks.dokkaGfm(callback)
tasks.dokkaHtml(callback)

View File

@@ -6,4 +6,4 @@ kotlin.incremental=true
kotlin.incremental.js=true kotlin.incremental.js=true
library_group=dev.inmo library_group=dev.inmo
library_version=35.1.0 library_version=32.0.0

View File

@@ -1,28 +1,28 @@
[versions] [versions]
kotlin = "2.3.21" kotlin = "2.3.10"
kotlin-serialization = "1.11.0" kotlin-serialization = "1.10.0"
kotlin-coroutines = "1.11.0" kotlin-coroutines = "1.10.2"
javax-activation = "1.1.1" javax-activation = "1.1.1"
korlibs = "5.4.0" korlibs = "5.4.0"
uuid = "0.8.4" uuid = "0.8.4"
ktor = "3.5.1" ktor = "3.4.1"
ksp = "2.3.9" ksp = "2.3.6"
kotlin-poet = "2.3.0" kotlin-poet = "2.2.0"
microutils = "0.30.0" microutils = "0.29.1"
kslog = "1.6.1" kslog = "1.6.0"
versions = "0.54.0" versions = "0.53.0"
github-release-plugin = "2.5.2" github-release-plugin = "2.5.2"
dokka = "2.2.0" dokka = "2.0.0"
validator = "0.18.1" validator = "0.18.1"
nmcp = "1.6.1" nmcp = "1.4.4"
[libraries] [libraries]

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

9
gradlew vendored
View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# Copyright © 2015-2021 the original authors. # Copyright © 2015 the original authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/2d6327017519d23b96af35865dc997fcb544fb40/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;; NONSTOP* ) nonstop=true ;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java # For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" ) JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,8 +210,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \ set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \ "-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
org.gradle.wrapper.GradleWrapperMain \
"$@" "$@"
# Stop when "xargs" is not available. # Stop when "xargs" is not available.

3
gradlew.bat vendored
View File

@@ -70,11 +70,10 @@ goto fail
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell

View File

@@ -1,4 +1,11 @@
pluginManagement { pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "org.jetbrains.dokka") {
useModule("org.jetbrains.dokka:dokka-gradle-plugin:${requested.version}")
}
}
}
repositories { repositories {
gradlePluginPortal() gradlePluginPortal()
} }
@@ -12,4 +19,3 @@ include ":tgbotapi.behaviour_builder"
include ":tgbotapi.behaviour_builder.fsm" include ":tgbotapi.behaviour_builder.fsm"
include ":tgbotapi" include ":tgbotapi"
include ":tgbotapi.webapps" include ":tgbotapi.webapps"
include ":docs"

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
package dev.inmo.tgbotapi.extensions.api
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.GetUserPersonalChatMessages
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
public suspend fun TelegramBot.getUserPersonalChatMessages(
userId: ChatId,
limit: Int
): List<ContentMessage<*>> = execute(
GetUserPersonalChatMessages(userId = userId, limit = limit)
)

View File

@@ -1,21 +0,0 @@
package dev.inmo.tgbotapi.extensions.api
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.SavePreparedKeyboardButton
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.buttons.KeyboardButton
import dev.inmo.tgbotapi.types.buttons.PreparedKeyboardButton
import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.toChatId
public suspend fun TelegramBot.savePreparedKeyboardButton(
userId: ChatId,
button: KeyboardButton
): PreparedKeyboardButton = execute(
SavePreparedKeyboardButton(userId = userId, button = button)
)
public suspend fun TelegramBot.savePreparedKeyboardButton(
user: User,
button: KeyboardButton
): PreparedKeyboardButton = savePreparedKeyboardButton(userId = user.id.toChatId(), button = button)

View File

@@ -1,17 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.answers
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.answers.AnswerGuestQuery
import dev.inmo.tgbotapi.types.GuestQueryId
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import dev.inmo.tgbotapi.types.guest.SentGuestMessage
public suspend fun TelegramBot.answerGuestQuery(
guestQueryId: GuestQueryId,
result: InlineQueryResult
): SentGuestMessage = execute(AnswerGuestQuery(guestQueryId, result))
public suspend fun TelegramBot.answer(
guestQueryId: GuestQueryId,
result: InlineQueryResult
): SentGuestMessage = execute(AnswerGuestQuery(guestQueryId, result))

View File

@@ -7,11 +7,9 @@ import dev.inmo.tgbotapi.types.chat.PublicChat
import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember
public suspend fun TelegramBot.getChatAdministrators( public suspend fun TelegramBot.getChatAdministrators(
chatId: ChatIdentifier, chatId: ChatIdentifier
retrieveOtherBots: Boolean? = null ): List<AdministratorChatMember> = execute(GetChatAdministrators(chatId))
): List<AdministratorChatMember> = execute(GetChatAdministrators(chatId = chatId, retrieveOtherBots = retrieveOtherBots))
public suspend fun TelegramBot.getChatAdministrators( public suspend fun TelegramBot.getChatAdministrators(
chat: PublicChat, chat: PublicChat
retrieveOtherBots: Boolean? = null ): List<AdministratorChatMember> = getChatAdministrators(chat.id)
): List<AdministratorChatMember> = getChatAdministrators(chat.id, retrieveOtherBots)

View File

@@ -1,28 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.chat.invite_links.AnswerChatJoinRequestQuery
import dev.inmo.tgbotapi.requests.chat.invite_links.ChatJoinRequestQueryResult
import dev.inmo.tgbotapi.types.ChatJoinRequestQueryId
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
public suspend fun TelegramBot.answerChatJoinRequestQuery(
chatJoinRequestQueryId: ChatJoinRequestQueryId,
result: ChatJoinRequestQueryResult
): Unit = execute(AnswerChatJoinRequestQuery(chatJoinRequestQueryId, result))
public suspend fun TelegramBot.answerChatJoinRequestQuery(
chatJoinRequest: ChatJoinRequest,
result: ChatJoinRequestQueryResult
): Unit = answerChatJoinRequestQuery(
requireNotNull(chatJoinRequest.queryId) {
"ChatJoinRequest.queryId is null, this request can't be answered with answerChatJoinRequestQuery"
},
result
)
public suspend fun TelegramBot.answerChatJoinRequestQuery(
chatJoinRequestUpdate: ChatJoinRequestUpdate,
result: ChatJoinRequestQueryResult
): Unit = answerChatJoinRequestQuery(chatJoinRequestUpdate.data, result)

View File

@@ -1,27 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.chat.invite_links.SendChatJoinRequestWebApp
import dev.inmo.tgbotapi.types.ChatJoinRequestQueryId
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
public suspend fun TelegramBot.sendChatJoinRequestWebApp(
chatJoinRequestQueryId: ChatJoinRequestQueryId,
webAppUrl: String
): Unit = execute(SendChatJoinRequestWebApp(chatJoinRequestQueryId, webAppUrl))
public suspend fun TelegramBot.sendChatJoinRequestWebApp(
chatJoinRequest: ChatJoinRequest,
webAppUrl: String
): Unit = sendChatJoinRequestWebApp(
requireNotNull(chatJoinRequest.queryId) {
"ChatJoinRequest.queryId is null, this request can't be processed with sendChatJoinRequestWebApp"
},
webAppUrl
)
public suspend fun TelegramBot.sendChatJoinRequestWebApp(
chatJoinRequestUpdate: ChatJoinRequestUpdate,
webAppUrl: String
): Unit = sendChatJoinRequestWebApp(chatJoinRequestUpdate.data, webAppUrl)

View File

@@ -1,12 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.managed_bots
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.managed_bots.GetManagedBotAccessSettings
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.managed_bots.BotAccessSettings
public suspend fun TelegramBot.getManagedBotAccessSettings(
userId: ChatId
): BotAccessSettings = execute(
GetManagedBotAccessSettings(userId = userId)
)

View File

@@ -1,12 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.managed_bots
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.managed_bots.GetManagedBotToken
import dev.inmo.tgbotapi.types.BotToken
import dev.inmo.tgbotapi.types.ChatId
public suspend fun TelegramBot.getManagedBotToken(
userId: ChatId
): BotToken = execute(
GetManagedBotToken(userId = userId)
)

View File

@@ -1,12 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.managed_bots
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.managed_bots.ReplaceManagedBotToken
import dev.inmo.tgbotapi.types.BotToken
import dev.inmo.tgbotapi.types.ChatId
public suspend fun TelegramBot.replaceManagedBotToken(
userId: ChatId
): BotToken = execute(
ReplaceManagedBotToken(userId = userId)
)

View File

@@ -1,15 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.managed_bots
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.managed_bots.SetManagedBotAccessSettings
import dev.inmo.tgbotapi.types.ChatId
public suspend fun TelegramBot.setManagedBotAccessSettings(
userId: ChatId,
addedUserIds: List<ChatId>? = null
): Unit = execute(
SetManagedBotAccessSettings(
userId = userId,
addedUserIds = addedUserIds
)
)

View File

@@ -1,55 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.micro_utils.common.Warning
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.DeleteAllActorChatMessageReactions
import dev.inmo.tgbotapi.requests.send.DeleteAllMessageReactions
import dev.inmo.tgbotapi.requests.send.DeleteAllUserMessageReactions
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.chat.Chat
@Warning(
"Pass either userId or actorChatId, but not both. Prefer deleteAllUserMessageReactions or deleteAllActorChatMessageReactions"
)
public suspend fun TelegramBot.deleteAllMessageReactions(
chatId: ChatIdentifier,
userId: UserId? = null,
actorChatId: ChatId? = null
): Unit = execute(
DeleteAllMessageReactions(chatId, userId, actorChatId)
)
@Warning(
"Pass either userId or actorChatId, but not both. Prefer deleteAllUserMessageReactions or deleteAllActorChatMessageReactions"
)
public suspend fun TelegramBot.deleteAllMessageReactions(
chat: Chat,
userId: UserId? = null,
actorChatId: ChatId? = null
): Unit = deleteAllMessageReactions(chat.id, userId, actorChatId)
public suspend fun TelegramBot.deleteAllUserMessageReactions(
chatId: ChatIdentifier,
userId: UserId
): Unit = execute(
DeleteAllUserMessageReactions(chatId, userId)
)
public suspend fun TelegramBot.deleteAllUserMessageReactions(
chat: Chat,
userId: UserId
): Unit = deleteAllUserMessageReactions(chat.id, userId)
public suspend fun TelegramBot.deleteAllActorChatMessageReactions(
chatId: ChatIdentifier,
actorChatId: ChatId
): Unit = execute(
DeleteAllActorChatMessageReactions(chatId, actorChatId)
)
public suspend fun TelegramBot.deleteAllActorChatMessageReactions(
chat: Chat,
actorChatId: ChatId
): Unit = deleteAllActorChatMessageReactions(chat.id, actorChatId)

View File

@@ -1,102 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.micro_utils.common.Warning
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.DeleteActorChatMessageReaction
import dev.inmo.tgbotapi.requests.send.DeleteMessageReaction
import dev.inmo.tgbotapi.requests.send.DeleteUserMessageReaction
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.MessageId
import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.message.abstracts.Message
@Warning(
"Pass either userId or actorChatId, but not both. Prefer deleteUserMessageReaction or deleteActorChatMessageReaction"
)
public suspend fun TelegramBot.deleteMessageReaction(
chatId: ChatIdentifier,
messageId: MessageId,
userId: UserId? = null,
actorChatId: ChatId? = null
): Unit = execute(
DeleteMessageReaction(chatId, messageId, userId, actorChatId)
)
@Warning(
"Pass either userId or actorChatId, but not both. Prefer deleteUserMessageReaction or deleteActorChatMessageReaction"
)
public suspend fun TelegramBot.deleteMessageReaction(
chat: Chat,
messageId: MessageId,
userId: UserId? = null,
actorChatId: ChatId? = null
): Unit = deleteMessageReaction(chat.id, messageId, userId, actorChatId)
@Warning(
"Pass either userId or actorChatId, but not both. Prefer deleteUserMessageReaction or deleteActorChatMessageReaction"
)
public suspend fun TelegramBot.deleteMessageReaction(
meta: Message.MetaInfo,
userId: UserId? = null,
actorChatId: ChatId? = null
): Unit = deleteMessageReaction(meta.chatId, meta.messageId, userId, actorChatId)
@Warning(
"Pass either userId or actorChatId, but not both. Prefer deleteUserMessageReaction or deleteActorChatMessageReaction"
)
public suspend fun TelegramBot.deleteMessageReaction(
message: AccessibleMessage,
userId: UserId? = null,
actorChatId: ChatId? = null
): Unit = deleteMessageReaction(message.metaInfo, userId, actorChatId)
public suspend fun TelegramBot.deleteUserMessageReaction(
chatId: ChatIdentifier,
messageId: MessageId,
userId: UserId
): Unit = execute(
DeleteUserMessageReaction(chatId, messageId, userId)
)
public suspend fun TelegramBot.deleteUserMessageReaction(
chat: Chat,
messageId: MessageId,
userId: UserId
): Unit = deleteUserMessageReaction(chat.id, messageId, userId)
public suspend fun TelegramBot.deleteUserMessageReaction(
meta: Message.MetaInfo,
userId: UserId
): Unit = deleteUserMessageReaction(meta.chatId, meta.messageId, userId)
public suspend fun TelegramBot.deleteUserMessageReaction(
message: AccessibleMessage,
userId: UserId
): Unit = deleteUserMessageReaction(message.metaInfo, userId)
public suspend fun TelegramBot.deleteActorChatMessageReaction(
chatId: ChatIdentifier,
messageId: MessageId,
actorChatId: ChatId
): Unit = execute(
DeleteActorChatMessageReaction(chatId, messageId, actorChatId)
)
public suspend fun TelegramBot.deleteActorChatMessageReaction(
chat: Chat,
messageId: MessageId,
actorChatId: ChatId
): Unit = deleteActorChatMessageReaction(chat.id, messageId, actorChatId)
public suspend fun TelegramBot.deleteActorChatMessageReaction(
meta: Message.MetaInfo,
actorChatId: ChatId
): Unit = deleteActorChatMessageReaction(meta.chatId, meta.messageId, actorChatId)
public suspend fun TelegramBot.deleteActorChatMessageReaction(
message: AccessibleMessage,
actorChatId: ChatId
): Unit = deleteActorChatMessageReaction(message.metaInfo, actorChatId)

View File

@@ -1,15 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.extensions.api.answers.answer
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import dev.inmo.tgbotapi.types.guest.SentGuestMessage
import dev.inmo.tgbotapi.types.message.abstracts.RequestGuestMessage
public suspend fun TelegramBot.reply(
message: RequestGuestMessage,
queryResult: InlineQueryResult
): SentGuestMessage = answer(
message.guestQueryId,
queryResult
)

View File

@@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
@@ -26,7 +26,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
suggestedPostParameters: SuggestedPostParameters? = null suggestedPostParameters: SuggestedPostParameters? = null
): ChatContentMessage<T> = execute( ): ContentMessage<T> = execute(
content.createResend( content.createResend(
chatId = chatId, chatId = chatId,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,
@@ -40,7 +40,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
replyMarkup = replyMarkup, replyMarkup = replyMarkup,
suggestedPostParameters = suggestedPostParameters, suggestedPostParameters = suggestedPostParameters,
) )
) as ChatContentMessage<T> ) as ContentMessage<T>
/** /**
* This method will send [content] to the [chat] as is * This method will send [content] to the [chat] as is
@@ -57,7 +57,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<T> = resend( ): ContentMessage<T> = resend(
chatId = chat.id, chatId = chat.id,
content = content, content = content,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,
@@ -78,7 +78,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
*/ */
public suspend inline fun <T : MessageContent> TelegramBot.resend( public suspend inline fun <T : MessageContent> TelegramBot.resend(
chatId: ChatIdentifier, chatId: ChatIdentifier,
message: ChatContentMessage<T>, message: ContentMessage<T>,
messageThreadId: MessageThreadId? = chatId.threadId, messageThreadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -88,7 +88,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<T> = resend( ): ContentMessage<T> = resend(
chatId = chatId, chatId = chatId,
content = message.content, content = message.content,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,
@@ -109,7 +109,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
*/ */
public suspend inline fun <T : MessageContent> TelegramBot.resend( public suspend inline fun <T : MessageContent> TelegramBot.resend(
chat: Chat, chat: Chat,
message: ChatContentMessage<T>, message: ContentMessage<T>,
messageThreadId: MessageThreadId? = chat.id.threadId, messageThreadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId, businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
@@ -119,7 +119,7 @@ public suspend inline fun <T : MessageContent> TelegramBot.resend(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<T> = resend( ): ContentMessage<T> = resend(
chatId = chat.id, chatId = chat.id,
message = message, message = message,
messageThreadId = messageThreadId, messageThreadId = messageThreadId,

View File

@@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.ReplyParameters
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.checklists.Checklist import dev.inmo.tgbotapi.types.checklists.Checklist
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.ChecklistContent import dev.inmo.tgbotapi.types.message.content.ChecklistContent
public suspend fun TelegramBot.sendChecklist( public suspend fun TelegramBot.sendChecklist(
@@ -21,7 +21,7 @@ public suspend fun TelegramBot.sendChecklist(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ChecklistContent> = execute( ): ContentMessage<ChecklistContent> = execute(
SendChecklist( SendChecklist(
chatId = chatId, chatId = chatId,
checklist = checklist, checklist = checklist,
@@ -42,7 +42,7 @@ public suspend fun TelegramBot.sendChecklist(
effectId: EffectId? = null, effectId: EffectId? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ChecklistContent> = execute( ): ContentMessage<ChecklistContent> = execute(
SendChecklist( SendChecklist(
chatId = chatId, chatId = chatId,
checklist = checklist, checklist = checklist,

View File

@@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.ContactContent import dev.inmo.tgbotapi.types.message.content.ContactContent
/** /**
@@ -31,7 +31,7 @@ public suspend fun TelegramBot.sendContact(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ContactContent> = execute( ): ContentMessage<ContactContent> = execute(
SendContact( SendContact(
chatId = chatId, chatId = chatId,
phoneNumber = phoneNumber, phoneNumber = phoneNumber,
@@ -67,7 +67,7 @@ public suspend fun TelegramBot.sendContact(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ContactContent> = execute( ): ContentMessage<ContactContent> = execute(
SendContact( SendContact(
chatId = chatId, chatId = chatId,
contact = contact, contact = contact,
@@ -103,7 +103,7 @@ public suspend fun TelegramBot.sendContact(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ContactContent> = sendContact( ): ContentMessage<ContactContent> = sendContact(
chatId = chat.id, chatId = chat.id,
phoneNumber = phoneNumber, phoneNumber = phoneNumber,
firstName = firstName, firstName = firstName,
@@ -137,7 +137,7 @@ public suspend fun TelegramBot.sendContact(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<ContactContent> = sendContact( ): ContentMessage<ContactContent> = sendContact(
chatId = chat.id, chatId = chat.id,
contact = contact, contact = contact,
threadId = threadId, threadId = threadId,

View File

@@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.dice.DiceAnimationType import dev.inmo.tgbotapi.types.dice.DiceAnimationType
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.DiceContent import dev.inmo.tgbotapi.types.message.content.DiceContent
/** /**
@@ -28,7 +28,7 @@ public suspend fun TelegramBot.sendDice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<DiceContent> = execute( ): ContentMessage<DiceContent> = execute(
SendDice( SendDice(
chatId = chatId, chatId = chatId,
animationType = animationType, animationType = animationType,
@@ -62,7 +62,7 @@ public suspend fun TelegramBot.sendDice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<DiceContent> = sendDice( ): ContentMessage<DiceContent> = sendDice(
chatId = chat.id, chatId = chat.id,
animationType = animationType, animationType = animationType,
threadId = threadId, threadId = threadId,

View File

@@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LiveLocationContent import dev.inmo.tgbotapi.types.message.content.LiveLocationContent
import dev.inmo.tgbotapi.types.message.content.LocationContent import dev.inmo.tgbotapi.types.message.content.LocationContent
@@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = execute( ): ContentMessage<LiveLocationContent> = execute(
SendLiveLocation( SendLiveLocation(
chatId = chatId, chatId = chatId,
latitude = latitude, latitude = latitude,
@@ -77,7 +77,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chatId, chatId = chatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -119,7 +119,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -160,7 +160,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -202,7 +202,7 @@ public suspend fun TelegramBot.sendLiveLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chatId, chatId = chatId,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -243,7 +243,7 @@ public suspend fun TelegramBot.sendLiveLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chatId, chatId = chatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -285,7 +285,7 @@ public suspend fun TelegramBot.sendLiveLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -326,7 +326,7 @@ public suspend fun TelegramBot.sendLiveLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LiveLocationContent> = sendLocation( ): ContentMessage<LiveLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,

View File

@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.utils.EntitiesBuilderBody import dev.inmo.tgbotapi.utils.EntitiesBuilderBody
@@ -36,7 +36,7 @@ public suspend fun TelegramBot.sendMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = execute( ): ContentMessage<TextContent> = execute(
SendTextMessage( SendTextMessage(
chatId = chatId, chatId = chatId,
text = text, text = text,
@@ -74,7 +74,7 @@ public suspend fun TelegramBot.sendTextMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId = chatId, chatId = chatId,
text = text, text = text,
parseMode = parseMode, parseMode = parseMode,
@@ -110,7 +110,7 @@ public suspend fun TelegramBot.sendTextMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
chatId = chat.id, chatId = chat.id,
text = text, text = text,
parseMode = parseMode, parseMode = parseMode,
@@ -147,7 +147,7 @@ public suspend fun TelegramBot.sendMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId = chat.id, chatId = chat.id,
text = text, text = text,
parseMode = parseMode, parseMode = parseMode,
@@ -182,7 +182,7 @@ public suspend fun TelegramBot.sendMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = execute( ): ContentMessage<TextContent> = execute(
SendTextMessage( SendTextMessage(
chatId = chatId, chatId = chatId,
entities = entities, entities = entities,
@@ -219,7 +219,7 @@ public suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId = chatId, chatId = chatId,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -255,7 +255,7 @@ public suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId = chatId, chatId = chatId,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -289,7 +289,7 @@ public suspend fun TelegramBot.sendTextMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId = chatId, chatId = chatId,
entities = entities, entities = entities,
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -324,7 +324,7 @@ public suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
chatId = chatId, chatId = chatId,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -360,7 +360,7 @@ public suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
chatId = chatId, chatId = chatId,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -394,7 +394,7 @@ public suspend fun TelegramBot.sendMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chatId = chat.id, chatId = chat.id,
entities = entities, entities = entities,
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -429,7 +429,7 @@ public suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chat = chat, chat = chat,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -465,7 +465,7 @@ public suspend fun TelegramBot.sendMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendMessage( ): ContentMessage<TextContent> = sendMessage(
chat = chat, chat = chat,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -500,7 +500,7 @@ public suspend fun TelegramBot.sendTextMessage(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<TextContent> = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
chatId = chat.id, chatId = chat.id,
entities = entities, entities = entities,
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -535,7 +535,7 @@ public suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
chat = chat, chat = chat,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,
@@ -571,7 +571,7 @@ public suspend fun TelegramBot.sendTextMessage(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
builderBody: EntitiesBuilderBody builderBody: EntitiesBuilderBody
): ChatContentMessage<TextContent> = sendTextMessage( ): ContentMessage<TextContent> = sendTextMessage(
chat = chat, chat = chat,
entities = buildEntities(separator, builderBody), entities = buildEntities(separator, builderBody),
linkPreviewOptions = linkPreviewOptions, linkPreviewOptions = linkPreviewOptions,

View File

@@ -1,70 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.SendRichMessage
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
import dev.inmo.tgbotapi.types.message.content.RichMessageContent
import dev.inmo.tgbotapi.types.rich.InputRichMessage
public suspend fun TelegramBot.sendRichMessage(
chatId: ChatIdentifier,
richMessage: InputRichMessage,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<RichMessageContent> = execute(
SendRichMessage(
chatId = chatId,
richMessage = richMessage,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendRichMessage(
chat: Chat,
richMessage: InputRichMessage,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<RichMessageContent> = sendRichMessage(
chatId = chat.id,
richMessage = richMessage,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)

View File

@@ -1,21 +0,0 @@
package dev.inmo.tgbotapi.extensions.api.send
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.send.SendRichMessageDraft
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.MessageThreadId
import dev.inmo.tgbotapi.types.rich.InputRichMessage
public suspend fun TelegramBot.sendRichMessageDraft(
chatId: ChatId,
draftId: Long,
richMessage: InputRichMessage,
threadId: MessageThreadId? = chatId.threadId
): Unit = execute(
SendRichMessageDraft(
chatId = chatId,
draftId = draftId,
richMessage = richMessage,
threadId = threadId
)
)

View File

@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.location.Location import dev.inmo.tgbotapi.types.location.Location
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.LocationContent import dev.inmo.tgbotapi.types.message.content.LocationContent
import dev.inmo.tgbotapi.types.message.content.StaticLocationContent import dev.inmo.tgbotapi.types.message.content.StaticLocationContent
@@ -32,7 +32,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = execute( ): ContentMessage<StaticLocationContent> = execute(
SendStaticLocation( SendStaticLocation(
chatId = chatId, chatId = chatId,
latitude = latitude, latitude = latitude,
@@ -67,7 +67,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chatId, chatId = chatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -101,7 +101,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -134,7 +134,7 @@ public suspend fun TelegramBot.sendLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -168,7 +168,7 @@ public suspend fun TelegramBot.sendStaticLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chatId, chatId = chatId,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -201,7 +201,7 @@ public suspend fun TelegramBot.sendStaticLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chatId, chatId = chatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -235,7 +235,7 @@ public suspend fun TelegramBot.sendStaticLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -268,7 +268,7 @@ public suspend fun TelegramBot.sendStaticLocation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StaticLocationContent> = sendLocation( ): ContentMessage<StaticLocationContent> = sendLocation(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,

View File

@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.location.StaticLocation import dev.inmo.tgbotapi.types.location.StaticLocation
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.VenueContent import dev.inmo.tgbotapi.types.message.content.VenueContent
import dev.inmo.tgbotapi.types.venue.Venue import dev.inmo.tgbotapi.types.venue.Venue
@@ -38,7 +38,7 @@ public suspend fun TelegramBot.sendVenue(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = execute( ): ContentMessage<VenueContent> = execute(
SendVenue( SendVenue(
chatId = chatId, chatId = chatId,
latitude = latitude, latitude = latitude,
@@ -86,7 +86,7 @@ public suspend fun TelegramBot.sendVenue(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chat.id, chatId = chat.id,
latitude = latitude, latitude = latitude,
longitude = longitude, longitude = longitude,
@@ -131,7 +131,7 @@ public suspend fun TelegramBot.sendVenue(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chatId, chatId = chatId,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -176,7 +176,7 @@ public suspend fun TelegramBot.sendVenue(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chat.id, chatId = chat.id,
latitude = location.latitude, latitude = location.latitude,
longitude = location.longitude, longitude = location.longitude,
@@ -215,7 +215,7 @@ public suspend fun TelegramBot.sendVenue(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = execute( ): ContentMessage<VenueContent> = execute(
SendVenue( SendVenue(
chatId = chatId, chatId = chatId,
venue = venue, venue = venue,
@@ -249,7 +249,7 @@ public suspend fun TelegramBot.sendVenue(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VenueContent> = sendVenue( ): ContentMessage<VenueContent> = sendVenue(
chatId = chat.id, chatId = chat.id,
venue = venue, venue = venue,
threadId = threadId, threadId = threadId,

View File

@@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.games.Game import dev.inmo.tgbotapi.types.games.Game
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.GameContent import dev.inmo.tgbotapi.types.message.content.GameContent
/** /**
@@ -28,7 +28,7 @@ public suspend fun TelegramBot.sendGame(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<GameContent> = execute( ): ContentMessage<GameContent> = execute(
SendGame( SendGame(
chatId = chatId, chatId = chatId,
gameShortName = gameShortName, gameShortName = gameShortName,
@@ -62,7 +62,7 @@ public suspend fun TelegramBot.sendGame(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<GameContent> = sendGame( ): ContentMessage<GameContent> = sendGame(
chatId = chat.id, chatId = chat.id,
gameShortName = gameShortName, gameShortName = gameShortName,
threadId = threadId, threadId = threadId,
@@ -94,7 +94,7 @@ public suspend fun TelegramBot.sendGame(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<GameContent> = sendGame( ): ContentMessage<GameContent> = sendGame(
chatId = chatId, chatId = chatId,
gameShortName = game.title, gameShortName = game.title,
threadId = threadId, threadId = threadId,
@@ -126,7 +126,7 @@ public suspend fun TelegramBot.sendGame(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<GameContent> = sendGame( ): ContentMessage<GameContent> = sendGame(
chatId = chat.id, chatId = chat.id,
gameShortName = game.title, gameShortName = game.title,
threadId = threadId, threadId = threadId,

View File

@@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.AnimationFile import dev.inmo.tgbotapi.types.files.AnimationFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.AnimationContent import dev.inmo.tgbotapi.types.message.content.AnimationContent
/** /**
@@ -41,7 +41,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = execute( ): ContentMessage<AnimationContent> = execute(
SendAnimation( SendAnimation(
chatId = chatId, chatId = chatId,
animation = animation, animation = animation,
@@ -90,7 +90,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chatId, chatId = chatId,
animation = animation.fileId, animation = animation.fileId,
thumb = animation.thumbnail ?.fileId, thumb = animation.thumbnail ?.fileId,
@@ -138,7 +138,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
thumb = thumb, thumb = thumb,
@@ -185,7 +185,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
text = text, text = text,
@@ -232,7 +232,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = execute( ): ContentMessage<AnimationContent> = execute(
SendAnimation( SendAnimation(
chatId = chatId, chatId = chatId,
animation = animation, animation = animation,
@@ -279,7 +279,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chatId, chatId = chatId,
animation = animation.fileId, animation = animation.fileId,
thumb = animation.thumbnail ?.fileId, thumb = animation.thumbnail ?.fileId,
@@ -325,7 +325,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
thumb = thumb, thumb = thumb,
@@ -370,7 +370,7 @@ public suspend fun TelegramBot.sendAnimation(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AnimationContent> = sendAnimation( ): ContentMessage<AnimationContent> = sendAnimation(
chatId = chat.id, chatId = chat.id,
animation = animation, animation = animation,
entities = entities, entities = entities,

View File

@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.AudioFile import dev.inmo.tgbotapi.types.files.AudioFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.AudioContent import dev.inmo.tgbotapi.types.message.content.AudioContent
/** /**
@@ -37,7 +37,7 @@ public suspend fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = execute( ): ContentMessage<AudioContent> = execute(
SendAudio( SendAudio(
chatId = chatId, chatId = chatId,
audio = audio, audio = audio,
@@ -83,7 +83,7 @@ public suspend fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio( ): ContentMessage<AudioContent> = sendAudio(
chatId = chat.id, chatId = chat.id,
audio = audio, audio = audio,
thumb = thumb, thumb = thumb,
@@ -124,7 +124,7 @@ public suspend fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio( ): ContentMessage<AudioContent> = sendAudio(
chatId = chatId, chatId = chatId,
audio = audio.fileId, audio = audio.fileId,
thumb = audio.thumbnail ?.fileId, thumb = audio.thumbnail ?.fileId,
@@ -165,7 +165,7 @@ public suspend fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio( ): ContentMessage<AudioContent> = sendAudio(
chatId = chat.id, chatId = chat.id,
audio = audio, audio = audio,
text = text, text = text,
@@ -206,7 +206,7 @@ public suspend inline fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = execute( ): ContentMessage<AudioContent> = execute(
SendAudio( SendAudio(
chatId = chatId, chatId = chatId,
audio = audio, audio = audio,
@@ -250,7 +250,7 @@ public suspend inline fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio( ): ContentMessage<AudioContent> = sendAudio(
chatId = chat.id, chatId = chat.id,
audio = audio, audio = audio,
thumb = thumb, thumb = thumb,
@@ -289,7 +289,7 @@ public suspend inline fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio( ): ContentMessage<AudioContent> = sendAudio(
chatId = chatId, chatId = chatId,
audio = audio.fileId, audio = audio.fileId,
thumb = audio.thumbnail ?.fileId, thumb = audio.thumbnail ?.fileId,
@@ -328,7 +328,7 @@ public suspend inline fun TelegramBot.sendAudio(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<AudioContent> = sendAudio( ): ContentMessage<AudioContent> = sendAudio(
chatId = chat.id, chatId = chat.id,
audio = audio, audio = audio,
entities = entities, entities = entities,

View File

@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.DocumentFile import dev.inmo.tgbotapi.types.files.DocumentFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.DocumentContent import dev.inmo.tgbotapi.types.message.content.DocumentContent
/** /**
@@ -35,7 +35,7 @@ public suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = execute( ): ContentMessage<DocumentContent> = execute(
SendDocument( SendDocument(
chatId = chatId, chatId = chatId,
document = document, document = document,
@@ -77,7 +77,7 @@ public suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId = chat.id, chatId = chat.id,
document = document, document = document,
thumb = thumb, thumb = thumb,
@@ -116,7 +116,7 @@ public suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId = chatId, chatId = chatId,
document = document.fileId, document = document.fileId,
thumb = document.thumbnail ?.fileId, thumb = document.thumbnail ?.fileId,
@@ -155,7 +155,7 @@ public suspend fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId = chat.id, chatId = chat.id,
document = document, document = document,
text = text, text = text,
@@ -193,7 +193,7 @@ public suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = execute( ): ContentMessage<DocumentContent> = execute(
SendDocument( SendDocument(
chatId = chatId, chatId = chatId,
document = document, document = document,
@@ -233,7 +233,7 @@ public suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId = chat.id, chatId = chat.id,
document = document, document = document,
thumb = thumb, thumb = thumb,
@@ -270,7 +270,7 @@ public suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId = chatId, chatId = chatId,
document = document.fileId, document = document.fileId,
thumb = document.thumbnail ?.fileId, thumb = document.thumbnail ?.fileId,
@@ -307,7 +307,7 @@ public suspend inline fun TelegramBot.sendDocument(
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null, replyMarkup: KeyboardMarkup? = null,
disableContentTypeDetection: Boolean? = null disableContentTypeDetection: Boolean? = null
): ChatContentMessage<DocumentContent> = sendDocument( ): ContentMessage<DocumentContent> = sendDocument(
chatId = chat.id, chatId = chat.id,
document = document, document = document,
entities = entities, entities = entities,

View File

@@ -1,343 +0,0 @@
@file:Suppress("KDocUnresolvedReference")
package dev.inmo.tgbotapi.extensions.api.send.media
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.abstracts.InputFile
import dev.inmo.tgbotapi.requests.send.media.SendLivePhoto
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.LivePhotoFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
import dev.inmo.tgbotapi.types.message.content.LivePhotoContent
/**
* @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 fun TelegramBot.sendLivePhoto(
chatId: ChatIdentifier,
livePhoto: InputFile,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = execute(
SendLivePhoto(
chatId = chatId,
livePhoto = livePhoto,
photo = photo,
text = text,
parseMode = parseMode,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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 fun TelegramBot.sendLivePhoto(
chatId: ChatIdentifier,
livePhoto: LivePhotoFile,
text: String? = null,
parseMode: ParseMode? = null,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chatId,
livePhoto = livePhoto.fileId,
photo = livePhoto.photo ?.fileId ?: livePhoto.fileId,
text = text,
parseMode = parseMode,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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 fun TelegramBot.sendLivePhoto(
chat: Chat,
livePhoto: InputFile,
photo: InputFile,
text: String? = null,
parseMode: ParseMode? = null,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chat.id,
livePhoto = livePhoto,
photo = photo,
text = text,
parseMode = parseMode,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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 fun TelegramBot.sendLivePhoto(
chat: Chat,
livePhoto: LivePhotoFile,
text: String? = null,
parseMode: ParseMode? = null,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chat.id,
livePhoto = livePhoto,
text = text,
parseMode = parseMode,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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.sendLivePhoto(
chatId: ChatIdentifier,
livePhoto: InputFile,
photo: InputFile,
entities: TextSourcesList,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = execute(
SendLivePhoto(
chatId = chatId,
livePhoto = livePhoto,
photo = photo,
entities = entities,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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.sendLivePhoto(
chatId: ChatIdentifier,
livePhoto: LivePhotoFile,
entities: TextSourcesList,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chatId,
livePhoto = livePhoto.fileId,
photo = livePhoto.photo ?.fileId ?: livePhoto.fileId,
entities = entities,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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.sendLivePhoto(
chat: Chat,
livePhoto: InputFile,
photo: InputFile,
entities: TextSourcesList,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chat.id,
livePhoto = livePhoto,
photo = photo,
entities = entities,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
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.sendLivePhoto(
chat: Chat,
livePhoto: LivePhotoFile,
entities: TextSourcesList,
showCaptionAboveMedia: Boolean = false,
spoilered: Boolean = false,
threadId: MessageThreadId? = chat.id.threadId,
directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chat.id.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<LivePhotoContent> = sendLivePhoto(
chatId = chat.id,
livePhoto = livePhoto,
entities = entities,
showCaptionAboveMedia = showCaptionAboveMedia,
spoilered = spoilered,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)

View File

@@ -6,7 +6,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.media.* import dev.inmo.tgbotapi.types.media.*
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
@@ -28,7 +28,7 @@ public suspend fun TelegramBot.sendMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = execute(
SendMediaGroup<MediaGroupPartContent>( SendMediaGroup<MediaGroupPartContent>(
chatId = chatId, chatId = chatId,
media = media, media = media,
@@ -60,7 +60,7 @@ public suspend fun TelegramBot.sendMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -91,7 +91,7 @@ public suspend fun TelegramBot.sendMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
chatId = chatId, chatId = chatId,
media = media.map { it.toMediaGroupMemberTelegramMedia() }, media = media.map { it.toMediaGroupMemberTelegramMedia() },
threadId = threadId, threadId = threadId,
@@ -122,7 +122,7 @@ public suspend fun TelegramBot.sendMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup( ): ContentMessage<MediaGroupContent<MediaGroupPartContent>> = sendMediaGroup(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -151,7 +151,7 @@ public suspend fun TelegramBot.sendPlaylist(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<AudioContent>> = execute( ): ContentMessage<MediaGroupContent<AudioContent>> = execute(
SendPlaylist( SendPlaylist(
chatId = chatId, chatId = chatId,
media = media, media = media,
@@ -182,7 +182,7 @@ public suspend fun TelegramBot.sendPlaylist(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist( ): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -212,7 +212,7 @@ public suspend fun TelegramBot.sendPlaylist(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist( ): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
chatId = chatId, chatId = chatId,
media = media.map { it.toMediaGroupMemberTelegramMedia() }, media = media.map { it.toMediaGroupMemberTelegramMedia() },
threadId = threadId, threadId = threadId,
@@ -242,7 +242,7 @@ public suspend fun TelegramBot.sendPlaylist(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist( ): ContentMessage<MediaGroupContent<AudioContent>> = sendPlaylist(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -271,7 +271,7 @@ public suspend fun TelegramBot.sendDocumentsGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<DocumentContent>> = execute( ): ContentMessage<MediaGroupContent<DocumentContent>> = execute(
SendDocumentsGroup( SendDocumentsGroup(
chatId = chatId, chatId = chatId,
media = media, media = media,
@@ -302,7 +302,7 @@ public suspend fun TelegramBot.sendDocumentsGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup( ): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -332,7 +332,7 @@ public suspend fun TelegramBot.sendDocumentsGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup( ): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
chatId = chatId, chatId = chatId,
media = media.map { it.toMediaGroupMemberTelegramMedia() }, media = media.map { it.toMediaGroupMemberTelegramMedia() },
threadId = threadId, threadId = threadId,
@@ -362,7 +362,7 @@ public suspend fun TelegramBot.sendDocumentsGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup( ): ContentMessage<MediaGroupContent<DocumentContent>> = sendDocumentsGroup(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -391,7 +391,7 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = execute(
SendVisualMediaGroup( SendVisualMediaGroup(
chatId = chatId, chatId = chatId,
media = media, media = media,
@@ -422,7 +422,7 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,
@@ -452,7 +452,7 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
chatId = chatId, chatId = chatId,
media = media.map { it.toMediaGroupMemberTelegramMedia() }, media = media.map { it.toMediaGroupMemberTelegramMedia() },
threadId = threadId, threadId = threadId,
@@ -482,7 +482,7 @@ public suspend fun TelegramBot.sendVisualMediaGroup(
effectId: EffectId? = null, effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null replyParameters: ReplyParameters? = null
): ChatContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup( ): ContentMessage<MediaGroupContent<VisualMediaGroupPartContent>> = sendVisualMediaGroup(
chatId = chat.id, chatId = chat.id,
media = media, media = media,
threadId = threadId, threadId = threadId,

View File

@@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.media.TelegramPaidMedia import dev.inmo.tgbotapi.types.media.TelegramPaidMedia
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent import dev.inmo.tgbotapi.types.message.content.PaidMediaInfoContent
/** /**
@@ -36,7 +36,7 @@ public suspend fun TelegramBot.sendPaidMedia(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PaidMediaInfoContent> = execute( ): ContentMessage<PaidMediaInfoContent> = execute(
SendPaidMedia( SendPaidMedia(
chatId = chatId, chatId = chatId,
starCount = starCount, starCount = starCount,
@@ -78,7 +78,7 @@ public suspend fun TelegramBot.sendPaidMedia(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PaidMediaInfoContent> = sendPaidMedia( ): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
chatId = chat.id, chatId = chat.id,
starCount = starCount, starCount = starCount,
media = media, media = media,
@@ -118,7 +118,7 @@ public suspend inline fun TelegramBot.sendPaidMedia(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PaidMediaInfoContent> = execute( ): ContentMessage<PaidMediaInfoContent> = execute(
SendPaidMedia( SendPaidMedia(
chatId = chatId, chatId = chatId,
starCount = starCount, starCount = starCount,
@@ -158,7 +158,7 @@ public suspend inline fun TelegramBot.sendPaidMedia(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PaidMediaInfoContent> = sendPaidMedia( ): ContentMessage<PaidMediaInfoContent> = sendPaidMedia(
chatId = chat.id, chatId = chat.id,
starCount = starCount, starCount = starCount,
media = media, media = media,

View File

@@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.* import dev.inmo.tgbotapi.types.files.*
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.PhotoContent import dev.inmo.tgbotapi.types.message.content.PhotoContent
/** /**
@@ -37,7 +37,7 @@ public suspend fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = execute( ): ContentMessage<PhotoContent> = execute(
SendPhoto( SendPhoto(
chatId = chatId, chatId = chatId,
photo = fileId, photo = fileId,
@@ -79,7 +79,7 @@ public suspend fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
fileId = fileId, fileId = fileId,
text = text, text = text,
@@ -119,7 +119,7 @@ public suspend fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"), fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"),
text = text, text = text,
@@ -159,7 +159,7 @@ public suspend fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photo = photo, photo = photo,
text = text, text = text,
@@ -199,7 +199,7 @@ public suspend fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photoSize.fileId, fileId = photoSize.fileId,
text = text, text = text,
@@ -239,7 +239,7 @@ public suspend fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photoSize = photoSize, photoSize = photoSize,
text = text, text = text,
@@ -279,7 +279,7 @@ public suspend inline fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = execute( ): ContentMessage<PhotoContent> = execute(
SendPhoto( SendPhoto(
chatId = chatId, chatId = chatId,
photo = fileId, photo = fileId,
@@ -319,7 +319,7 @@ public suspend inline fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
fileId = fileId, fileId = fileId,
entities = entities, entities = entities,
@@ -357,7 +357,7 @@ public suspend inline fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"), fileId = photo.biggest() ?.fileId ?: error("Photo content must not be empty"),
entities = entities, entities = entities,
@@ -395,7 +395,7 @@ public suspend inline fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photo = photo, photo = photo,
entities = entities, entities = entities,
@@ -433,7 +433,7 @@ public suspend inline fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chatId, chatId = chatId,
fileId = photoSize.fileId, fileId = photoSize.fileId,
entities = entities, entities = entities,
@@ -471,7 +471,7 @@ public suspend inline fun TelegramBot.sendPhoto(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PhotoContent> = sendPhoto( ): ContentMessage<PhotoContent> = sendPhoto(
chatId = chat.id, chatId = chat.id,
photoSize = photoSize, photoSize = photoSize,
entities = entities, entities = entities,

View File

@@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.files.Sticker
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.StickerContent import dev.inmo.tgbotapi.types.message.content.StickerContent
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
@@ -32,7 +32,7 @@ public suspend fun TelegramBot.sendSticker(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StickerContent> = execute( ): ContentMessage<StickerContent> = execute(
SendSticker( SendSticker(
chatId = chatId, chatId = chatId,
sticker = sticker, sticker = sticker,
@@ -68,7 +68,7 @@ public suspend fun TelegramBot.sendSticker(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StickerContent> = sendSticker( ): ContentMessage<StickerContent> = sendSticker(
chatId = chat.id, chatId = chat.id,
sticker = sticker, sticker = sticker,
threadId = threadId, threadId = threadId,
@@ -102,7 +102,7 @@ public suspend fun TelegramBot.sendSticker(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StickerContent> = sendSticker( ): ContentMessage<StickerContent> = sendSticker(
chatId = chatId, chatId = chatId,
sticker = sticker.fileId, sticker = sticker.fileId,
threadId = threadId, threadId = threadId,
@@ -136,7 +136,7 @@ public suspend fun TelegramBot.sendSticker(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<StickerContent> = sendSticker( ): ContentMessage<StickerContent> = sendSticker(
chat = chat, chat = chat,
sticker = sticker.fileId, sticker = sticker.fileId,
threadId = threadId, threadId = threadId,

View File

@@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.VideoFile import dev.inmo.tgbotapi.types.files.VideoFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.VideoContent import dev.inmo.tgbotapi.types.message.content.VideoContent
/** /**
@@ -44,7 +44,7 @@ public suspend fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = execute( ): ContentMessage<VideoContent> = execute(
SendVideo( SendVideo(
chatId = chatId, chatId = chatId,
video = video, video = video,
@@ -94,7 +94,7 @@ public suspend fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chatId, chatId = chatId,
video = video.fileId, video = video.fileId,
thumb = video.thumbnail ?.fileId, thumb = video.thumbnail ?.fileId,
@@ -148,7 +148,7 @@ public suspend fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
thumb = thumb, thumb = thumb,
@@ -197,7 +197,7 @@ public suspend fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
text = text, text = text,
@@ -244,7 +244,7 @@ public suspend inline fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = execute( ): ContentMessage<VideoContent> = execute(
SendVideo( SendVideo(
chatId = chatId, chatId = chatId,
video = video, video = video,
@@ -292,7 +292,7 @@ public suspend inline fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chatId, chatId = chatId,
video = video.fileId, video = video.fileId,
thumb = video.thumbnail ?.fileId, thumb = video.thumbnail ?.fileId,
@@ -344,7 +344,7 @@ public suspend inline fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
thumb = thumb, thumb = thumb,
@@ -391,7 +391,7 @@ public suspend inline fun TelegramBot.sendVideo(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoContent> = sendVideo( ): ContentMessage<VideoContent> = sendVideo(
chatId = chat.id, chatId = chat.id,
video = video, video = video,
entities = entities, entities = entities,

View File

@@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.files.VideoNoteFile import dev.inmo.tgbotapi.types.files.VideoNoteFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.VideoNoteContent import dev.inmo.tgbotapi.types.message.content.VideoNoteContent
/** /**
@@ -32,7 +32,7 @@ public suspend fun TelegramBot.sendVideoNote(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoNoteContent> = execute( ): ContentMessage<VideoNoteContent> = execute(
SendVideoNote( SendVideoNote(
chatId = chatId, chatId = chatId,
videoNote = videoNote, videoNote = videoNote,
@@ -69,7 +69,7 @@ public suspend fun TelegramBot.sendVideoNote(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoNoteContent> = sendVideoNote( ): ContentMessage<VideoNoteContent> = sendVideoNote(
chatId = chatId, chatId = chatId,
videoNote = videoNote.fileId, videoNote = videoNote.fileId,
thumb = videoNote.thumbnail ?.fileId, thumb = videoNote.thumbnail ?.fileId,
@@ -107,7 +107,7 @@ public suspend fun TelegramBot.sendVideoNote(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoNoteContent> = sendVideoNote( ): ContentMessage<VideoNoteContent> = sendVideoNote(
chatId = chat.id, chatId = chat.id,
videoNote = videoNote, videoNote = videoNote,
thumb = thumb, thumb = thumb,
@@ -142,7 +142,7 @@ public suspend fun TelegramBot.sendVideoNote(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VideoNoteContent> = sendVideoNote( ): ContentMessage<VideoNoteContent> = sendVideoNote(
chatId = chat.id, chatId = chat.id,
videoNote = videoNote, videoNote = videoNote,
threadId = threadId, threadId = threadId,

View File

@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.chat.Chat import dev.inmo.tgbotapi.types.chat.Chat
import dev.inmo.tgbotapi.types.files.VoiceFile import dev.inmo.tgbotapi.types.files.VoiceFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.VoiceContent import dev.inmo.tgbotapi.types.message.content.VoiceContent
/** /**
@@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = execute( ): ContentMessage<VoiceContent> = execute(
SendVoice( SendVoice(
chatId = chatId, chatId = chatId,
voice = voice, voice = voice,
@@ -74,7 +74,7 @@ public suspend fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId = chat.id, chatId = chat.id,
voice = voice, voice = voice,
text = text, text = text,
@@ -111,7 +111,7 @@ public suspend fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId = chatId, chatId = chatId,
voice = voice.fileId, voice = voice.fileId,
text = text, text = text,
@@ -148,7 +148,7 @@ public suspend fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId = chat.id, chatId = chat.id,
voice = voice, voice = voice,
text = text, text = text,
@@ -185,7 +185,7 @@ public suspend inline fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = execute( ): ContentMessage<VoiceContent> = execute(
SendVoice( SendVoice(
chatId = chatId, chatId = chatId,
voice = voice, voice = voice,
@@ -223,7 +223,7 @@ public suspend inline fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId = chat.id, chatId = chat.id,
voice = voice, voice = voice,
entities = entities, entities = entities,
@@ -258,7 +258,7 @@ public suspend inline fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId = chatId, chatId = chatId,
voice = voice.fileId, voice = voice.fileId,
entities = entities, entities = entities,
@@ -292,7 +292,7 @@ public suspend inline fun TelegramBot.sendVoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<VoiceContent> = sendVoice( ): ContentMessage<VoiceContent> = sendVoice(
chatId = chat.id, chatId = chat.id,
voice = voice, voice = voice,
entities = entities, entities = entities,

View File

@@ -8,7 +8,7 @@ import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
import dev.inmo.tgbotapi.types.chat.CommonUser import dev.inmo.tgbotapi.types.chat.CommonUser
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.InvoiceContent import dev.inmo.tgbotapi.types.message.content.InvoiceContent
import dev.inmo.tgbotapi.types.payments.LabeledPrice import dev.inmo.tgbotapi.types.payments.LabeledPrice
import dev.inmo.tgbotapi.types.payments.abstracts.Currency import dev.inmo.tgbotapi.types.payments.abstracts.Currency
@@ -45,7 +45,7 @@ public suspend fun TelegramBot.sendInvoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
): ChatContentMessage<InvoiceContent> = execute( ): ContentMessage<InvoiceContent> = execute(
SendInvoice( SendInvoice(
chatId = chatId, chatId = chatId,
title = title, title = title,
@@ -107,7 +107,7 @@ public suspend fun TelegramBot.sendInvoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
): ChatContentMessage<InvoiceContent> = sendInvoice( ): ContentMessage<InvoiceContent> = sendInvoice(
chatId = user.id, chatId = user.id,
title = title, title = title,
description = description, description = description,
@@ -159,7 +159,7 @@ public suspend fun TelegramBot.sendInvoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
): ChatContentMessage<InvoiceContent> = execute( ): ContentMessage<InvoiceContent> = execute(
SendInvoice( SendInvoice(
chatId = chatId, chatId = chatId,
title = title, title = title,
@@ -199,7 +199,7 @@ public suspend fun TelegramBot.sendInvoice(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: InlineKeyboardMarkup? = null replyMarkup: InlineKeyboardMarkup? = null
): ChatContentMessage<InvoiceContent> = sendInvoice( ): ContentMessage<InvoiceContent> = sendInvoice(
chatId = user.id, chatId = user.id,
title = title, title = title,
description = description, description = description,

View File

@@ -5,10 +5,9 @@ import dev.inmo.tgbotapi.requests.send.polls.SendQuizPoll
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.media.InputPollMedia
import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.PollContent import dev.inmo.tgbotapi.types.message.content.PollContent
import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.InputPollOption
@@ -19,24 +18,14 @@ public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
correctOptionIds: List<Int>, correctOptionId: Int,
explanation: String?, explanation: String?,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
openPeriod: LongSeconds? = null, openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null, closeDate: LongSeconds? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -47,29 +36,19 @@ public suspend fun TelegramBot.sendQuizPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId = chatId, chatId = chatId,
question = question, question = question,
options = options, options = options,
correctOptionIds = correctOptionIds, correctOptionId = correctOptionId,
explanation = explanation, explanation = explanation,
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
openPeriod = openPeriod, openPeriod = openPeriod,
closeDate = closeDate, closeDate = closeDate,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -87,23 +66,13 @@ public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
correctOptionIds: List<Int>, correctOptionId: Int,
explanation: String?, explanation: String?,
explanationParseMode: ParseMode? = null, explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
openPeriod: LongSeconds? = null, openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null, closeDate: LongSeconds? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -114,152 +83,16 @@ public suspend fun TelegramBot.sendQuizPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId = chatId, chatId = chatId,
questionEntities = questionEntities, questionEntities = questionEntities,
options = options, options = options,
correctOptionIds = correctOptionIds, correctOptionId = correctOptionId,
explanation = explanation, explanation = explanation,
explanationParseMode = explanationParseMode, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
openPeriod = openPeriod,
closeDate = closeDate,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List<InputPollOption>,
correctOptionIds: List<Int>,
questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
descriptionTextSources: List<TextSource>? = null,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute(
SendQuizPoll(
chatId = chatId,
question = question,
options = options,
correctOptionIds = correctOptionIds,
questionParseMode = questionParseMode,
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
descriptionTextSources = descriptionTextSources,
openPeriod = openPeriod,
closeDate = closeDate,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
questionEntities: List<TextSource>,
options: List<InputPollOption>,
correctOptionIds: List<Int>,
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
descriptionTextSources: List<TextSource>? = null,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute(
SendQuizPoll(
chatId = chatId,
questionEntities = questionEntities,
options = options,
correctOptionIds = correctOptionIds,
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
descriptionTextSources = descriptionTextSources,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
openPeriod = openPeriod, openPeriod = openPeriod,
closeDate = closeDate, closeDate = closeDate,
threadId = threadId, threadId = threadId,
@@ -279,23 +112,13 @@ public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
correctOptionIds: List<Int>, correctOptionId: Int,
closeInfo: ScheduledCloseInfo?, explanationTextSources: List<TextSource>? = null,
explanation: String?,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false, openPeriod: LongSeconds? = null,
allowsRevoting: Boolean = false, closeDate: LongSeconds? = null,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -306,28 +129,18 @@ public suspend fun TelegramBot.sendQuizPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId = chatId, chatId = chatId,
question = question, question = question,
options = options, options = options,
correctOptionIds = correctOptionIds, correctOptionId = correctOptionId,
closeInfo = closeInfo,
explanation = explanation,
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
explanationParseMode = explanationParseMode, explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers, openPeriod = openPeriod,
allowsRevoting = allowsRevoting, closeDate = closeDate,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -341,26 +154,17 @@ public suspend fun TelegramBot.sendQuizPoll(
) )
) )
public suspend fun TelegramBot.sendQuizPoll( public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
correctOptionIds: List<Int>, correctOptionId: Int,
closeInfo: ScheduledCloseInfo?, explanationTextSources: List<TextSource>? = null,
explanation: String?,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false, openPeriod: LongSeconds? = null,
allowsRevoting: Boolean = false, closeDate: LongSeconds? = null,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -371,27 +175,17 @@ public suspend fun TelegramBot.sendQuizPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId = chatId, chatId = chatId,
questionEntities = questionEntities, questionEntities = questionEntities,
options = options, options = options,
correctOptionIds = correctOptionIds, correctOptionId = correctOptionId,
closeInfo = closeInfo, explanationTextSources = explanationTextSources,
explanation = explanation,
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers, openPeriod = openPeriod,
allowsRevoting = allowsRevoting, closeDate = closeDate,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -409,21 +203,13 @@ public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
question: String, question: String,
options: List<InputPollOption>, options: List<InputPollOption>,
correctOptionIds: List<Int>, correctOptionId: Int,
closeInfo: ScheduledCloseInfo?, closeInfo: ScheduledCloseInfo?,
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null, explanation: String?,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
descriptionTextSources: List<TextSource>? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -434,26 +220,18 @@ public suspend fun TelegramBot.sendQuizPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId = chatId, chatId = chatId,
question = question, question = question,
options = options, options = options,
correctOptionIds = correctOptionIds, correctOptionId = correctOptionId,
closeInfo = closeInfo, closeInfo = closeInfo,
explanation = explanation,
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
explanationTextSources = explanationTextSources, explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
descriptionTextSources = descriptionTextSources,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
@@ -471,20 +249,12 @@ public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier, chatId: ChatIdentifier,
questionEntities: List<TextSource>, questionEntities: List<TextSource>,
options: List<InputPollOption>, options: List<InputPollOption>,
correctOptionIds: List<Int>, correctOptionId: Int,
closeInfo: ScheduledCloseInfo?, closeInfo: ScheduledCloseInfo?,
explanationTextSources: List<TextSource>? = null, explanation: String?,
explanationParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = false,
shuffleOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
descriptionTextSources: List<TextSource>? = null,
media: InputPollMedia? = null,
explanationMedia: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -495,25 +265,103 @@ public suspend fun TelegramBot.sendQuizPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendQuizPoll( SendQuizPoll(
chatId = chatId, chatId = chatId,
questionEntities = questionEntities, questionEntities = questionEntities,
options = options, options = options,
correctOptionIds = correctOptionIds, correctOptionId = correctOptionId,
closeInfo = closeInfo, closeInfo = closeInfo,
explanationTextSources = explanationTextSources, explanation = explanation,
explanationParseMode = explanationParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List<InputPollOption>,
correctOptionId: Int,
closeInfo: ScheduledCloseInfo?,
questionParseMode: ParseMode? = null,
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<PollContent> = execute(
SendQuizPoll(
chatId = chatId,
question = question,
options = options,
correctOptionId = correctOptionId,
closeInfo = closeInfo,
questionParseMode = questionParseMode,
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous,
isClosed = isClosed,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendQuizPoll(
chatId: ChatIdentifier,
questionEntities: List<TextSource>,
options: List<InputPollOption>,
correctOptionId: Int,
closeInfo: ScheduledCloseInfo?,
explanationTextSources: List<TextSource>? = null,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<PollContent> = execute(
SendQuizPoll(
chatId = chatId,
questionEntities = questionEntities,
options = options,
correctOptionId = correctOptionId,
closeInfo = closeInfo,
explanationTextSources = explanationTextSources,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
descriptionTextSources = descriptionTextSources,
media = media,
explanationMedia = explanationMedia,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,

View File

@@ -5,10 +5,9 @@ import dev.inmo.tgbotapi.requests.send.polls.SendRegularPoll
import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
import dev.inmo.tgbotapi.types.media.InputPollMedia
import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.ParseMode
import dev.inmo.tgbotapi.types.message.SuggestedPostParameters import dev.inmo.tgbotapi.types.message.SuggestedPostParameters
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.PollContent import dev.inmo.tgbotapi.types.message.content.PollContent
import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSource
import dev.inmo.tgbotapi.types.polls.InputPollOption import dev.inmo.tgbotapi.types.polls.InputPollOption
@@ -22,79 +21,9 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false, allowMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
openPeriod: LongSeconds? = null, openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null, closeDate: LongSeconds? = null,
media: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null,
): ChatContentMessage<PollContent> = execute(
SendRegularPoll(
chatId = chatId,
question = question,
options = options,
questionParseMode = questionParseMode,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
openPeriod = openPeriod,
closeDate = closeDate,
media = media,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendRegularPoll(
chatId: ChatIdentifier,
questionEntities: List<TextSource>,
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
media: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -105,35 +34,69 @@ public suspend fun TelegramBot.sendRegularPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId = chatId, chatId = chatId,
questionTextSources = questionEntities, question = question,
options = options, options = options,
questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers, allowMultipleAnswers = allowMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
openPeriod = openPeriod, openPeriod = openPeriod,
closeDate = closeDate, closeDate = closeDate,
media = media,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
disableNotification = disableNotification, disableNotification = disableNotification,
protectContent = protectContent, protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast, allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId, effectId = effectId,
suggestedPostParameters = suggestedPostParameters, suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters, replyParameters = replyParameters,
replyMarkup = replyMarkup replyMarkup = replyMarkup
)
)
public suspend fun TelegramBot.sendRegularPoll(
chatId: ChatIdentifier,
questionEntities: List<TextSource>,
options: List<InputPollOption>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
openPeriod: LongSeconds? = null,
closeDate: LongSeconds? = null,
threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
disableNotification: Boolean = false,
protectContent: Boolean = false,
allowPaidBroadcast: Boolean = false,
effectId: EffectId? = null,
suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null
): ContentMessage<PollContent> = execute(
SendRegularPoll(
chatId = chatId,
questionEntities = questionEntities,
options = options,
isAnonymous = isAnonymous,
isClosed = isClosed,
allowMultipleAnswers = allowMultipleAnswers,
openPeriod = openPeriod,
closeDate = closeDate,
threadId = threadId,
directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId,
disableNotification = disableNotification,
protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId,
suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters,
replyMarkup = replyMarkup
) )
) )
@@ -145,16 +108,7 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode: ParseMode? = null, questionParseMode: ParseMode? = null,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false, allowMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
media: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -165,7 +119,7 @@ public suspend fun TelegramBot.sendRegularPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId = chatId, chatId = chatId,
question = question, question = question,
@@ -174,26 +128,17 @@ public suspend fun TelegramBot.sendRegularPoll(
questionParseMode = questionParseMode, questionParseMode = questionParseMode,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers, allowMultipleAnswers = allowMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
media = media,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
disableNotification = disableNotification, disableNotification = disableNotification,
protectContent = protectContent, protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast, allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId, effectId = effectId,
suggestedPostParameters = suggestedPostParameters, suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters, replyParameters = replyParameters,
replyMarkup = replyMarkup replyMarkup = replyMarkup
) )
) )
@@ -204,16 +149,7 @@ public suspend fun TelegramBot.sendRegularPoll(
closeInfo: ScheduledCloseInfo?, closeInfo: ScheduledCloseInfo?,
isAnonymous: Boolean = true, isAnonymous: Boolean = true,
isClosed: Boolean = false, isClosed: Boolean = false,
allowsMultipleAnswers: Boolean = false, allowMultipleAnswers: Boolean = false,
allowsRevoting: Boolean = true,
shuffleOptions: Boolean = false,
allowAddingOptions: Boolean = false,
hideResultsUntilCloses: Boolean = false,
description: String? = null,
descriptionParseMode: ParseMode? = null,
media: InputPollMedia? = null,
membersOnly: Boolean = false,
countryCodes: List<String>? = null,
threadId: MessageThreadId? = chatId.threadId, threadId: MessageThreadId? = chatId.threadId,
directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId, businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
@@ -224,7 +160,7 @@ public suspend fun TelegramBot.sendRegularPoll(
suggestedPostParameters: SuggestedPostParameters? = null, suggestedPostParameters: SuggestedPostParameters? = null,
replyParameters: ReplyParameters? = null, replyParameters: ReplyParameters? = null,
replyMarkup: KeyboardMarkup? = null replyMarkup: KeyboardMarkup? = null
): ChatContentMessage<PollContent> = execute( ): ContentMessage<PollContent> = execute(
SendRegularPoll( SendRegularPoll(
chatId = chatId, chatId = chatId,
questionTextSources = questionEntities, questionTextSources = questionEntities,
@@ -232,25 +168,16 @@ public suspend fun TelegramBot.sendRegularPoll(
closeInfo = closeInfo, closeInfo = closeInfo,
isAnonymous = isAnonymous, isAnonymous = isAnonymous,
isClosed = isClosed, isClosed = isClosed,
allowsMultipleAnswers = allowsMultipleAnswers, allowMultipleAnswers = allowMultipleAnswers,
allowsRevoting = allowsRevoting,
shuffleOptions = shuffleOptions,
allowAddingOptions = allowAddingOptions,
hideResultsUntilCloses = hideResultsUntilCloses,
description = description,
descriptionParseMode = descriptionParseMode,
media = media,
membersOnly = membersOnly,
countryCodes = countryCodes,
threadId = threadId, threadId = threadId,
directMessageThreadId = directMessageThreadId, directMessageThreadId = directMessageThreadId,
businessConnectionId = businessConnectionId, businessConnectionId = businessConnectionId,
disableNotification = disableNotification, disableNotification = disableNotification,
protectContent = protectContent, protectContent = protectContent,
allowPaidBroadcast = allowPaidBroadcast, allowPaidBroadcast = allowPaidBroadcast,
effectId = effectId, effectId = effectId,
suggestedPostParameters = suggestedPostParameters, suggestedPostParameters = suggestedPostParameters,
replyParameters = replyParameters, replyParameters = replyParameters,
replyMarkup = replyMarkup replyMarkup = replyMarkup
) )
) )

View File

@@ -104,10 +104,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/DefaultBehavio
public fun getEditedMessageMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow; public fun getEditedMessageMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getEditedMessagesFlow ()Lkotlinx/coroutines/flow/Flow; public fun getEditedMessagesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getFlowsUpdatesFilter ()Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter; public fun getFlowsUpdatesFilter ()Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;
public fun getGuestMessageUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getInlineQueriesFlow ()Lkotlinx/coroutines/flow/Flow; public fun getInlineQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getLog ()Ldev/inmo/kslog/common/KSLog; public fun getLog ()Ldev/inmo/kslog/common/KSLog;
public fun getManagedBotUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getMessageMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow; public fun getMessageMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getMessagesFlow ()Lkotlinx/coroutines/flow/Flow; public fun getMessagesFlow ()Lkotlinx/coroutines/flow/Flow;
public fun getMyChatMemberUpdatesFlow ()Lkotlinx/coroutines/flow/Flow; public fun getMyChatMemberUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;

View File

@@ -380,8 +380,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLiveLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitLiveLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLivePhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLivePhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -394,8 +392,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPoll (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitPoll (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitPoll$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPoll$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitRichMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitRichMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitStaticLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitStaticLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitStaticLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitStaticLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitSticker (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitSticker (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -455,8 +451,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitInvoiceMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitInvoiceMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLiveLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitLiveLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLiveLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLiveLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLivePhotoMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLivePhotoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitMediaContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitMediaContentMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -469,8 +463,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitPhotoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPhotoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPollMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitPollMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitPollMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPollMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitRichMessageMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitRichMessageMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitStaticLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitStaticLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitStaticLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitStaticLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitStickerMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitStickerMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -542,8 +534,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitEditedInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitEditedInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedLiveLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitEditedLiveLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitEditedLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitEditedLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedLivePhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitEditedLivePhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitEditedLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitEditedLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitEditedLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitEditedMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -601,8 +591,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitEditedInvoiceMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitEditedInvoiceMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedLiveLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitEditedLiveLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitEditedLiveLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitEditedLiveLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedLivePhotoMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitEditedLivePhotoMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitEditedLocationMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitEditedLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitEditedLocationMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitEditedMediaMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitEditedMediaMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -684,8 +672,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitGroupEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitGroupEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLeftChatMemberEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitLeftChatMemberEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLeftChatMemberEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLeftChatMemberEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitManagedBotCreatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitManagedBotCreatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitMessageAutoDeleteTimerChangedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitMessageAutoDeleteTimerChangedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitMessageAutoDeleteTimerChangedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitMessageAutoDeleteTimerChangedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitNewChatMembersEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitNewChatMembersEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -698,10 +684,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitPaidMessagePriceChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPaidMessagePriceChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPinnedMessageEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitPinnedMessageEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitPinnedMessageEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPinnedMessageEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPollOptionAddedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitPollOptionAddedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPollOptionDeletedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitPollOptionDeletedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPrivateEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitPrivateEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitPrivateEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitPrivateEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitProximityAlertTriggeredEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitProximityAlertTriggeredEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -857,11 +839,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitWriteAccessAllowedOtherEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitWriteAccessAllowedOtherEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitGuestRequestMessageKt {
public static final fun waitGuestRequestMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitGuestRequestMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitInlineQueryKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitInlineQueryKt {
public static final fun waitAnyInlineQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitAnyInlineQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitAnyInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitAnyInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
@@ -871,16 +848,9 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static synthetic fun waitLocationInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitLocationInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitManagedBotUpdateKt {
public static final fun waitManagedBotUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitManagedBotUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitMediaGroupKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitMediaGroupKt {
public static final fun waitDocumentsGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitDocumentsGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitDocumentsGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitDocumentsGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLivePhotoGallery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLivePhotoGallery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitMediaGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitMediaGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitMediaGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitMediaGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPhotoGallery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitPhotoGallery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -896,8 +866,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitMediaGroupMessagesKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitMediaGroupMessagesKt {
public static final fun waitDocumentsGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitDocumentsGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitDocumentsGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitDocumentsGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitLivePhotoGalleryMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitLivePhotoGalleryMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitMediaGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitMediaGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitMediaGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitMediaGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitPhotoGalleryMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitPhotoGalleryMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -929,9 +897,9 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
public static final fun filterMentionsMessages (Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/chat/User;)Lkotlinx/coroutines/flow/Flow; public static final fun filterMentionsMessages (Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/chat/User;)Lkotlinx/coroutines/flow/Flow;
public static final fun filterMentionsMessages-eC7Nk8U (Lkotlinx/coroutines/flow/Flow;Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; public static final fun filterMentionsMessages-eC7Nk8U (Lkotlinx/coroutines/flow/Flow;Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow;
public static final fun filterTextMentionsMessages (Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/IdChatIdentifier;)Lkotlinx/coroutines/flow/Flow; public static final fun filterTextMentionsMessages (Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/IdChatIdentifier;)Lkotlinx/coroutines/flow/Flow;
public static final fun isWithMention (Ldev/inmo/tgbotapi/types/message/abstracts/ChatContentMessage;Ldev/inmo/tgbotapi/types/chat/User;)Z public static final fun isWithMention (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ldev/inmo/tgbotapi/types/chat/User;)Z
public static final fun isWithMention-eC7Nk8U (Ldev/inmo/tgbotapi/types/message/abstracts/ChatContentMessage;Ljava/lang/String;)Z public static final fun isWithMention-eC7Nk8U (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ljava/lang/String;)Z
public static final fun isWithTextMention (Ldev/inmo/tgbotapi/types/message/abstracts/ChatContentMessage;Ldev/inmo/tgbotapi/types/IdChatIdentifier;)Z public static final fun isWithTextMention (Ldev/inmo/tgbotapi/types/message/abstracts/CommonMessage;Ldev/inmo/tgbotapi/types/IdChatIdentifier;)Z
public static final fun waitContentMessageWithMentions (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitContentMessageWithMentions (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
public static synthetic fun waitContentMessageWithMentions$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow; public static synthetic fun waitContentMessageWithMentions$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
public static final fun waitContentMessageWithMentions-QGcck-U (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow; public static final fun waitContentMessageWithMentions-QGcck-U (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
@@ -1009,7 +977,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/Messag
public static final fun getChatJoinRequestFilterByChat ()Lkotlin/jvm/functions/Function4; public static final fun getChatJoinRequestFilterByChat ()Lkotlin/jvm/functions/Function4;
public static final fun getChatMemberUpdatedFilterByChat ()Lkotlin/jvm/functions/Function4; public static final fun getChatMemberUpdatedFilterByChat ()Lkotlin/jvm/functions/Function4;
public static final fun getInlineQueryFilterByUser ()Lkotlin/jvm/functions/Function4; public static final fun getInlineQueryFilterByUser ()Lkotlin/jvm/functions/Function4;
public static final fun getManagedBotUpdatedFilterByUser ()Lkotlin/jvm/functions/Function4;
public static final fun getMessageFilterByChat ()Lkotlin/jvm/functions/Function4; public static final fun getMessageFilterByChat ()Lkotlin/jvm/functions/Function4;
public static final fun getMessagesFilterByChat ()Lkotlin/jvm/functions/Function4; public static final fun getMessagesFilterByChat ()Lkotlin/jvm/functions/Function4;
public static final fun getPreCheckoutQueryFilterByUser ()Lkotlin/jvm/functions/Function4; public static final fun getPreCheckoutQueryFilterByUser ()Lkotlin/jvm/functions/Function4;
@@ -1287,8 +1254,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onLiveLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onLiveLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onLiveLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onLivePhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onLivePhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1303,8 +1268,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPoll (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onPoll (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onPoll$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onPoll$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onRichMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onRichMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onStaticLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onStaticLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onStaticLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onStaticLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onSticker (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onSticker (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1366,8 +1329,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onEditedGame$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onEditedGame$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onEditedInvoice (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onEditedInvoice (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onEditedInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onEditedInvoice$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onEditedLivePhoto (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onEditedLivePhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onEditedLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onEditedLocation (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onEditedLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onEditedLocation$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onEditedMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onEditedMedia (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1445,8 +1406,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onGroupEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onGroupEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onLeftChatMember (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onLeftChatMember (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onLeftChatMember$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onLeftChatMember$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onManagedBotCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onManagedBotCreated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMessageAutoDeleteTimerChangedEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMessageAutoDeleteTimerChangedEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMessageAutoDeleteTimerChangedEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMessageAutoDeleteTimerChangedEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onNewChatMembers (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onNewChatMembers (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1459,10 +1418,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onPaidMessagePriceChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onPaidMessagePriceChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPinnedMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onPinnedMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onPinnedMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onPinnedMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPollOptionAdded (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onPollOptionAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPollOptionDeleted (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onPollOptionDeleted$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPrivateEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onPrivateEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onPrivateEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onPrivateEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPrivateForumTopicCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onPrivateForumTopicCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1523,11 +1478,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onWriteAccessAllowedOther$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onWriteAccessAllowedOther$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/GuestMessageTriggersKt {
public static final fun onGuestRequestMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onGuestRequestMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggersKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggersKt {
public static final fun onAnyInlineQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onAnyInlineQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onAnyInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onAnyInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
@@ -1537,16 +1487,9 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onLocationInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onLocationInlineQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ManagedBotUpdateTriggersKt {
public static final fun onManagedBotUpdated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onManagedBotUpdated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggersKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggersKt {
public static final fun onDocumentsGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onDocumentsGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onDocumentsGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onDocumentsGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onLivePhotoGalleryMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onLivePhotoGalleryMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMediaGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMediaGroupMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMediaGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMediaGroupMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPhotoGalleryMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onPhotoGalleryMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1564,8 +1507,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggersKt { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggersKt {
public static final fun onDocumentsGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onDocumentsGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onDocumentsGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onDocumentsGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onLivePhotoGallery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onLivePhotoGallery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMediaGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMediaGroup (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMediaGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMediaGroup$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onPhotoGallery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onPhotoGallery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1597,10 +1538,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onMentionWithDocumentContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMentionWithDocumentContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMentionWithDocumentContent-KtuvvGA (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMentionWithDocumentContent-KtuvvGA (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMentionWithDocumentContent-KtuvvGA$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMentionWithDocumentContent-KtuvvGA$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMentionWithLivePhotoContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMentionWithLivePhotoContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMentionWithLivePhotoContent-KtuvvGA (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMentionWithLivePhotoContent-KtuvvGA$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMentionWithMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMentionWithMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onMentionWithMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onMentionWithMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onMentionWithMediaGroupContent-KtuvvGA (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onMentionWithMediaGroupContent-KtuvvGA (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1637,8 +1574,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
public static synthetic fun onTextMentionWithAudioContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onTextMentionWithAudioContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onTextMentionWithDocumentContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onTextMentionWithDocumentContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onTextMentionWithDocumentContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onTextMentionWithDocumentContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onTextMentionWithLivePhotoContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onTextMentionWithLivePhotoContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onTextMentionWithMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onTextMentionWithMediaGroupContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
public static synthetic fun onTextMentionWithMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job; public static synthetic fun onTextMentionWithMediaGroupContent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
public static final fun onTextMentionWithMediaGroupPartContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job; public static final fun onTextMentionWithMediaGroupPartContent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
@@ -1894,12 +1829,6 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_f
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
} }
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserManagedBotUpdatedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserManagedBotUpdatedMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/managed_bots/ManagedBotUpdated;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserMessageMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory { public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserMessageMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserMessageMarkerFactory; public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserMessageMarkerFactory;
public fun invoke (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun invoke (Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;

View File

@@ -12,7 +12,7 @@ import dev.inmo.tgbotapi.extensions.utils.extensions.parseCommandsWithArgsSource
import dev.inmo.tgbotapi.extensions.utils.extensions.parseCommandsWithNamedArgs import dev.inmo.tgbotapi.extensions.utils.extensions.parseCommandsWithNamedArgs
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.BotCommand import dev.inmo.tgbotapi.types.BotCommand
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource import dev.inmo.tgbotapi.types.message.textsources.BotCommandTextSource
import dev.inmo.tgbotapi.types.message.textsources.TextSource import dev.inmo.tgbotapi.types.message.textsources.TextSource
@@ -66,7 +66,7 @@ fun BehaviourContext.waitCommandMessage(
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitCommandMessage(botCommand.command, initRequest, excludeCommandsToOtherBots, errorFactory) ) = waitCommandMessage(botCommand.command, initRequest, excludeCommandsToOtherBots, errorFactory)
fun Flow<ChatContentMessage<TextContent>>.requireCommandAtStart() = filter { fun Flow<CommonMessage<TextContent>>.requireCommandAtStart() = filter {
it.content.textSources.firstOrNull() is BotCommandTextSource it.content.textSources.firstOrNull() is BotCommandTextSource
} }
@@ -76,7 +76,7 @@ fun Flow<ChatContentMessage<TextContent>>.requireCommandAtStart() = filter {
* *
* @see requireCommandAtStart * @see requireCommandAtStart
*/ */
fun Flow<ChatContentMessage<TextContent>>.requireSingleCommand() = filter { fun Flow<CommonMessage<TextContent>>.requireSingleCommand() = filter {
var count = 0 var count = 0
it.content.textSources.forEach { it.content.textSources.forEach {
@@ -94,23 +94,23 @@ fun Flow<ChatContentMessage<TextContent>>.requireSingleCommand() = filter {
/** /**
* Subsequent [Flow] will retrieve only messages without [TextContent.textSources] which are not [BotCommandTextSource] * Subsequent [Flow] will retrieve only messages without [TextContent.textSources] which are not [BotCommandTextSource]
*/ */
fun Flow<ChatContentMessage<TextContent>>.requireCommandsWithoutParams() = filter { fun Flow<CommonMessage<TextContent>>.requireCommandsWithoutParams() = filter {
it.content.textSources.none { it !is BotCommandTextSource } it.content.textSources.none { it !is BotCommandTextSource }
} }
/** /**
* Uses [parseCommandsWithArgsSources] on incoming text sources and map them with [ChatContentMessage] * Uses [parseCommandsWithArgsSources] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<ChatContentMessage<TextContent>>.commandsWithParams(): Flow<Pair<ChatContentMessage<TextContent>, List<Pair<BotCommandTextSource, Array<TextSource>>>>> = mapNotNull { fun Flow<CommonMessage<TextContent>>.commandsWithParams(): Flow<Pair<CommonMessage<TextContent>, List<Pair<BotCommandTextSource, Array<TextSource>>>>> = mapNotNull {
it to it.content.textSources.parseCommandsWithArgsSources().toList() it to it.content.textSources.parseCommandsWithArgsSources().toList()
} }
/** /**
* Uses [parseCommandsWithArgs] on incoming text sources and map them with [ChatContentMessage] * Uses [parseCommandsWithArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<ChatContentMessage<TextContent>>.commandsWithArgs( fun Flow<CommonMessage<TextContent>>.commandsWithArgs(
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex
): Flow<Pair<ChatContentMessage<TextContent>, List<Pair<String, Array<String>>>>> = mapNotNull { ): Flow<Pair<CommonMessage<TextContent>, List<Pair<String, Array<String>>>>> = mapNotNull {
val commandsWithArgs = it.content.textSources.parseCommandsWithArgs(argsSeparator).toList().ifEmpty { val commandsWithArgs = it.content.textSources.parseCommandsWithArgs(argsSeparator).toList().ifEmpty {
return@mapNotNull null return@mapNotNull null
} }
@@ -119,19 +119,19 @@ fun Flow<ChatContentMessage<TextContent>>.commandsWithArgs(
} }
/** /**
* Uses [parseCommandsWithArgs] on incoming text sources and map them with [ChatContentMessage] * Uses [parseCommandsWithArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<ChatContentMessage<TextContent>>.commandsWithArgs( fun Flow<CommonMessage<TextContent>>.commandsWithArgs(
argsSeparator: String argsSeparator: String
): Flow<Pair<ChatContentMessage<TextContent>, List<Pair<String, Array<String>>>>> = commandsWithArgs(Regex(argsSeparator)) ): Flow<Pair<CommonMessage<TextContent>, List<Pair<String, Array<String>>>>> = commandsWithArgs(Regex(argsSeparator))
/** /**
* Uses [parseCommandsWithNamedArgs] on incoming text sources and map them with [ChatContentMessage] * Uses [parseCommandsWithNamedArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<ChatContentMessage<TextContent>>.commandsWithNamedArgs( fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs(
argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex, argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex,
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
): Flow<Pair<ChatContentMessage<TextContent>, List<Pair<String, List<Pair<String, String>>>>>> = mapNotNull { ): Flow<Pair<CommonMessage<TextContent>, List<Pair<String, List<Pair<String, String>>>>>> = mapNotNull {
val commandsWithArgs = it.content.textSources.parseCommandsWithNamedArgs(argsSeparator, nameArgSeparator).toList().ifEmpty { val commandsWithArgs = it.content.textSources.parseCommandsWithNamedArgs(argsSeparator, nameArgSeparator).toList().ifEmpty {
return@mapNotNull null return@mapNotNull null
} }
@@ -140,18 +140,18 @@ fun Flow<ChatContentMessage<TextContent>>.commandsWithNamedArgs(
} }
/** /**
* Uses [parseCommandsWithNamedArgs] on incoming text sources and map them with [ChatContentMessage] * Uses [parseCommandsWithNamedArgs] on incoming text sources and map them with [CommonMessage]
*/ */
fun Flow<ChatContentMessage<TextContent>>.commandsWithNamedArgs( fun Flow<CommonMessage<TextContent>>.commandsWithNamedArgs(
argsSeparator: String, argsSeparator: String,
nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex,
): Flow<Pair<ChatContentMessage<TextContent>, List<Pair<String, List<Pair<String, String>>>>>> = commandsWithNamedArgs(Regex(argsSeparator), nameArgSeparator) ): Flow<Pair<CommonMessage<TextContent>, List<Pair<String, List<Pair<String, String>>>>>> = commandsWithNamedArgs(Regex(argsSeparator), nameArgSeparator)
/** /**
* Flat [commandsWithParams]. Each [Pair] of [BotCommandTextSource] and its [Array] of arg text sources will * Flat [commandsWithParams]. Each [Pair] of [BotCommandTextSource] and its [Array] of arg text sources will
* be associated with its source message * be associated with its source message
*/ */
fun Flow<ChatContentMessage<TextContent>>.flattenCommandsWithParams() = commandsWithParams().flatMapConcat { (message, commandsWithParams) -> fun Flow<CommonMessage<TextContent>>.flattenCommandsWithParams() = commandsWithParams().flatMapConcat { (message, commandsWithParams) ->
commandsWithParams.map { commandsWithParams.map {
message to it message to it
}.asFlow() }.asFlow()
@@ -160,6 +160,6 @@ fun Flow<ChatContentMessage<TextContent>>.flattenCommandsWithParams() = commands
/** /**
* Use [flattenCommandsWithParams] and filter out the commands which do not [matches] to [commandRegex] * Use [flattenCommandsWithParams] and filter out the commands which do not [matches] to [commandRegex]
*/ */
fun Flow<ChatContentMessage<TextContent>>.commandParams(commandRegex: Regex) = flattenCommandsWithParams().filter { (_, commandWithParams) -> fun Flow<CommonMessage<TextContent>>.commandParams(commandRegex: Regex) = flattenCommandsWithParams().filter { (_, commandWithParams) ->
commandWithParams.first.command.matches(commandRegex) commandWithParams.first.command.matches(commandRegex)
} }

View File

@@ -4,7 +4,8 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
@@ -12,7 +13,7 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapNotNull import kotlinx.coroutines.flow.mapNotNull
typealias CommonMessageToContentMapper<T> = suspend ChatContentMessage<T>.() -> T? typealias CommonMessageToContentMapper<T> = suspend CommonMessage<T>.() -> T?
@RiskFeature(lowLevelRiskFeatureMessage) @RiskFeature(lowLevelRiskFeatureMessage)
fun BehaviourContext.waitContent( fun BehaviourContext.waitContent(
@@ -66,10 +67,6 @@ fun BehaviourContext.waitStory(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitContent(initRequest, errorFactory).mapContent<StoryContent>() ) = waitContent(initRequest, errorFactory).mapContent<StoryContent>()
fun BehaviourContext.waitRichMessage(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitContent(initRequest, errorFactory).mapContent<RichMessageContent>()
fun BehaviourContext.waitVenue( fun BehaviourContext.waitVenue(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
@@ -122,10 +119,6 @@ fun BehaviourContext.waitVideo(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitContent(initRequest, errorFactory).mapContent<VideoContent>() ) = waitContent(initRequest, errorFactory).mapContent<VideoContent>()
fun BehaviourContext.waitLivePhoto(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitContent(initRequest, errorFactory).mapContent<LivePhotoContent>()
fun BehaviourContext.waitVideoNote( fun BehaviourContext.waitVideoNote(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -5,7 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
@@ -13,23 +13,23 @@ import dev.inmo.tgbotapi.utils.lowLevelRiskFeatureMessage
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.mapNotNull import kotlinx.coroutines.flow.mapNotNull
typealias CommonMessageToCommonMessageMapper<T> = suspend ChatContentMessage<T>.() -> ChatContentMessage<T>? typealias CommonMessageToCommonMessageMapper<T> = suspend CommonMessage<T>.() -> CommonMessage<T>?
@RiskFeature(lowLevelRiskFeatureMessage) @RiskFeature(lowLevelRiskFeatureMessage)
fun BehaviourContext.waitContentMessage( fun BehaviourContext.waitContentMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
): Flow<ChatContentMessage<MessageContent>> = expectFlow( ): Flow<CommonMessage<MessageContent>> = expectFlow(
initRequest, initRequest,
errorFactory errorFactory
) { ) {
if (it !is BaseSentMessageUpdate) { if (it !is BaseSentMessageUpdate) {
return@expectFlow emptyList() return@expectFlow emptyList()
} }
listOfNotNull((it.data as? ChatContentMessage<*>)) listOfNotNull((it.data as? CommonMessage<*>))
} }
inline fun <reified T : MessageContent> Flow<ChatContentMessage<MessageContent>>.mapWithContent() = mapNotNull { it.withContentOrNull<T>() } inline fun <reified T : MessageContent> Flow<CommonMessage<MessageContent>>.mapWithContent() = mapNotNull { it.withContentOrNull<T>() }
fun BehaviourContext.waitAnyContentMessage( fun BehaviourContext.waitAnyContentMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
@@ -75,10 +75,6 @@ fun BehaviourContext.waitStoryMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitContentMessage(initRequest, errorFactory).mapWithContent<StoryContent>() ) = waitContentMessage(initRequest, errorFactory).mapWithContent<StoryContent>()
fun BehaviourContext.waitRichMessageMessage(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitContentMessage(initRequest, errorFactory).mapWithContent<RichMessageContent>()
fun BehaviourContext.waitVenueMessage( fun BehaviourContext.waitVenueMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
@@ -131,10 +127,6 @@ fun BehaviourContext.waitVideoMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitContentMessage(initRequest, errorFactory).mapWithContent<VideoContent>() ) = waitContentMessage(initRequest, errorFactory).mapWithContent<VideoContent>()
fun BehaviourContext.waitLivePhotoMessage(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitContentMessage(initRequest, errorFactory).mapWithContent<LivePhotoContent>()
fun BehaviourContext.waitVideoNoteMessage( fun BehaviourContext.waitVideoNoteMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -3,15 +3,16 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.regularTextSourceOrNull import dev.inmo.tgbotapi.extensions.utils.regularTextSourceOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
import kotlinx.coroutines.flow.* import kotlinx.coroutines.flow.*
fun BehaviourContext.waitDeepLinks( fun BehaviourContext.waitDeepLinks(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
excludeCommandsToOtherBots: Boolean = true, excludeCommandsToOtherBots: Boolean = true,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
): Flow<Pair<ChatContentMessage<TextContent>, String>> = waitCommandMessage( ): Flow<Pair<CommonMessage<TextContent>, String>> = waitCommandMessage(
command = "start", command = "start",
initRequest = initRequest, initRequest = initRequest,
excludeCommandsToOtherBots = excludeCommandsToOtherBots, excludeCommandsToOtherBots = excludeCommandsToOtherBots,
@@ -28,7 +29,7 @@ fun BehaviourContext.waitDeepLinks(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
excludeCommandsToOtherBots: Boolean = true, excludeCommandsToOtherBots: Boolean = true,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
): Flow<Pair<ChatContentMessage<TextContent>, String>> = waitDeepLinks( ): Flow<Pair<CommonMessage<TextContent>, String>> = waitDeepLinks(
initRequest = initRequest, initRequest = initRequest,
excludeCommandsToOtherBots = excludeCommandsToOtherBots, excludeCommandsToOtherBots = excludeCommandsToOtherBots,
errorFactory = errorFactory errorFactory = errorFactory
@@ -41,7 +42,7 @@ fun BehaviourContext.waitDeepLinks(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
excludeCommandsToOtherBots: Boolean = true, excludeCommandsToOtherBots: Boolean = true,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
): Flow<Pair<ChatContentMessage<TextContent>, String>> = waitDeepLinks( ): Flow<Pair<CommonMessage<TextContent>, String>> = waitDeepLinks(
regex = Regex(pattern = "^$deepLink$"), regex = Regex(pattern = "^$deepLink$"),
initRequest = initRequest, initRequest = initRequest,
excludeCommandsToOtherBots = excludeCommandsToOtherBots, excludeCommandsToOtherBots = excludeCommandsToOtherBots,

View File

@@ -105,10 +105,6 @@ fun BehaviourContext.waitEditedVideo(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
) = waitEditedContent<VideoContent>(initRequest, errorFactory) ) = waitEditedContent<VideoContent>(initRequest, errorFactory)
fun BehaviourContext.waitEditedLivePhoto(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null },
) = waitEditedContent<LivePhotoContent>(initRequest, errorFactory)
fun BehaviourContext.waitEditedVideoNote( fun BehaviourContext.waitEditedVideoNote(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -3,10 +3,10 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.chatContentMessageOrNull import dev.inmo.tgbotapi.extensions.utils.commonMessageOrNull
import dev.inmo.tgbotapi.extensions.utils.withContent import dev.inmo.tgbotapi.extensions.utils.withContent
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.RiskFeature
@@ -17,13 +17,13 @@ import kotlinx.coroutines.flow.Flow
inline fun <reified O : MessageContent> BehaviourContext.waitEditedContentMessage( inline fun <reified O : MessageContent> BehaviourContext.waitEditedContentMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
noinline errorFactory: NullableRequestBuilder<*> = { null } noinline errorFactory: NullableRequestBuilder<*> = { null }
): Flow<ChatContentMessage<O>> = expectFlow( ): Flow<CommonMessage<O>> = expectFlow(
initRequest, initRequest,
errorFactory errorFactory
) { ) {
val messages = when (it) { val messages = when (it) {
is BaseEditMessageUpdate -> { is BaseEditMessageUpdate -> {
val commonMessage = it.data.chatContentMessageOrNull() ?: return@expectFlow emptyList() val commonMessage = it.data.commonMessageOrNull() ?: return@expectFlow emptyList()
listOf(commonMessage) listOf(commonMessage)
} }
else -> return@expectFlow emptyList() else -> return@expectFlow emptyList()
@@ -118,10 +118,6 @@ fun BehaviourContext.waitEditedVideoMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }, errorFactory: NullableRequestBuilder<*> = { null },
) = waitEditedContentMessage<VideoContent>(initRequest, errorFactory) ) = waitEditedContentMessage<VideoContent>(initRequest, errorFactory)
fun BehaviourContext.waitEditedLivePhotoMessage(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null },
) = waitEditedContentMessage<LivePhotoContent>(initRequest, errorFactory)
fun BehaviourContext.waitEditedVideoNoteMessage( fun BehaviourContext.waitEditedVideoNoteMessage(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -13,10 +13,6 @@ import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.polls.PollOptionAdded
import dev.inmo.tgbotapi.types.polls.PollOptionDeleted
import dev.inmo.tgbotapi.types.message.ChatEvents.* import dev.inmo.tgbotapi.types.message.ChatEvents.*
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.* import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed
@@ -252,21 +248,6 @@ fun BehaviourContext.waitChatOwnerChanged(
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<ChatOwnerChanged>(initRequest, errorFactory) ) = waitEvents<ChatOwnerChanged>(initRequest, errorFactory)
fun BehaviourContext.waitManagedBotCreatedEvents(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<ManagedBotCreated>(initRequest, errorFactory)
fun BehaviourContext.waitPollOptionAddedEvents(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<PollOptionAdded>(initRequest, errorFactory)
fun BehaviourContext.waitPollOptionDeletedEvents(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = waitEvents<PollOptionDeleted>(initRequest, errorFactory)
fun BehaviourContext.waitChatBackgroundSet( fun BehaviourContext.waitChatBackgroundSet(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }

View File

@@ -1,17 +0,0 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.guestMessageUpdateOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage
import kotlinx.coroutines.flow.Flow
fun BehaviourContext.waitGuestRequestMessage(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
): Flow<RequestGuestContentMessage<*>> = expectFlow(
initRequest,
errorFactory
) {
(it.guestMessageUpdateOrNull() ?.data).let(::listOfNotNull)
}

View File

@@ -1,17 +0,0 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.managedBotUpdateOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import kotlinx.coroutines.flow.Flow
fun BehaviourContext.waitManagedBotUpdated(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
): Flow<ManagedBotUpdated> = expectFlow(
initRequest,
errorFactory
) {
(it.managedBotUpdateOrNull() ?.data).let(::listOfNotNull)
}

View File

@@ -4,7 +4,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
import dev.inmo.tgbotapi.extensions.utils.chatContentMessageOrNull import dev.inmo.tgbotapi.extensions.utils.commonMessageOrNull
import dev.inmo.tgbotapi.extensions.utils.withContent import dev.inmo.tgbotapi.extensions.utils.withContent
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
@@ -18,7 +18,7 @@ inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMediaGroupW
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
noinline errorFactory: NullableRequestBuilder<*> = { null } noinline errorFactory: NullableRequestBuilder<*> = { null }
): Flow<MediaGroupContent<T>> = flowsUpdatesFilter.expectFlow(bot, initRequest, errorFactory) { update -> ): Flow<MediaGroupContent<T>> = flowsUpdatesFilter.expectFlow(bot, initRequest, errorFactory) { update ->
update.baseSentMessageUpdateOrNull() ?.data ?.chatContentMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { message -> update.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { message ->
if (message.content.group.all { it.content is T }) { if (message.content.group.all { it.content is T }) {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
listOf(message.content as MediaGroupContent<T>) listOf(message.content as MediaGroupContent<T>)
@@ -52,7 +52,3 @@ fun BehaviourContext.waitVideoGallery(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = buildMediaGroupWaiter<VideoContent>(initRequest, errorFactory) ) = buildMediaGroupWaiter<VideoContent>(initRequest, errorFactory)
fun BehaviourContext.waitLivePhotoGallery(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = buildMediaGroupWaiter<LivePhotoContent>(initRequest, errorFactory)

View File

@@ -2,7 +2,8 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
import dev.inmo.tgbotapi.extensions.utils.chatContentMessageOrNull import dev.inmo.tgbotapi.extensions.utils.commonMessageOrNull
import dev.inmo.tgbotapi.extensions.utils.withContent
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
@@ -15,7 +16,7 @@ inline fun <reified T : MediaGroupPartContent> BehaviourContext.buildMediaGroupM
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
noinline errorFactory: NullableRequestBuilder<*> = { null } noinline errorFactory: NullableRequestBuilder<*> = { null }
): Flow<MediaGroupMessage<T>> = flowsUpdatesFilter.expectFlow(bot, initRequest, errorFactory) { update -> ): Flow<MediaGroupMessage<T>> = flowsUpdatesFilter.expectFlow(bot, initRequest, errorFactory) { update ->
update.baseSentMessageUpdateOrNull() ?.data ?.chatContentMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { message -> update.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { message ->
if (message.content.group.all { it.content is T }) { if (message.content.group.all { it.content is T }) {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
listOf(message as MediaGroupMessage<T>) listOf(message as MediaGroupMessage<T>)
@@ -49,7 +50,3 @@ fun BehaviourContext.waitVideoGalleryMessages(
initRequest: Request<*>? = null, initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null } errorFactory: NullableRequestBuilder<*> = { null }
) = buildMediaGroupMessagesWaiter<VideoContent>(initRequest, errorFactory) ) = buildMediaGroupMessagesWaiter<VideoContent>(initRequest, errorFactory)
fun BehaviourContext.waitLivePhotoGalleryMessages(
initRequest: Request<*>? = null,
errorFactory: NullableRequestBuilder<*> = { null }
) = buildMediaGroupMessagesWaiter<LivePhotoContent>(initRequest, errorFactory)

View File

@@ -7,7 +7,8 @@ import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.UserId import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.Username import dev.inmo.tgbotapi.types.Username
import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
import dev.inmo.tgbotapi.types.message.content.TextedContent import dev.inmo.tgbotapi.types.message.content.TextedContent
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.filter
@@ -42,7 +43,7 @@ fun TextedContent.isWithTextMention(userId: UserId) = textSources.any {
/** /**
* Uses [isWithMention] with [user] [Username] (is presented) or [isWithTextMention] with [user] [UserId] to determine * Uses [isWithMention] with [user] [Username] (is presented) or [isWithTextMention] with [user] [UserId] to determine
* user mentioning in [this] [ChatContentMessage] * user mentioning in [this] [CommonMessage]
*/ */
fun TextedContent.isWithMention(user: User): Boolean = user.username ?.let { username -> isWithMention(username) } == true || isWithTextMention(user.id) fun TextedContent.isWithMention(user: User): Boolean = user.username ?.let { username -> isWithMention(username) } == true || isWithTextMention(user.id)

View File

@@ -1,43 +1,45 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.utils.whenMentionTextSource
import dev.inmo.tgbotapi.extensions.utils.whenTextMentionTextSource
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
import dev.inmo.tgbotapi.types.UserId import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.Username import dev.inmo.tgbotapi.types.Username
import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.TextedContent import dev.inmo.tgbotapi.types.message.content.TextedContent
import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.filter
fun ChatContentMessage<TextedContent>.isWithMention(username: Username) = content.isWithMention(username) fun CommonMessage<TextedContent>.isWithMention(username: Username) = content.isWithMention(username)
fun ChatContentMessage<TextedContent>.isWithTextMention(userId: UserId) = content.isWithTextMention(userId) fun CommonMessage<TextedContent>.isWithTextMention(userId: UserId) = content.isWithTextMention(userId)
/** /**
* Uses [isWithMention] with [user] [Username] (is presented) or [isWithTextMention] with [user] [UserId] to determine * Uses [isWithMention] with [user] [Username] (is presented) or [isWithTextMention] with [user] [UserId] to determine
* user mentioning in [this] [ChatContentMessage] * user mentioning in [this] [CommonMessage]
*/ */
fun ChatContentMessage<TextedContent>.isWithMention(user: User): Boolean = content.isWithMention(user) fun CommonMessage<TextedContent>.isWithMention(user: User): Boolean = content.isWithMention(user)
/** /**
* Uses [isWithMention] passing [username] as argument to take only messages with [username] mentions or text mentions * Uses [isWithMention] passing [username] as argument to take only messages with [username] mentions or text mentions
*/ */
fun Flow<ChatContentMessage<TextedContent>>.filterMentionsMessages(username: Username) = filter { fun Flow<CommonMessage<TextedContent>>.filterMentionsMessages(username: Username) = filter {
it.isWithMention(username) it.isWithMention(username)
} }
/** /**
* Uses [isWithTextMention] passing [userId] as argument to take only messages with [userId] text mentions * Uses [isWithTextMention] passing [userId] as argument to take only messages with [userId] text mentions
*/ */
fun Flow<ChatContentMessage<TextedContent>>.filterTextMentionsMessages(userId: UserId) = filter { fun Flow<CommonMessage<TextedContent>>.filterTextMentionsMessages(userId: UserId) = filter {
it.isWithTextMention(userId) it.isWithTextMention(userId)
} }
/** /**
* Uses [isWithMention] passing [user] as argument to take only messages with [user] mentions or text mentions * Uses [isWithMention] passing [user] as argument to take only messages with [user] mentions or text mentions
*/ */
fun Flow<ChatContentMessage<TextedContent>>.filterMentionsMessages(user: User) = filter { fun Flow<CommonMessage<TextedContent>>.filterMentionsMessages(user: User) = filter {
it.isWithMention(user) it.isWithMention(user)
} }

View File

@@ -5,7 +5,6 @@ import dev.inmo.tgbotapi.extensions.utils.extensions.sourceChat
import dev.inmo.tgbotapi.extensions.utils.extensions.sourceUser import dev.inmo.tgbotapi.extensions.utils.extensions.sourceUser
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery import dev.inmo.tgbotapi.types.payments.PreCheckoutQuery
@@ -61,14 +60,6 @@ val InlineQueryFilterByUser: BehaviourContextAndTwoTypesReceiver<Boolean, Inline
it.id == query.user.id it.id == query.user.id
} != false } != false
} }
/**
* Allow only updates from the same user as base [ManagedBotUpdated.user]
*/
val ManagedBotUpdatedFilterByUser: BehaviourContextAndTwoTypesReceiver<Boolean, ManagedBotUpdated, Update> = { managedBotUpdated, update ->
update.sourceUser() ?.let {
it.id == managedBotUpdated.user.id
} != false
}
/** /**
* Allow only events from the same chat as base [ChatMemberUpdated] * Allow only events from the same chat as base [ChatMemberUpdated]
*/ */

View File

@@ -9,5 +9,5 @@ import dev.inmo.tgbotapi.types.message.content.MediaGroupMessage
* Allow only messages which are not [MediaGroupMessage] * Allow only messages which are not [MediaGroupMessage]
*/ */
val CommonMessageFilterExcludeMediaGroups = SimpleFilter<AccessibleMessage> { val CommonMessageFilterExcludeMediaGroups = SimpleFilter<AccessibleMessage> {
it !is ChatContentMessage<*> || it.content !is MediaGroupContent<*> it !is CommonMessage<*> || it.content !is MediaGroupContent<*>
} }

View File

@@ -11,19 +11,21 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.Mar
import dev.inmo.tgbotapi.extensions.utils.whenCommonMessage import dev.inmo.tgbotapi.extensions.utils.whenCommonMessage
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.types.files.TelegramMediaFile import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
typealias CommonMessageFilter<T> = SimpleFilter<ChatContentMessage<T>> typealias CommonMessageFilter<T> = SimpleFilter<CommonMessage<T>>
internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onContentMessageWithType( internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onContentMessageWithType(
initialFilter: CommonMessageFilter<T>? = null, initialFilter: CommonMessageFilter<T>? = null,
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<T>, Update>? = MessageFilterByChat, noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatContentMessage<T>, Any>? = ByChatMessageMarkerFactory, markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = ByChatMessageMarkerFactory,
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) { ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
when (it) { when (it) {
is BaseSentMessageUpdate -> it.data.whenCommonMessage(::listOfNotNull) is BaseSentMessageUpdate -> it.data.whenCommonMessage(::listOfNotNull)
@@ -49,10 +51,10 @@ internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onCon
*/ */
fun <BC : BehaviourContext> BC.onContentMessage( fun <BC : BehaviourContext> BC.onContentMessage(
initialFilter: CommonMessageFilter<MessageContent>? = null, initialFilter: CommonMessageFilter<MessageContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MessageContent>, Update>? = MessageFilterByChat, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MessageContent>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatContentMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory, markerFactory: MarkerFactory<in CommonMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MessageContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MessageContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MessageContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MessageContent>>
) = onContentMessageWithType( ) = onContentMessageWithType(
initialFilter, initialFilter,
subcontextUpdatesFilter, subcontextUpdatesFilter,
@@ -304,33 +306,6 @@ fun <BC : BehaviourContext> BC.onStory(
scenarioReceiver scenarioReceiver
) )
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onRichMessage(
initialFilter: CommonMessageFilter<RichMessageContent>? = CommonMessageFilterExcludeMediaGroups,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, RichMessageContentMessage, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in RichMessageContentMessage, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, RichMessageContentMessage>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, RichMessageContentMessage>
) = onContentMessageWithType(
initialFilter,
subcontextUpdatesFilter,
markerFactory,
additionalSubcontextInitialAction,
scenarioReceiver
)
/** /**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
@@ -682,33 +657,6 @@ fun <BC : BehaviourContext> BC.onVideo(
scenarioReceiver scenarioReceiver
) )
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onLivePhoto(
initialFilter: CommonMessageFilter<LivePhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LivePhotoMessage, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in LivePhotoMessage, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LivePhotoMessage>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LivePhotoMessage>
) = onContentMessageWithType(
initialFilter,
subcontextUpdatesFilter,
markerFactory,
additionalSubcontextInitialAction,
scenarioReceiver
)
/** /**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,

View File

@@ -2,6 +2,7 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
import dev.inmo.micro_utils.coroutines.*
import dev.inmo.tgbotapi.extensions.behaviour_builder.* import dev.inmo.tgbotapi.extensions.behaviour_builder.*
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
@@ -9,6 +10,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByC
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times
import dev.inmo.tgbotapi.extensions.utils.* import dev.inmo.tgbotapi.extensions.utils.*
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.content.TextMessage import dev.inmo.tgbotapi.types.message.content.TextMessage
import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource import dev.inmo.tgbotapi.types.message.textsources.RegularTextSource
@@ -36,7 +38,7 @@ fun <BC : BehaviourContext> BC.onDeepLink(
additionalSubcontextInitialAction, additionalSubcontextInitialAction,
scenarioReceiver, scenarioReceiver,
) { ) {
(it.messageUpdateOrNull()) ?.data ?.chatContentMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message -> (it.messageUpdateOrNull()) ?.data ?.commonMessageOrNull() ?.withContentOrNull<TextContent>() ?.let { message ->
message to (message.content.textSources.getOrNull(1) ?.source ?.removePrefix(" ") ?.decodeURLQueryComponent() ?: return@let null) message to (message.content.textSources.getOrNull(1) ?.source ?.removePrefix(" ") ?.decodeURLQueryComponent() ?: return@let null)
} ?.let(::listOfNotNull) } ?.let(::listOfNotNull)
}.also { }.also {

View File

@@ -6,18 +6,20 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByCha
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.baseEditMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.baseEditMessageUpdateOrNull
import dev.inmo.tgbotapi.extensions.utils.editMessageUpdateOrNull
import dev.inmo.tgbotapi.extensions.utils.withContent import dev.inmo.tgbotapi.extensions.utils.withContent
import dev.inmo.tgbotapi.types.files.TelegramMediaFile import dev.inmo.tgbotapi.types.files.TelegramMediaFile
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onEditedContent( internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onEditedContent(
initialFilter: CommonMessageFilter<T>? = null, initialFilter: CommonMessageFilter<T>? = null,
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<T>, Update>? = MessageFilterByChat, noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatContentMessage<T>, Any>? = ByChatMessageMarkerFactory, markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = ByChatMessageMarkerFactory,
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) { ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
it.baseEditMessageUpdateOrNull() ?.data ?.withContent<T>() ?.let(::listOfNotNull) it.baseEditMessageUpdateOrNull() ?.data ?.withContent<T>() ?.let(::listOfNotNull)
} }
@@ -38,10 +40,10 @@ internal inline fun <BC : BehaviourContext, reified T : MessageContent> BC.onEdi
*/ */
fun <BC : BehaviourContext> BC.onEditedContentMessage( fun <BC : BehaviourContext> BC.onEditedContentMessage(
initialFilter: CommonMessageFilter<MessageContent>? = null, initialFilter: CommonMessageFilter<MessageContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MessageContent>, Update>? = MessageFilterByChat, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MessageContent>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatContentMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory, markerFactory: MarkerFactory<in CommonMessage<MessageContent>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MessageContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MessageContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MessageContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MessageContent>>
)= onEditedContent( )= onEditedContent(
initialFilter, initialFilter,
subcontextUpdatesFilter, subcontextUpdatesFilter,
@@ -509,33 +511,6 @@ fun <BC : BehaviourContext> BC.onEditedVideo(
scenarioReceiver scenarioReceiver
) )
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onEditedLivePhoto(
initialFilter: CommonMessageFilter<LivePhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, LivePhotoMessage, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in LivePhotoMessage, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, LivePhotoMessage>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, LivePhotoMessage>
)= onEditedContent(
initialFilter,
subcontextUpdatesFilter,
markerFactory,
additionalSubcontextInitialAction,
scenarioReceiver
)
/** /**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,

View File

@@ -18,10 +18,6 @@ import dev.inmo.tgbotapi.types.checklists.ChecklistTasksDone
import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceivedEvent
import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated
import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotCreated
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.polls.PollOptionAdded
import dev.inmo.tgbotapi.types.polls.PollOptionDeleted
import dev.inmo.tgbotapi.types.message.ChannelEventMessage import dev.inmo.tgbotapi.types.message.ChannelEventMessage
import dev.inmo.tgbotapi.types.message.ChatEvents.* import dev.inmo.tgbotapi.types.message.ChatEvents.*
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.* import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.*
@@ -1058,69 +1054,6 @@ fun <BC : BehaviourContext> BC.onChatOwnerChanged(
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onManagedBotCreated(
initialFilter: SimpleFilter<ChatEventMessage<ManagedBotCreated>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ManagedBotCreated>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatEventMessage<ManagedBotCreated>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ManagedBotCreated>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ManagedBotCreated>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onPollOptionAdded(
initialFilter: SimpleFilter<ChatEventMessage<PollOptionAdded>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<PollOptionAdded>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatEventMessage<PollOptionAdded>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<PollOptionAdded>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PollOptionAdded>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onPollOptionDeleted(
initialFilter: SimpleFilter<ChatEventMessage<PollOptionDeleted>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<PollOptionDeleted>, Update>? = MessageFilterByChat,
markerFactory: MarkerFactory<in ChatEventMessage<PollOptionDeleted>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<PollOptionDeleted>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<PollOptionDeleted>>
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,

View File

@@ -1,27 +0,0 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.guestMessageUpdateOrNull
import dev.inmo.tgbotapi.types.message.abstracts.RequestGuestContentMessage
import dev.inmo.tgbotapi.types.update.abstracts.Update
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver].
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that data
*/
fun <BC : BehaviourContext> BC.onGuestRequestMessage(
initialFilter: SimpleFilter<RequestGuestContentMessage<*>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, RequestGuestContentMessage<*>, Update>? = null,
markerFactory: MarkerFactory<in RequestGuestContentMessage<*>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, RequestGuestContentMessage<*>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, RequestGuestContentMessage<*>>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
(it.guestMessageUpdateOrNull() ?.data) ?.let(::listOfNotNull)
}

View File

@@ -1,38 +0,0 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserManagedBotUpdatedMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.managedBotUpdateOrNull
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
import dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage
import dev.inmo.tgbotapi.types.update.ManagedBotUpdate
import dev.inmo.tgbotapi.types.update.abstracts.Update
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onManagedBotUpdated(
initialFilter: SimpleFilter<ManagedBotUpdated>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ManagedBotUpdated, Update>? = null,
markerFactory: MarkerFactory<in ManagedBotUpdated, Any>? = ByUserManagedBotUpdatedMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ManagedBotUpdated>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ManagedBotUpdated>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
(it.managedBotUpdateOrNull() ?.data) ?.let(::listOfNotNull)
}

View File

@@ -7,8 +7,9 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
import dev.inmo.tgbotapi.extensions.utils.chatContentMessageOrNull import dev.inmo.tgbotapi.extensions.utils.commonMessageOrNull
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import dev.inmo.tgbotapi.utils.PreviewFeature import dev.inmo.tgbotapi.utils.PreviewFeature
@@ -21,7 +22,7 @@ internal inline fun <BC : BehaviourContext, reified T : MediaGroupPartContent> B
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<T>>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) { ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
it.baseSentMessageUpdateOrNull() ?.data ?.chatContentMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { it.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let {
if (it.content.group.all { it.content is T }) { if (it.content.group.all { it.content is T }) {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
listOf(it as MediaGroupMessage<T>) listOf(it as MediaGroupMessage<T>)
@@ -177,24 +178,3 @@ fun <BC : BehaviourContext> BC.onVideoGalleryMessages(
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<VideoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<VideoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<VideoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<VideoContent>>
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onLivePhotoGalleryMessages(
initialFilter: SimpleFilter<MediaGroupMessage<LivePhotoContent>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupMessage<LivePhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in MediaGroupMessage<LivePhotoContent>, Any>? = ByChatMessageMarkerFactory,
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupMessage<LivePhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupMessage<LivePhotoContent>>
) = buildMediaGroupMessagesTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)

View File

@@ -7,8 +7,9 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.AnyMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.AnyMarkerFactory
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull
import dev.inmo.tgbotapi.extensions.utils.chatContentMessageOrNull import dev.inmo.tgbotapi.extensions.utils.commonMessageOrNull
import dev.inmo.tgbotapi.extensions.utils.withContentOrNull import dev.inmo.tgbotapi.extensions.utils.withContentOrNull
import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.*
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
import dev.inmo.tgbotapi.utils.PreviewFeature import dev.inmo.tgbotapi.utils.PreviewFeature
@@ -21,7 +22,7 @@ internal inline fun <BC : BehaviourContext, reified T : MediaGroupPartContent> B
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<T>>
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) { ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, additionalSubcontextInitialAction, scenarioReceiver) {
it.baseSentMessageUpdateOrNull() ?.data ?.chatContentMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let { it.baseSentMessageUpdateOrNull() ?.data ?.commonMessageOrNull() ?.withContentOrNull<MediaGroupContent<*>>() ?.let {
if (it.content.group.all { it.content is T }) { if (it.content.group.all { it.content is T }) {
@Suppress("UNCHECKED_CAST") @Suppress("UNCHECKED_CAST")
listOf(it.content as MediaGroupContent<T>) listOf(it.content as MediaGroupContent<T>)
@@ -177,24 +178,3 @@ fun <BC : BehaviourContext> BC.onVideoGallery(
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<VideoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<VideoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<VideoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<VideoContent>>
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
* to combinate several filters
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
* data
*/
fun <BC : BehaviourContext> BC.onLivePhotoGallery(
initialFilter: SimpleFilter<MediaGroupContent<LivePhotoContent>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, MediaGroupContent<LivePhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in MediaGroupContent<LivePhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, MediaGroupContent<LivePhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, MediaGroupContent<LivePhotoContent>>
) = buildMediaGroupTrigger(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)

View File

@@ -11,7 +11,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times
import dev.inmo.tgbotapi.types.UserId import dev.inmo.tgbotapi.types.UserId
import dev.inmo.tgbotapi.types.Username import dev.inmo.tgbotapi.types.Username
import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.chat.User
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage
import dev.inmo.tgbotapi.types.message.content.AnimationContent import dev.inmo.tgbotapi.types.message.content.AnimationContent
import dev.inmo.tgbotapi.types.message.content.AudioContent import dev.inmo.tgbotapi.types.message.content.AudioContent
import dev.inmo.tgbotapi.types.message.content.DocumentContent import dev.inmo.tgbotapi.types.message.content.DocumentContent
@@ -21,7 +21,6 @@ import dev.inmo.tgbotapi.types.message.content.PhotoContent
import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.content.TextedContent import dev.inmo.tgbotapi.types.message.content.TextedContent
import dev.inmo.tgbotapi.types.message.content.VideoContent import dev.inmo.tgbotapi.types.message.content.VideoContent
import dev.inmo.tgbotapi.types.message.content.LivePhotoContent
import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent import dev.inmo.tgbotapi.types.message.content.VisualMediaGroupPartContent
import dev.inmo.tgbotapi.types.message.content.VoiceContent import dev.inmo.tgbotapi.types.message.content.VoiceContent
import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.types.update.abstracts.Update
@@ -29,10 +28,10 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update
internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention( internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention(
username: Username, username: Username,
initialFilter: CommonMessageFilter<T>? = null, initialFilter: CommonMessageFilter<T>? = null,
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<T>, Update>? = null, noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<T>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = AnyMarkerFactory(),
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
) = onContentMessageWithType<BC, T>( ) = onContentMessageWithType<BC, T>(
initialFilter * { initialFilter * {
it.content.isWithMention(username) it.content.isWithMention(username)
@@ -46,10 +45,10 @@ internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMent
internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onTextMention( internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onTextMention(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<T>? = null, initialFilter: CommonMessageFilter<T>? = null,
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<T>, Update>? = null, noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<T>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = AnyMarkerFactory(),
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
) = onContentMessageWithType<BC, T>( ) = onContentMessageWithType<BC, T>(
initialFilter * { initialFilter * {
it.content.isWithTextMention(userId) it.content.isWithTextMention(userId)
@@ -63,10 +62,10 @@ internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onText
internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention( internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMention(
user: User, user: User,
initialFilter: CommonMessageFilter<T>? = null, initialFilter: CommonMessageFilter<T>? = null,
noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<T>, Update>? = null, noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<T>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<T>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<T>, Any>? = AnyMarkerFactory(),
noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<T>>? = null, noinline additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<T>>? = null,
noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<T>> noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<T>>
) = onContentMessageWithType<BC, T>( ) = onContentMessageWithType<BC, T>(
initialFilter * { initialFilter * {
it.content.isWithMention(user) it.content.isWithMention(user)
@@ -86,10 +85,10 @@ internal inline fun <BC : BehaviourContext, reified T : TextedContent> BC.onMent
fun <BC : BehaviourContext> BC.onMentionWithAnyContent( fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<TextedContent>? = null, initialFilter: CommonMessageFilter<TextedContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<TextedContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<TextedContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<TextedContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<TextedContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextedContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<TextedContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextedContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -100,10 +99,10 @@ fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent( fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<TextedContent>? = null, initialFilter: CommonMessageFilter<TextedContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<TextedContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<TextedContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<TextedContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<TextedContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextedContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<TextedContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextedContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -114,10 +113,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithAnyContent(
fun <BC : BehaviourContext> BC.onMentionWithAnyContent( fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
user: User, user: User,
initialFilter: CommonMessageFilter<TextedContent>? = null, initialFilter: CommonMessageFilter<TextedContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<TextedContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextedContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<TextedContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<TextedContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<TextedContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextedContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<TextedContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextedContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -130,10 +129,10 @@ fun <BC : BehaviourContext> BC.onMentionWithAnyContent(
fun <BC : BehaviourContext> BC.onMentionWithVoiceContent( fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<VoiceContent>? = null, initialFilter: CommonMessageFilter<VoiceContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VoiceContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VoiceContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VoiceContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VoiceContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VoiceContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VoiceContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VoiceContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -144,10 +143,10 @@ fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent( fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<VoiceContent>? = null, initialFilter: CommonMessageFilter<VoiceContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VoiceContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VoiceContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VoiceContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VoiceContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VoiceContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VoiceContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VoiceContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -158,10 +157,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithVoiceContent(
fun <BC : BehaviourContext> BC.onMentionWithVoiceContent( fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
user: User, user: User,
initialFilter: CommonMessageFilter<VoiceContent>? = null, initialFilter: CommonMessageFilter<VoiceContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VoiceContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VoiceContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VoiceContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VoiceContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VoiceContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VoiceContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VoiceContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VoiceContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -174,10 +173,10 @@ fun <BC : BehaviourContext> BC.onMentionWithVoiceContent(
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent( fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null, initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -188,10 +187,10 @@ fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent( fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null, initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -202,10 +201,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupContent(
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent( fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
user: User, user: User,
initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null, initialFilter: CommonMessageFilter<MediaGroupContent<MediaGroupPartContent>>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<MediaGroupContent<MediaGroupPartContent>>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MediaGroupContent<MediaGroupPartContent>>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupContent<MediaGroupPartContent>>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -218,10 +217,10 @@ fun <BC : BehaviourContext> BC.onMentionWithMediaGroupContent(
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent( fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null, initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MediaGroupPartContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MediaGroupPartContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupPartContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MediaGroupPartContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupPartContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -232,10 +231,10 @@ fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent( fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null, initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MediaGroupPartContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MediaGroupPartContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupPartContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MediaGroupPartContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupPartContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -246,10 +245,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithMediaGroupPartContent(
fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent( fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
user: User, user: User,
initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null, initialFilter: CommonMessageFilter<MediaGroupPartContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<MediaGroupPartContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<MediaGroupPartContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<MediaGroupPartContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<MediaGroupPartContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<MediaGroupPartContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<MediaGroupPartContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<MediaGroupPartContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -262,10 +261,10 @@ fun <BC : BehaviourContext> BC.onMentionWithMediaGroupPartContent(
fun <BC : BehaviourContext> BC.onMentionWithAudioContent( fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<AudioContent>? = null, initialFilter: CommonMessageFilter<AudioContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<AudioContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<AudioContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<AudioContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<AudioContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AudioContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<AudioContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AudioContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -276,10 +275,10 @@ fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent( fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<AudioContent>? = null, initialFilter: CommonMessageFilter<AudioContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<AudioContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<AudioContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<AudioContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<AudioContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AudioContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<AudioContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AudioContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -290,10 +289,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithAudioContent(
fun <BC : BehaviourContext> BC.onMentionWithAudioContent( fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
user: User, user: User,
initialFilter: CommonMessageFilter<AudioContent>? = null, initialFilter: CommonMessageFilter<AudioContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<AudioContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AudioContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<AudioContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<AudioContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<AudioContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AudioContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<AudioContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AudioContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -306,10 +305,10 @@ fun <BC : BehaviourContext> BC.onMentionWithAudioContent(
fun <BC : BehaviourContext> BC.onMentionWithDocumentContent( fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<DocumentContent>? = null, initialFilter: CommonMessageFilter<DocumentContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<DocumentContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<DocumentContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<DocumentContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<DocumentContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<DocumentContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<DocumentContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<DocumentContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -320,10 +319,10 @@ fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent( fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<DocumentContent>? = null, initialFilter: CommonMessageFilter<DocumentContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<DocumentContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<DocumentContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<DocumentContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<DocumentContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<DocumentContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<DocumentContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<DocumentContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -334,10 +333,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithDocumentContent(
fun <BC : BehaviourContext> BC.onMentionWithDocumentContent( fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
user: User, user: User,
initialFilter: CommonMessageFilter<DocumentContent>? = null, initialFilter: CommonMessageFilter<DocumentContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<DocumentContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<DocumentContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<DocumentContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<DocumentContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<DocumentContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<DocumentContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<DocumentContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<DocumentContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -350,10 +349,10 @@ fun <BC : BehaviourContext> BC.onMentionWithDocumentContent(
fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent( fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null, initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VisualMediaGroupPartContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VisualMediaGroupPartContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VisualMediaGroupPartContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VisualMediaGroupPartContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VisualMediaGroupPartContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -364,10 +363,10 @@ fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartContent( fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null, initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VisualMediaGroupPartContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VisualMediaGroupPartContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VisualMediaGroupPartContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VisualMediaGroupPartContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VisualMediaGroupPartContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -378,10 +377,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithVisualMediaGroupPartContent(
fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent( fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
user: User, user: User,
initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null, initialFilter: CommonMessageFilter<VisualMediaGroupPartContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VisualMediaGroupPartContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VisualMediaGroupPartContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VisualMediaGroupPartContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VisualMediaGroupPartContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VisualMediaGroupPartContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VisualMediaGroupPartContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VisualMediaGroupPartContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -394,24 +393,10 @@ fun <BC : BehaviourContext> BC.onMentionWithVisualMediaGroupPartContent(
fun <BC : BehaviourContext> BC.onMentionWithVideoContent( fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<VideoContent>? = null, initialFilter: CommonMessageFilter<VideoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VideoContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VideoContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VideoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VideoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VideoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VideoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VideoContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
*/
fun <BC : BehaviourContext> BC.onMentionWithLivePhotoContent(
username: Username,
initialFilter: CommonMessageFilter<LivePhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<LivePhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<LivePhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<LivePhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<LivePhotoContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -422,24 +407,10 @@ fun <BC : BehaviourContext> BC.onMentionWithLivePhotoContent(
fun <BC : BehaviourContext> BC.onTextMentionWithVideoContent( fun <BC : BehaviourContext> BC.onTextMentionWithVideoContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<VideoContent>? = null, initialFilter: CommonMessageFilter<VideoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VideoContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VideoContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VideoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VideoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VideoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VideoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VideoContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
*/
fun <BC : BehaviourContext> BC.onTextMentionWithLivePhotoContent(
userId: UserId,
initialFilter: CommonMessageFilter<LivePhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<LivePhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<LivePhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<LivePhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<LivePhotoContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -450,24 +421,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithLivePhotoContent(
fun <BC : BehaviourContext> BC.onMentionWithVideoContent( fun <BC : BehaviourContext> BC.onMentionWithVideoContent(
user: User, user: User,
initialFilter: CommonMessageFilter<VideoContent>? = null, initialFilter: CommonMessageFilter<VideoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<VideoContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<VideoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<VideoContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<VideoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<VideoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<VideoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<VideoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<VideoContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/**
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
* "stream"
*/
fun <BC : BehaviourContext> BC.onMentionWithLivePhotoContent(
user: User,
initialFilter: CommonMessageFilter<LivePhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<LivePhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<LivePhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<LivePhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<LivePhotoContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -480,10 +437,10 @@ fun <BC : BehaviourContext> BC.onMentionWithLivePhotoContent(
fun <BC : BehaviourContext> BC.onMentionWithPhotoContent( fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<PhotoContent>? = null, initialFilter: CommonMessageFilter<PhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<PhotoContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<PhotoContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<PhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<PhotoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<PhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<PhotoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<PhotoContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -494,10 +451,10 @@ fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent( fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<PhotoContent>? = null, initialFilter: CommonMessageFilter<PhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<PhotoContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<PhotoContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<PhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<PhotoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<PhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<PhotoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<PhotoContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -508,10 +465,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithPhotoContent(
fun <BC : BehaviourContext> BC.onMentionWithPhotoContent( fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
user: User, user: User,
initialFilter: CommonMessageFilter<PhotoContent>? = null, initialFilter: CommonMessageFilter<PhotoContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<PhotoContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<PhotoContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<PhotoContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<PhotoContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<PhotoContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<PhotoContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<PhotoContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<PhotoContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -524,10 +481,10 @@ fun <BC : BehaviourContext> BC.onMentionWithPhotoContent(
fun <BC : BehaviourContext> BC.onMentionWithAnimationContent( fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<AnimationContent>? = null, initialFilter: CommonMessageFilter<AnimationContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<AnimationContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<AnimationContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<AnimationContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<AnimationContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AnimationContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<AnimationContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AnimationContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -538,10 +495,10 @@ fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent( fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<AnimationContent>? = null, initialFilter: CommonMessageFilter<AnimationContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<AnimationContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<AnimationContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<AnimationContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<AnimationContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AnimationContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<AnimationContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AnimationContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -552,10 +509,10 @@ fun <BC : BehaviourContext> BC.onTextMentionWithAnimationContent(
fun <BC : BehaviourContext> BC.onMentionWithAnimationContent( fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
user: User, user: User,
initialFilter: CommonMessageFilter<AnimationContent>? = null, initialFilter: CommonMessageFilter<AnimationContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<AnimationContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<AnimationContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<AnimationContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<AnimationContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<AnimationContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<AnimationContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<AnimationContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<AnimationContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
@@ -568,10 +525,10 @@ fun <BC : BehaviourContext> BC.onMentionWithAnimationContent(
fun <BC : BehaviourContext> BC.onMentionWithTextContent( fun <BC : BehaviourContext> BC.onMentionWithTextContent(
username: Username, username: Username,
initialFilter: CommonMessageFilter<TextContent>? = null, initialFilter: CommonMessageFilter<TextContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<TextContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<TextContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<TextContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<TextContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<TextContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextContent>>
) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -582,10 +539,10 @@ fun <BC : BehaviourContext> BC.onMentionWithTextContent(
fun <BC : BehaviourContext> BC.onTextMentionWithTextContent( fun <BC : BehaviourContext> BC.onTextMentionWithTextContent(
userId: UserId, userId: UserId,
initialFilter: CommonMessageFilter<TextContent>? = null, initialFilter: CommonMessageFilter<TextContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<TextContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<TextContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<TextContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<TextContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<TextContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextContent>>
) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
/** /**
@@ -596,9 +553,9 @@ fun <BC : BehaviourContext> BC.onTextMentionWithTextContent(
fun <BC : BehaviourContext> BC.onMentionWithTextContent( fun <BC : BehaviourContext> BC.onMentionWithTextContent(
user: User, user: User,
initialFilter: CommonMessageFilter<TextContent>? = null, initialFilter: CommonMessageFilter<TextContent>? = null,
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatContentMessage<TextContent>, Update>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, CommonMessage<TextContent>, Update>? = null,
markerFactory: MarkerFactory<in ChatContentMessage<TextContent>, Any>? = AnyMarkerFactory(), markerFactory: MarkerFactory<in CommonMessage<TextContent>, Any>? = AnyMarkerFactory(),
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatContentMessage<TextContent>>? = null, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, CommonMessage<TextContent>>? = null,
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatContentMessage<TextContent>> scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, CommonMessage<TextContent>>
) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) ) = onMention(user, initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)

View File

@@ -1,7 +0,0 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
import dev.inmo.tgbotapi.types.managed_bots.ManagedBotUpdated
object ByUserManagedBotUpdatedMarkerFactory : MarkerFactory<ManagedBotUpdated, Any> {
override suspend fun invoke(data: ManagedBotUpdated) = data.user
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +0,0 @@
package dev.inmo.tgbotapi.abstracts.types
import dev.inmo.tgbotapi.types.GuestQueryId
interface WithOptionalGuestQueryId {
val guestQueryId: GuestQueryId?
}

View File

@@ -5,7 +5,6 @@ package dev.inmo.tgbotapi.bot.exceptions
import korlibs.time.DateTime import korlibs.time.DateTime
import dev.inmo.tgbotapi.types.Response import dev.inmo.tgbotapi.types.Response
import dev.inmo.tgbotapi.types.RetryAfterError import dev.inmo.tgbotapi.types.RetryAfterError
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
import kotlinx.coroutines.CopyableThrowable import kotlinx.coroutines.CopyableThrowable
import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.io.IOException import kotlinx.io.IOException
@@ -23,7 +22,7 @@ fun newRequestException(
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause) description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause) description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
description.contains("wrong file identifier") -> WrongFileIdentifierException(response, plainAnswer, message, cause) description.contains("wrong file identifier") -> WrongFileIdentifierException(response, plainAnswer, message, cause)
description.contains("Too Many Requests", ignoreCase = true) -> TooMuchRequestsException( description.contains("Too Many Requests") -> TooMuchRequestsException(
(response.parameters ?.error as? RetryAfterError) ?: RetryAfterError(60, DateTime.now().unixMillisLong), (response.parameters ?.error as? RetryAfterError) ?: RetryAfterError(60, DateTime.now().unixMillisLong),
response, response,
plainAnswer, plainAnswer,
@@ -36,51 +35,19 @@ fun newRequestException(
message, message,
cause cause
) )
response.errorCode != null -> ApiException(
response.errorCode,
plainAnswer,
response
)
else -> null else -> null
} }
} ?: CommonRequestException(response, plainAnswer, message, cause) } ?: CommonRequestException(response, plainAnswer, message, cause)
@ClassCastsIncluded sealed class BotException(message: String = "Something went wrong", cause: Throwable? = null) : IOException(message, cause), CopyableThrowable<BotException>
sealed class BotException(
override val message: String = "Something went wrong",
cause: Throwable? = null,
open val response: Response? = null,
open val plainAnswer: String? = null,
) : IOException(message, cause), CopyableThrowable<BotException>
sealed class CommonBotException( class CommonBotException(message: String = "Something went wrong", cause: Throwable? = null) : BotException(message, cause) {
message: String = "Something went wrong", override fun createCopy(): BotException = CommonBotException(message!!, cause)
cause: Throwable? = null,
response: Response? = null,
plainAnswer: String? = null,
) : BotException(message, cause, response, plainAnswer) {
class Default(message: String = "Something went wrong", cause: Throwable? = null) : CommonBotException(message, cause) {
override fun createCopy(): Default = Default(message, cause)
}
abstract override fun createCopy(): CommonBotException?
companion object {
operator fun invoke(message: String = "Something went wrong", cause: Throwable? = null) = Default(message, cause)
}
}
class ApiException(
val httpResponseCode: Int?,
val plainResponse: String,
response: Response? = null,
) :
CommonBotException("$httpResponseCode: $plainResponse", null, response, plainResponse) {
override fun createCopy(): ApiException = ApiException(httpResponseCode, plainResponse, response)
} }
sealed class RequestException ( sealed class RequestException (
override val response: Response, val response: Response,
override val plainAnswer: String, val plainAnswer: String,
message: String? = null, message: String? = null,
cause: Throwable? = null cause: Throwable? = null
) : BotException( ) : BotException(

View File

@@ -3,7 +3,6 @@ package dev.inmo.tgbotapi.bot.ktor.base
import dev.inmo.kslog.common.* import dev.inmo.kslog.common.*
import dev.inmo.micro_utils.coroutines.runCatchingLogging import dev.inmo.micro_utils.coroutines.runCatchingLogging
import dev.inmo.tgbotapi.bot.BaseRequestsExecutor import dev.inmo.tgbotapi.bot.BaseRequestsExecutor
import dev.inmo.tgbotapi.bot.exceptions.ApiException
import dev.inmo.tgbotapi.bot.exceptions.BotException import dev.inmo.tgbotapi.bot.exceptions.BotException
import dev.inmo.tgbotapi.bot.exceptions.CommonBotException import dev.inmo.tgbotapi.bot.exceptions.CommonBotException
import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict import dev.inmo.tgbotapi.bot.exceptions.GetUpdatesConflict
@@ -99,15 +98,7 @@ class DefaultKtorRequestsExecutor internal constructor(
) )
} }
exceptionResult.exceptionOrNull() ?.let { exceptionResult.exceptionOrNull() ?.let {
val prehandledException = runCatching { CommonBotException(cause = e)
when {
it is ResponseException -> ApiException(it.response.status.value, it.response.bodyAsText())
else -> null
}
}.getOrElse {
null
}
prehandledException ?: CommonBotException(cause = e)
} ?: exceptionResult.getOrThrow() } ?: exceptionResult.getOrThrow()
} }
is CancellationException, is CancellationException,

View File

@@ -1,43 +0,0 @@
package dev.inmo.tgbotapi.requests
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.limitField
import dev.inmo.tgbotapi.types.message.RawMessage
import dev.inmo.tgbotapi.types.message.abstracts.ChatContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ChatMessage
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.userIdField
import kotlinx.serialization.*
import kotlinx.serialization.builtins.ListSerializer
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
@Serializable
data class GetUserPersonalChatMessages(
@SerialName(userIdField)
val userId: ChatId,
@SerialName(limitField)
val limit: Int
) : SimpleRequest<List<ChatContentMessage<*>>> {
override fun method(): String = "getUserPersonalChatMessages"
override val resultDeserializer: DeserializationStrategy<List<ChatContentMessage<*>>>
get() = resultSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
private object MessagesDeserializer : DeserializationStrategy<List<ChatContentMessage<*>>> {
private val rawListSerializer = ListSerializer(RawMessage.serializer())
override val descriptor: SerialDescriptor = rawListSerializer.descriptor
@Suppress("UNCHECKED_CAST")
override fun deserialize(decoder: Decoder): List<ChatContentMessage<*>> {
return rawListSerializer.deserialize(decoder).map {
it.asMessage as ChatContentMessage<*>
}
}
}
companion object {
internal val resultSerializer: DeserializationStrategy<List<ChatContentMessage<*>>> = MessagesDeserializer
}
}

View File

@@ -1,40 +0,0 @@
package dev.inmo.tgbotapi.requests
import dev.inmo.kslog.common.w
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.allowedToSavePreparedKeyboardButtons
import dev.inmo.tgbotapi.types.buttonField
import dev.inmo.tgbotapi.types.buttons.KeyboardButton
import dev.inmo.tgbotapi.types.buttons.PreparedKeyboardButton
import dev.inmo.tgbotapi.types.userIdField
import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationStrategy
@Serializable
data class SavePreparedKeyboardButton(
@SerialName(userIdField)
val userId: ChatId,
@SerialName(buttonField)
val button: KeyboardButton
) : SimpleRequest<PreparedKeyboardButton> {
override val resultDeserializer: DeserializationStrategy<PreparedKeyboardButton>
get() = PreparedKeyboardButton.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override fun method(): String = "savePreparedKeyboardButton"
init {
if (button::class !in allowedToSavePreparedKeyboardButtons) {
DefaultKTgBotAPIKSLog.w {
"According to https://core.telegram.org/bots/api#savepreparedkeyboardbutton it is disallowed to use " +
"anything except request_users, request_chat, or request_managed_bot, but you passed $button " +
"which is not instance of any allowed buttons type"
}
}
}
}

View File

@@ -1,26 +0,0 @@
package dev.inmo.tgbotapi.requests.answers
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.GuestQueryId
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
import dev.inmo.tgbotapi.types.guest.SentGuestMessage
import dev.inmo.tgbotapi.types.guestQueryIdField
import dev.inmo.tgbotapi.types.resultField
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerialName
import kotlinx.serialization.SerializationStrategy
import kotlinx.serialization.Serializable
@Serializable
data class AnswerGuestQuery(
@SerialName(guestQueryIdField)
val guestQueryId: GuestQueryId,
@SerialName(resultField)
val result: InlineQueryResult
) : SimpleRequest<SentGuestMessage> {
override fun method(): String = "answerGuestQuery"
override val resultDeserializer: DeserializationStrategy<SentGuestMessage>
get() = SentGuestMessage.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -6,7 +6,6 @@ import dev.inmo.tgbotapi.types.ChatIdentifier
import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMember
import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMemberSerializer import dev.inmo.tgbotapi.types.chat.member.AdministratorChatMemberSerializer
import dev.inmo.tgbotapi.types.chatIdField import dev.inmo.tgbotapi.types.chatIdField
import dev.inmo.tgbotapi.types.returnBotsField
import kotlinx.serialization.* import kotlinx.serialization.*
import kotlinx.serialization.builtins.ListSerializer import kotlinx.serialization.builtins.ListSerializer
@@ -14,23 +13,10 @@ private val chatMembersListSerializer = ListSerializer(
AdministratorChatMemberSerializer AdministratorChatMemberSerializer
) )
/**
* Represents a request to retrieve a list of administrators in a chat.
*
* This class is used to get information about all administrators of a specific chat.
* The response includes details about the administrators, such as their permissions.
*
* @property chatId Unique identifier for the target chat or username of the target supergroup or channel.
* @property retrieveOtherBots (Serialized as `return_bots`) Optional flag indicating whether to include bot administrators other than the requesting bot.
* @see ChatRequest
* @see SimpleRequest
*/
@Serializable @Serializable
data class GetChatAdministrators( data class GetChatAdministrators(
@SerialName(chatIdField) @SerialName(chatIdField)
override val chatId: ChatIdentifier, override val chatId: ChatIdentifier
@SerialName(returnBotsField)
val retrieveOtherBots: Boolean? = null
): ChatRequest, SimpleRequest<List<AdministratorChatMember>> { ): ChatRequest, SimpleRequest<List<AdministratorChatMember>> {
override fun method(): String = "getChatAdministrators" override fun method(): String = "getChatAdministrators"
override val resultDeserializer: DeserializationStrategy<List<AdministratorChatMember>> override val resultDeserializer: DeserializationStrategy<List<AdministratorChatMember>>

View File

@@ -1,96 +0,0 @@
package dev.inmo.tgbotapi.requests.chat.invite_links
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ChatJoinRequestQueryId
import dev.inmo.tgbotapi.types.chatJoinRequestQueryIdField
import dev.inmo.tgbotapi.types.resultField
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationStrategy
import kotlinx.serialization.descriptors.PrimitiveKind
import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
/**
* Result of an [AnswerChatJoinRequestQuery]. Serialized as a plain string.
*
* @see <a href="https://core.telegram.org/bots/api#answerchatjoinrequestquery">answerChatJoinRequestQuery</a>
*/
@Serializable(ChatJoinRequestQueryResult.Companion::class)
sealed interface ChatJoinRequestQueryResult {
val name: String
/**
* Allow the user to join the chat.
*/
@Serializable(ChatJoinRequestQueryResult.Companion::class)
data object Approve : ChatJoinRequestQueryResult {
override val name: String = "approve"
}
/**
* Disallow the user to join the chat.
*/
@Serializable(ChatJoinRequestQueryResult.Companion::class)
data object Decline : ChatJoinRequestQueryResult {
override val name: String = "decline"
}
/**
* Leave the decision to other administrators.
*/
@Serializable(ChatJoinRequestQueryResult.Companion::class)
data object Queue : ChatJoinRequestQueryResult {
override val name: String = "queue"
}
/**
* Any other result which is currently unknown to this library.
*/
@Serializable(ChatJoinRequestQueryResult.Companion::class)
data class Unknown(override val name: String) : ChatJoinRequestQueryResult
companion object : KSerializer<ChatJoinRequestQueryResult> {
override val descriptor: SerialDescriptor =
PrimitiveSerialDescriptor("ChatJoinRequestQueryResult", PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: ChatJoinRequestQueryResult) {
encoder.encodeString(value.name)
}
override fun deserialize(decoder: Decoder): ChatJoinRequestQueryResult {
return when (val name = decoder.decodeString()) {
Approve.name -> Approve
Decline.name -> Decline
Queue.name -> Queue
else -> Unknown(name)
}
}
}
}
/**
* Use this method to process a received chat join request query.
*
* @see <a href="https://core.telegram.org/bots/api#answerchatjoinrequestquery">answerChatJoinRequestQuery</a>
*/
@Serializable
data class AnswerChatJoinRequestQuery(
@SerialName(chatJoinRequestQueryIdField)
val chatJoinRequestQueryId: ChatJoinRequestQueryId,
@SerialName(resultField)
val result: ChatJoinRequestQueryResult
) : SimpleRequest<Unit> {
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override val resultDeserializer: DeserializationStrategy<Unit>
get() = UnitFromBooleanSerializer
override fun method(): String = "answerChatJoinRequestQuery"
}

View File

@@ -1,34 +0,0 @@
package dev.inmo.tgbotapi.requests.chat.invite_links
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ChatJoinRequestQueryId
import dev.inmo.tgbotapi.types.chatJoinRequestQueryIdField
import dev.inmo.tgbotapi.types.webAppUrlField
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationStrategy
/**
* Use this method to process a received chat join request query by showing a Mini App to the user before deciding the
* outcome. Call [AnswerChatJoinRequestQuery] to resolve the join request query based on the user interaction with the
* Mini App.
*
* @see <a href="https://core.telegram.org/bots/api#sendchatjoinrequestwebapp">sendChatJoinRequestWebApp</a>
*/
@Serializable
data class SendChatJoinRequestWebApp(
@SerialName(chatJoinRequestQueryIdField)
val chatJoinRequestQueryId: ChatJoinRequestQueryId,
@SerialName(webAppUrlField)
val webAppUrl: String
) : SimpleRequest<Unit> {
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override val resultDeserializer: DeserializationStrategy<Unit>
get() = UnitFromBooleanSerializer
override fun method(): String = "sendChatJoinRequestWebApp"
}

View File

@@ -3,5 +3,5 @@ package dev.inmo.tgbotapi.requests.edit.abstracts
import dev.inmo.tgbotapi.abstracts.TextedOutput import dev.inmo.tgbotapi.abstracts.TextedOutput
interface EditTextChatMessage : TextedOutput { interface EditTextChatMessage : TextedOutput {
override val text: String? override val text: String
} }

View File

@@ -13,7 +13,6 @@ import dev.inmo.tgbotapi.types.message.RawMessageEntity
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.content.TextContent
import dev.inmo.tgbotapi.types.message.toRawMessageEntities import dev.inmo.tgbotapi.types.message.toRawMessageEntities
import dev.inmo.tgbotapi.types.rich.InputRichMessage
import dev.inmo.tgbotapi.utils.extensions.makeString import dev.inmo.tgbotapi.utils.extensions.makeString
import kotlinx.serialization.* import kotlinx.serialization.*
@@ -56,24 +55,6 @@ fun EditChatMessageText(
replyMarkup replyMarkup
) )
fun EditChatMessageRichText(
chatId: ChatIdentifier,
messageId: MessageId,
richMessage: InputRichMessage,
businessConnectionId: BusinessConnectionId? = chatId.businessConnectionId,
replyMarkup: InlineKeyboardMarkup? = null
) = EditChatMessageText(
chatId = chatId,
messageId = messageId,
text = null,
parseMode = null,
rawEntities = null,
businessConnectionId = businessConnectionId,
linkPreviewOptions = null,
replyMarkup = replyMarkup,
richMessage = richMessage
)
@ConsistentCopyVisibility @ConsistentCopyVisibility
@Serializable @Serializable
data class EditChatMessageText internal constructor( data class EditChatMessageText internal constructor(
@@ -82,7 +63,7 @@ data class EditChatMessageText internal constructor(
@SerialName(messageIdField) @SerialName(messageIdField)
override val messageId: MessageId, override val messageId: MessageId,
@SerialName(textField) @SerialName(textField)
override val text: String? = null, override val text: String,
@SerialName(parseModeField) @SerialName(parseModeField)
override val parseMode: ParseMode? = null, override val parseMode: ParseMode? = null,
@SerialName(entitiesField) @SerialName(entitiesField)
@@ -92,12 +73,10 @@ data class EditChatMessageText internal constructor(
@SerialName(linkPreviewOptionsField) @SerialName(linkPreviewOptionsField)
override val linkPreviewOptions: LinkPreviewOptions? = null, override val linkPreviewOptions: LinkPreviewOptions? = null,
@SerialName(replyMarkupField) @SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null, override val replyMarkup: InlineKeyboardMarkup? = null
@SerialName(richMessageField)
val richMessage: InputRichMessage? = null
) : EditChatMessage<TextContent>, EditTextChatMessage, EditReplyMessage, EditLinkPreviewOptionsContainer { ) : EditChatMessage<TextContent>, EditTextChatMessage, EditReplyMessage, EditLinkPreviewOptionsContainer {
override val textSources: TextSourcesList? by lazy { override val textSources: TextSourcesList? by lazy {
text ?.let { rawEntities ?.asTextSources(it) } rawEntities ?.asTextSources(text)
} }
override fun method(): String = editMessageTextMethod override fun method(): String = editMessageTextMethod

View File

@@ -1,19 +0,0 @@
package dev.inmo.tgbotapi.requests.managed_bots
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.managed_bots.BotAccessSettings
import dev.inmo.tgbotapi.types.userIdField
import kotlinx.serialization.*
@Serializable
data class GetManagedBotAccessSettings(
@SerialName(userIdField)
val userId: ChatId
) : SimpleRequest<BotAccessSettings> {
override fun method(): String = "getManagedBotAccessSettings"
override val resultDeserializer: DeserializationStrategy<BotAccessSettings>
get() = BotAccessSettings.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -1,19 +0,0 @@
package dev.inmo.tgbotapi.requests.managed_bots
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.BotToken
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.userIdField
import kotlinx.serialization.*
@Serializable
data class GetManagedBotToken(
@SerialName(userIdField)
val userId: ChatId
) : SimpleRequest<BotToken> {
override fun method(): String = "getManagedBotToken"
override val resultDeserializer: DeserializationStrategy<BotToken>
get() = BotToken.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -1,19 +0,0 @@
package dev.inmo.tgbotapi.requests.managed_bots
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.BotToken
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.userIdField
import kotlinx.serialization.*
@Serializable
data class ReplaceManagedBotToken(
@SerialName(userIdField)
val userId: ChatId
) : SimpleRequest<BotToken> {
override fun method(): String = "replaceManagedBotToken"
override val resultDeserializer: DeserializationStrategy<BotToken>
get() = BotToken.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

View File

@@ -1,26 +0,0 @@
package dev.inmo.tgbotapi.requests.managed_bots
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.ChatId
import dev.inmo.tgbotapi.types.addedUserIdsField
import dev.inmo.tgbotapi.types.isAccessRestrictedField
import dev.inmo.tgbotapi.types.userIdField
import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer
import kotlinx.serialization.*
@Serializable
data class SetManagedBotAccessSettings(
@SerialName(userIdField)
val userId: ChatId,
@SerialName(addedUserIdsField)
val addedUserIds: List<ChatId>? = null
) : SimpleRequest<Unit> {
@EncodeDefault
@SerialName(isAccessRestrictedField)
val isAccessRestricted: Boolean = addedUserIds != null
override fun method(): String = "setManagedBotAccessSettings"
override val resultDeserializer: DeserializationStrategy<Unit>
get() = UnitFromBooleanSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}

Some files were not shown because too many files have changed in this diff Show More