From b5006cd1e0c9c172382f8cd977ef0c0f608ef3ca Mon Sep 17 00:00:00 2001 From: d1snin Date: Mon, 18 Jul 2022 11:02:13 +0300 Subject: [PATCH 1/3] Add content-oriented typealiases for messages --- .../types/message/content/Typealiases.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt new file mode 100644 index 0000000000..6bac869a24 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt @@ -0,0 +1,21 @@ +package dev.inmo.tgbotapi.types.message.content + +import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage + +typealias ContactMessage = CommonMessage +typealias VenueMessage = CommonMessage +typealias PollMessage = CommonMessage +typealias DiceMessage = CommonMessage +typealias GameMEssage = CommonMessage +typealias TextMessage = CommonMessage +typealias LocationMessage = CommonMessage +typealias PhotoMessage = CommonMessage +typealias VideoMessage = CommonMessage +typealias AudioMessage = CommonMessage +typealias DocumentMessage = CommonMessage +typealias VoiceMessage = CommonMessage +typealias VideoNoteMessage = CommonMessage +typealias AnimationMessage = CommonMessage +typealias StickerMessage = CommonMessage +typealias InvoiceMessage = CommonMessage +typealias MediaCollectionMessage = CommonMessage> \ No newline at end of file From edbfedb74e888e2201e2c78892e4fb69990cd6d2 Mon Sep 17 00:00:00 2001 From: d1snin Date: Mon, 18 Jul 2022 11:26:18 +0300 Subject: [PATCH 2/3] added logically missing typealiases --- .../types/message/content/Typealiases.kt | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt index 6bac869a24..397ffde08e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/content/Typealiases.kt @@ -2,20 +2,32 @@ package dev.inmo.tgbotapi.types.message.content import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage -typealias ContactMessage = CommonMessage -typealias VenueMessage = CommonMessage -typealias PollMessage = CommonMessage -typealias DiceMessage = CommonMessage -typealias GameMEssage = CommonMessage -typealias TextMessage = CommonMessage -typealias LocationMessage = CommonMessage -typealias PhotoMessage = CommonMessage -typealias VideoMessage = CommonMessage -typealias AudioMessage = CommonMessage -typealias DocumentMessage = CommonMessage -typealias VoiceMessage = CommonMessage -typealias VideoNoteMessage = CommonMessage -typealias AnimationMessage = CommonMessage -typealias StickerMessage = CommonMessage typealias InvoiceMessage = CommonMessage -typealias MediaCollectionMessage = CommonMessage> \ No newline at end of file +typealias VenueMessage = CommonMessage +typealias GameMessage = CommonMessage +typealias DiceMessage = CommonMessage +typealias ContactMessage = CommonMessage +typealias PollMessage = CommonMessage +typealias TextMessage = CommonMessage + +typealias LocationMessage = CommonMessage +typealias LiveLocationMessage = CommonMessage +typealias StaticLocationMessage = CommonMessage + +typealias MediaCollectionMessage = CommonMessage> +typealias MediaMessage = CommonMessage +typealias VideoNoteMessage = CommonMessage +typealias StickerMessage = CommonMessage +typealias TextedMediaMessage = CommonMessage +typealias VoiceMessage = CommonMessage +typealias MediaGroupMessage = CommonMessage +typealias AudioMediaGroupMessage = CommonMessage +typealias AudioMessage = CommonMessage +typealias DocumentMediaGroupMessage = CommonMessage +typealias DocumentMessage = CommonMessage +typealias VisualMediaGroupMessage = CommonMessage +typealias VideoMessage = CommonMessage +typealias PhotoMessage = CommonMessage +typealias AnimationMessage = CommonMessage + + From 5c7164e864b1e98f2794fc28fdd8f5558a8359f0 Mon Sep 17 00:00:00 2001 From: d1snin Date: Mon, 18 Jul 2022 11:59:01 +0300 Subject: [PATCH 3/3] refactored the handlers to use new typealiases when possible --- tgbotapi.behaviour_builder/README.md | 6 +- .../triggers_handling/CommandHandling.kt | 55 +++---- .../CommandHandlingUnhandled.kt | 27 ++-- .../triggers_handling/ContentTriggers.kt | 138 +++++++++--------- .../EditedContentTriggers.kt | 120 +++++++-------- 5 files changed, 173 insertions(+), 173 deletions(-) diff --git a/tgbotapi.behaviour_builder/README.md b/tgbotapi.behaviour_builder/README.md index a1ffe177d3..ae455498c3 100644 --- a/tgbotapi.behaviour_builder/README.md +++ b/tgbotapi.behaviour_builder/README.md @@ -35,10 +35,10 @@ messages and filter messages for context which will be used in subcontext. Full telegramBotWithBehaviour(TOKEN) { onText( includeFilterByChatInBehaviourSubContext = true, // if false - last lambda will receive all messages instead of filtered by chat messages - additionalFilter = { message: CommonMessage -> + additionalFilter = { message: TextMessage -> // here you may check incoming message for any requirements before it will be passed to the main lambda } - ) { message: CommonMessage -> // this here is `BehaviourContext` + ) { message: TextMessage -> // this here is `BehaviourContext` // here put your actions and additional waiters } } @@ -50,7 +50,7 @@ Waiters targeted to get some content "here and now", they must be used inside so ```kotlin telegramBotWithBehaviour(TOKEN) { - onCommand("start") { message: CommonMessage -> + onCommand("start") { message: TextMessage -> val userPhotos = waitPhoto( SendTextMessage(it.chat.id, "Ok, send me some photo, please"), // init request, can be any `Request` object { update: Update -> // That is update which is NOT passed requirements. In current context we expect some photo, but received something else diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandling.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandling.kt index b1943ce5ec..151d70b47d 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandling.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandling.kt @@ -14,6 +14,7 @@ import dev.inmo.tgbotapi.extensions.utils.asBotCommandTextSource import dev.inmo.tgbotapi.extensions.utils.extensions.parseCommandsWithParams import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage import dev.inmo.tgbotapi.types.message.content.TextContent +import dev.inmo.tgbotapi.types.message.content.TextMessage import dev.inmo.tgbotapi.types.update.abstracts.Update import kotlinx.coroutines.Job @@ -21,9 +22,9 @@ internal suspend fun BC.commandUncounted( commandRegex: Regex, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = onText( CommonMessageFilter { message -> val content = message.content @@ -48,9 +49,9 @@ suspend fun BC.command( commandRegex: Regex, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = runCatchingSafely { commandUncounted( commandRegex, @@ -77,35 +78,35 @@ suspend fun BC.command( command: String, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = command(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) suspend fun BC.onCommand( commandRegex: Regex, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = command(commandRegex, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) suspend fun BC.onCommand( command: String, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = onCommand(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) suspend fun BC.commandWithArgs( commandRegex: Regex, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver, Array> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver> ) = command( commandRegex, requireOnlyCommandInMessage = false, @@ -123,9 +124,9 @@ suspend fun BC.commandWithArgs( suspend fun BC.commandWithArgs( command: String, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver, Array> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver> ) = commandWithArgs( command.toRegex(), initialFilter = initialFilter, @@ -137,15 +138,15 @@ suspend fun BC.commandWithArgs( suspend fun BC.onCommandWithArgs( commandRegex: Regex, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver, Array> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver> ): Job = commandWithArgs(commandRegex, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) suspend fun BC.onCommandWithArgs( command: String, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver, Array> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver> ): Job = onCommandWithArgs(command.toRegex(), initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandlingUnhandled.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandlingUnhandled.kt index f491ea8ce7..9f68928500 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandlingUnhandled.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CommandHandlingUnhandled.kt @@ -10,20 +10,19 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.Mar import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times import dev.inmo.tgbotapi.extensions.utils.asBotCommandTextSource import dev.inmo.tgbotapi.extensions.utils.extensions.parseCommandsWithParams -import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage import dev.inmo.tgbotapi.types.message.content.TextContent +import dev.inmo.tgbotapi.types.message.content.TextMessage import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.utils.PreviewFeature import kotlinx.coroutines.Job - @PreviewFeature suspend fun BC.unhandledCommand( requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = onText( CommonMessageFilter { message -> val content = message.content @@ -49,17 +48,17 @@ suspend fun BC.unhandledCommand( suspend fun BC.onUnhandledCommand( requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = unhandledCommand(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) @PreviewFeature suspend fun BC.unhandledCommandWithArgs( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver, Map>> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver>> ) = onUnhandledCommand( requireOnlyCommandInMessage = false, initialFilter = initialFilter, @@ -75,7 +74,7 @@ suspend fun BC.unhandledCommandWithArgs( @PreviewFeature suspend fun BC.onUnhandledCommandWithArgs( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver, Map>> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver>> ): Job = unhandledCommandWithArgs(initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ContentTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ContentTriggers.kt index b4d2d714ad..1b004b05a0 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ContentTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ContentTriggers.kt @@ -75,9 +75,9 @@ suspend fun BC.onContentMessage( */ suspend fun BC.onContact( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -99,9 +99,9 @@ suspend fun BC.onContact( */ suspend fun BC.onDice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -123,9 +123,9 @@ suspend fun BC.onDice( */ suspend fun BC.onGame( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -147,9 +147,9 @@ suspend fun BC.onGame( */ suspend fun BC.onLocation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -171,9 +171,9 @@ suspend fun BC.onLocation( */ suspend fun BC.onLiveLocation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -195,9 +195,9 @@ suspend fun BC.onLiveLocation( */ suspend fun BC.onStaticLocation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -219,9 +219,9 @@ suspend fun BC.onStaticLocation( */ suspend fun BC.onPoll( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -243,9 +243,9 @@ suspend fun BC.onPoll( */ suspend fun BC.onText( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -267,9 +267,9 @@ suspend fun BC.onText( */ suspend fun BC.onVenue( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -291,9 +291,9 @@ suspend fun BC.onVenue( */ suspend fun BC.onAudioMediaGroup( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -315,9 +315,9 @@ suspend fun BC.onAudioMediaGroup( */ suspend fun BC.onDocumentMediaGroupContent( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -339,9 +339,9 @@ suspend fun BC.onDocumentMediaGroupContent( */ suspend fun BC.onTextedMediaContent( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -363,9 +363,9 @@ suspend fun BC.onTextedMediaContent( */ suspend fun BC.onMediaCollection( initialFilter: CommonMessageFilter>? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver>, Update> = MessageFilterByChat, - markerFactory: MarkerFactory>, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver>> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, + markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -387,9 +387,9 @@ suspend fun BC.onMediaCollection( */ suspend fun BC.onMedia( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -411,9 +411,9 @@ suspend fun BC.onMedia( */ suspend fun BC.onAnimation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -435,9 +435,9 @@ suspend fun BC.onAnimation( */ suspend fun BC.onAudio( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -459,9 +459,9 @@ suspend fun BC.onAudio( */ suspend fun BC.onDocument( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -483,9 +483,9 @@ suspend fun BC.onDocument( */ suspend fun BC.onPhoto( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -507,9 +507,9 @@ suspend fun BC.onPhoto( */ suspend fun BC.onSticker( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -531,9 +531,9 @@ suspend fun BC.onSticker( */ suspend fun BC.onVideo( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -555,9 +555,9 @@ suspend fun BC.onVideo( */ suspend fun BC.onVideoNote( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -579,9 +579,9 @@ suspend fun BC.onVideoNote( */ suspend fun BC.onVoice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, @@ -603,9 +603,9 @@ suspend fun BC.onVoice( */ suspend fun BC.onInvoice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = onContentMessageWithType( initialFilter, subcontextUpdatesFilter, diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt index e68ff542a2..30aaf7cac5 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt @@ -85,9 +85,9 @@ suspend fun BC.onEditedContentMessage( */ suspend fun BC.onEditedContact( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -109,9 +109,9 @@ suspend fun BC.onEditedContact( */ suspend fun BC.onEditedDice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -133,9 +133,9 @@ suspend fun BC.onEditedDice( */ suspend fun BC.onEditedGame( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -157,9 +157,9 @@ suspend fun BC.onEditedGame( */ suspend fun BC.onEditedLocation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -181,9 +181,9 @@ suspend fun BC.onEditedLocation( */ suspend fun BC.onEditedText( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -205,9 +205,9 @@ suspend fun BC.onEditedText( */ suspend fun BC.onEditedVenue( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -229,9 +229,9 @@ suspend fun BC.onEditedVenue( */ suspend fun BC.onEditedAudioMediaGroup( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -253,9 +253,9 @@ suspend fun BC.onEditedAudioMediaGroup( */ suspend fun BC.onEditedDocumentMediaGroupContent( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -277,9 +277,9 @@ suspend fun BC.onEditedDocumentMediaGroupContent( */ suspend fun BC.onEditedTextedMediaContent( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -301,9 +301,9 @@ suspend fun BC.onEditedTextedMediaContent( */ suspend fun BC.onEditedMediaCollection( initialFilter: CommonMessageFilter>? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver>, Update> = MessageFilterByChat, - markerFactory: MarkerFactory>, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver>> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, + markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -325,9 +325,9 @@ suspend fun BC.onEditedMediaCollection( */ suspend fun BC.onEditedMedia( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -349,9 +349,9 @@ suspend fun BC.onEditedMedia( */ suspend fun BC.onEditedAnimation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -373,9 +373,9 @@ suspend fun BC.onEditedAnimation( */ suspend fun BC.onEditedAudio( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -397,9 +397,9 @@ suspend fun BC.onEditedAudio( */ suspend fun BC.onEditedDocument( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -421,9 +421,9 @@ suspend fun BC.onEditedDocument( */ suspend fun BC.onEditedPhoto( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -445,9 +445,9 @@ suspend fun BC.onEditedPhoto( */ suspend fun BC.onEditedSticker( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -469,9 +469,9 @@ suspend fun BC.onEditedSticker( */ suspend fun BC.onEditedVideo( initialFilter: CommonMessageFilter? = null, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -493,9 +493,9 @@ suspend fun BC.onEditedVideo( */ suspend fun BC.onEditedVideoNote( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -517,9 +517,9 @@ suspend fun BC.onEditedVideoNote( */ suspend fun BC.onEditedVoice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter, @@ -541,9 +541,9 @@ suspend fun BC.onEditedVoice( */ suspend fun BC.onEditedInvoice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, - subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, - markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, - scenarioReceiver: CustomBehaviourContextAndTypeReceiver> + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver = MessageFilterByChat, + markerFactory: MarkerFactory = ByChatMessageMarkerFactory, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver )= onEditedContent( initialFilter, subcontextUpdatesFilter,