diff --git a/gradle.properties b/gradle.properties index 64f19b9f36..629ddf8b13 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ kotlin.incremental=true kotlin.incremental.js=true library_group=dev.inmo -library_version=14.0.2 +library_version=14.0.2-preview4 diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggers.kt index 45e61d0995..d98c162db4 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggers.kt @@ -19,8 +19,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ @@ -40,8 +41,9 @@ suspend fun BC.onBusinessConnection( * 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] 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 [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 */ @@ -60,8 +62,9 @@ suspend fun BC.onBusinessConnectionEnabled( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt index 15822ace95..07d81d044e 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggers.kt @@ -31,8 +31,9 @@ internal suspend inline fun B * 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] 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 [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 */ @@ -73,8 +74,9 @@ internal suspend inline fun BC.onDataCallbackQuery( * 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] 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 [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 */ @@ -127,8 +130,9 @@ suspend fun BC.onDataCallbackQuery( * 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] 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 [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 */ @@ -153,8 +157,9 @@ suspend fun BC.onDataCallbackQuery( * 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] 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 [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 */ @@ -177,8 +182,9 @@ suspend fun BC.onGameShortNameCallbackQuery( * 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] 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 [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 */ @@ -201,8 +207,9 @@ suspend fun BC.onInlineMessageIdCallbackQuery( * 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] 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 [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 */ @@ -227,8 +234,9 @@ suspend fun BC.onInlineMessageIdDataCallbackQuery( * 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] 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 [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 */ @@ -255,8 +263,9 @@ suspend fun BC.onInlineMessageIdDataCallbackQuery( * 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] 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 [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 */ @@ -281,8 +290,9 @@ suspend fun BC.onInlineMessageIdDataCallbackQuery( * 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] 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 [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 */ @@ -305,8 +315,9 @@ suspend fun BC.onInlineMessageIdGameShortNameCallbackQue * 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] 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 [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 */ @@ -329,8 +340,9 @@ suspend fun BC.onMessageCallbackQuery( * 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] 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 [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 */ @@ -355,8 +367,9 @@ suspend fun BC.onMessageDataCallbackQuery( * 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] 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 [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 */ @@ -383,8 +396,9 @@ suspend fun BC.onMessageDataCallbackQuery( * 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] 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 [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 */ @@ -409,8 +423,9 @@ suspend fun BC.onMessageDataCallbackQuery( * 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] 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 [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 */ @@ -433,8 +448,9 @@ suspend fun BC.onMessageGameShortNameCallbackQuery( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt index 8b8d2ad746..01fa602bab 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersUnhandled.kt @@ -18,8 +18,9 @@ import dev.inmo.tgbotapi.utils.PreviewFeature * 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] 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 [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 */ @@ -43,8 +44,9 @@ suspend fun BC.onUnhandledDataCallbackQuery( * 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] 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 [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 */ @@ -68,8 +70,9 @@ suspend fun BC.onUnhandledInlineMessageIdDataCallbackQue * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostRemovedTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostRemovedTriggers.kt index 1812aef540..84514846d0 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostRemovedTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostRemovedTriggers.kt @@ -19,8 +19,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostUpdatedTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostUpdatedTriggers.kt index 6695cfceff..1dc75a2d41 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostUpdatedTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatBoostUpdatedTriggers.kt @@ -19,8 +19,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatJoinRequestTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatJoinRequestTriggers.kt index 523b169545..067c35fa3e 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatJoinRequestTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatJoinRequestTriggers.kt @@ -17,8 +17,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMemberUpdatedTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMemberUpdatedTriggers.kt index 1bcd9497bc..e963b4651c 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMemberUpdatedTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMemberUpdatedTriggers.kt @@ -31,8 +31,9 @@ internal suspend inline fun BC.onChatMemberUpdated( * 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] 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 [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 */ @@ -79,8 +81,9 @@ suspend fun BC.onCommonChatMemberUpdated( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionCountUpdatedUpdatesTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionCountUpdatedUpdatesTriggers.kt index e8d2f101c3..8a172e0906 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionCountUpdatedUpdatesTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionCountUpdatedUpdatesTriggers.kt @@ -23,8 +23,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionUpdatedUpdatesTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionUpdatedUpdatesTriggers.kt index 0afe522f72..d822f6bb9d 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionUpdatedUpdatesTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChatMessageReactionUpdatedUpdatesTriggers.kt @@ -28,8 +28,9 @@ internal suspend inline fun BC.onChatMessageReactionUpdatedByUser( * 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] 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 [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 */ @@ -76,8 +78,9 @@ suspend fun BC.onChatMessageReactionUpdatedByChat( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChosenInlineResultTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChosenInlineResultTriggers.kt index 8a6729febc..0d3b24dec6 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChosenInlineResultTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ChosenInlineResultTriggers.kt @@ -26,8 +26,9 @@ internal suspend inline fun BC.onChosenInlineResult( * 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] 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 [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 */ @@ -74,8 +76,9 @@ suspend fun BC.onLocationChosenInlineResult( * 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] 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 [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 */ 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 f3044bb2aa..b791581b99 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 @@ -76,6 +76,11 @@ suspend fun BC.command( } }.getOrThrow() +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.command( command: String, requireOnlyCommandInMessage: Boolean = true, @@ -85,6 +90,11 @@ suspend fun BC.command( scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = command(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.command( botCommand: BotCommand, requireOnlyCommandInMessage: Boolean = true, @@ -94,6 +104,11 @@ suspend fun BC.command( scenarioReceiver: CustomBehaviourContextAndTypeReceiver ) = command(botCommand.command, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onCommand( commandRegex: Regex, requireOnlyCommandInMessage: Boolean = true, @@ -103,6 +118,11 @@ suspend fun BC.onCommand( scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = command(commandRegex, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onCommand( command: String, requireOnlyCommandInMessage: Boolean = true, @@ -112,6 +132,11 @@ suspend fun BC.onCommand( scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = onCommand(command.toRegex(), requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onCommand( botCommand: BotCommand, requireOnlyCommandInMessage: Boolean = true, @@ -121,6 +146,11 @@ suspend fun BC.onCommand( scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = onCommand(botCommand.command, requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.commandWithArgs( commandRegex: Regex, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -142,6 +172,11 @@ suspend fun BC.commandWithArgs( scenarioReceiver(it, args) } +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.commandWithArgs( command: String, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -158,6 +193,11 @@ suspend fun BC.commandWithArgs( scenarioReceiver = 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" + */ suspend fun BC.commandWithArgs( botCommand: BotCommand, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -174,6 +214,11 @@ suspend fun BC.commandWithArgs( scenarioReceiver = 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" + */ suspend fun BC.commandWithNamedArgs( commandRegex: Regex, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -196,6 +241,11 @@ suspend fun BC.commandWithNamedArgs( scenarioReceiver(it, args) } +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.commandWithNamedArgs( command: String, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -214,6 +264,11 @@ suspend fun BC.commandWithNamedArgs( scenarioReceiver = 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" + */ suspend fun BC.commandWithNamedArgs( botCommand: BotCommand, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -232,6 +287,11 @@ suspend fun BC.commandWithNamedArgs( scenarioReceiver = 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" + */ suspend fun BC.onCommandWithArgs( commandRegex: Regex, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -248,6 +308,11 @@ suspend fun BC.onCommandWithArgs( scenarioReceiver = 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" + */ suspend fun BC.onCommandWithArgs( command: String, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -264,6 +329,11 @@ suspend fun BC.onCommandWithArgs( scenarioReceiver = 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" + */ suspend fun BC.onCommandWithArgs( botCommand: BotCommand, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -280,6 +350,11 @@ suspend fun BC.onCommandWithArgs( scenarioReceiver = 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" + */ suspend fun BC.onCommandWithNamedArgs( commandRegex: Regex, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -298,6 +373,11 @@ suspend fun BC.onCommandWithNamedArgs( scenarioReceiver = 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" + */ suspend fun BC.onCommandWithNamedArgs( command: String, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -316,6 +396,11 @@ suspend fun BC.onCommandWithNamedArgs( scenarioReceiver = 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" + */ suspend fun BC.onCommandWithNamedArgs( botCommand: BotCommand, initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, 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 57abb71ea4..8eb4a0805d 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 @@ -16,6 +16,11 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.utils.PreviewFeature import kotlinx.coroutines.Job +/** + * @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" + */ @PreviewFeature suspend fun BC.unhandledCommand( requireOnlyCommandInMessage: Boolean = true, @@ -44,6 +49,11 @@ suspend fun BC.unhandledCommand( 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" + */ @PreviewFeature suspend fun BC.onUnhandledCommand( requireOnlyCommandInMessage: Boolean = true, @@ -53,6 +63,11 @@ suspend fun BC.onUnhandledCommand( scenarioReceiver: CustomBehaviourContextAndTypeReceiver ): Job = unhandledCommand(requireOnlyCommandInMessage, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ @PreviewFeature suspend fun BC.unhandledCommandWithArgs( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, @@ -71,6 +86,11 @@ suspend fun BC.unhandledCommandWithArgs( scenarioReceiver(it, args) } +/** + * @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" + */ @PreviewFeature suspend fun BC.onUnhandledCommandWithArgs( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, 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 9af75800eb..32a0d90bb6 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 @@ -40,8 +40,9 @@ internal suspend inline fun * 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] 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 [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 */ @@ -64,8 +65,9 @@ suspend fun BC.onContentMessage( * 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] 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 [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 */ @@ -88,8 +90,9 @@ suspend fun BC.onContact( * 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] 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 [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 */ @@ -112,8 +115,9 @@ suspend fun BC.onDice( * 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] 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 [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 */ @@ -136,8 +140,9 @@ suspend fun BC.onGame( * 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] 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 [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 */ @@ -160,8 +165,9 @@ suspend fun BC.onLocation( * 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] 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 [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 */ @@ -184,8 +190,9 @@ suspend fun BC.onLiveLocation( * 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] 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 [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 */ @@ -208,8 +215,9 @@ suspend fun BC.onStaticLocation( * 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] 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 [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 */ @@ -232,8 +240,9 @@ suspend fun BC.onPoll( * 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] 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 [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 */ @@ -256,8 +265,9 @@ suspend fun BC.onText( * 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] 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 [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 */ @@ -280,8 +290,9 @@ suspend fun BC.onStory( * 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] 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 [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 */ @@ -304,8 +315,9 @@ suspend fun BC.onTextedContent( * 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] 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 [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 */ @@ -328,8 +340,9 @@ suspend fun BC.onVenue( * 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] 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 [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 */ @@ -352,8 +365,9 @@ suspend fun BC.onAudioMediaGroup( * 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] 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 [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 */ @@ -376,8 +390,9 @@ suspend fun BC.onDocumentMediaGroupContent( * 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] 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 [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 */ @@ -400,8 +415,9 @@ suspend fun BC.onTextedMediaContent( * 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] 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 [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 */ @@ -424,8 +440,9 @@ suspend fun BC.onMediaCollection( * 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] 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 [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 */ @@ -448,8 +465,9 @@ suspend fun BC.onMedia( * 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] 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 [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 */ @@ -472,8 +490,9 @@ suspend fun BC.onAnimation( * 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] 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 [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 */ @@ -496,8 +515,9 @@ suspend fun BC.onAudio( * 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] 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 [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 */ @@ -520,8 +540,9 @@ suspend fun BC.onDocument( * 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] 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 [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 */ @@ -544,8 +565,9 @@ suspend fun BC.onPhoto( * 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] 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 [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 */ @@ -568,8 +590,9 @@ suspend fun BC.onSticker( * 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] 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 [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 */ @@ -592,8 +615,9 @@ suspend fun BC.onVideo( * 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] 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 [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 */ @@ -616,8 +640,9 @@ suspend fun BC.onVideoNote( * 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] 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 [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 */ @@ -640,8 +665,9 @@ suspend fun BC.onVoice( * 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] 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 [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 */ @@ -664,8 +690,9 @@ suspend fun BC.onInvoice( * 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] 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 [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 */ @@ -688,8 +715,9 @@ suspend fun BC.onVisualContent( * 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] 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 [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 */ @@ -712,8 +740,9 @@ suspend fun BC.onMediaContent( * 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] 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 [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 */ @@ -737,8 +766,9 @@ suspend fun BC.onGiveawayContent( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeepLinkHandling.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeepLinkHandling.kt index d56faac244..4862909143 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeepLinkHandling.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeepLinkHandling.kt @@ -43,6 +43,11 @@ suspend fun BC.onDeepLink( } } +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onDeepLink( regex: Regex, initialFilter: SimpleFilter>? = null, @@ -56,6 +61,11 @@ suspend fun BC.onDeepLink( return onDeepLink(initialFilter ?.let { internalFilter * it } ?: internalFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onDeepLink( deepLink: String, initialFilter: SimpleFilter>? = null, diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeletedBusinessMessagesTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeletedBusinessMessagesTriggers.kt index 61be99d40f..b8e8da2127 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeletedBusinessMessagesTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/DeletedBusinessMessagesTriggers.kt @@ -22,8 +22,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ 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 0663a3313d..9d8b508b7f 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 @@ -31,8 +31,9 @@ internal suspend inline fun * 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] 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 [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 */ @@ -55,8 +56,9 @@ suspend fun BC.onEditedContentMessage( * 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] 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 [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 */ @@ -79,8 +81,9 @@ suspend fun BC.onEditedContact( * 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] 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 [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 */ @@ -103,8 +106,9 @@ suspend fun BC.onEditedDice( * 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] 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 [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 */ @@ -127,8 +131,9 @@ suspend fun BC.onEditedGame( * 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] 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 [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 */ @@ -151,8 +156,9 @@ suspend fun BC.onEditedLocation( * 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] 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 [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 */ @@ -175,8 +181,9 @@ suspend fun BC.onEditedText( * 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] 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 [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 */ @@ -199,8 +206,9 @@ suspend fun BC.onEditedVenue( * 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] 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 [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 */ @@ -223,8 +231,9 @@ suspend fun BC.onEditedAudioMediaGroup( * 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] 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 [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 */ @@ -247,8 +256,9 @@ suspend fun BC.onEditedDocumentMediaGroupContent( * 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] 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 [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 */ @@ -271,8 +281,9 @@ suspend fun BC.onEditedTextedMediaContent( * 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] 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 [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 */ @@ -295,8 +306,9 @@ suspend fun BC.onEditedMediaCollection( * 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] 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 [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 */ @@ -319,8 +331,9 @@ suspend fun BC.onEditedMedia( * 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] 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 [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 */ @@ -343,8 +356,9 @@ suspend fun BC.onEditedAnimation( * 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] 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 [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 */ @@ -367,8 +381,9 @@ suspend fun BC.onEditedAudio( * 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] 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 [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 */ @@ -391,8 +406,9 @@ suspend fun BC.onEditedDocument( * 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] 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 [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 */ @@ -415,8 +431,9 @@ suspend fun BC.onEditedPhoto( * 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] 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 [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 */ @@ -439,8 +456,9 @@ suspend fun BC.onEditedSticker( * 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] 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 [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 */ @@ -463,8 +481,9 @@ suspend fun BC.onEditedVideo( * 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] 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 [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 */ @@ -487,8 +506,9 @@ suspend fun BC.onEditedVideoNote( * 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] 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 [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 */ @@ -511,8 +531,9 @@ suspend fun BC.onEditedVoice( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt index 47f188ca40..8ff4fc5aaa 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt @@ -57,8 +57,9 @@ internal suspend inline fun BC.onChannelEvent( * 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] 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 [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 */ @@ -95,8 +97,9 @@ suspend fun BC.onPrivateEvent( * 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] 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 [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 */ @@ -114,8 +117,9 @@ suspend fun BC.onChatEvent( * 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] 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 [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 */ @@ -133,8 +137,9 @@ suspend fun BC.onVideoChatEvent( * 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] 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 [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 */ @@ -152,8 +157,9 @@ suspend fun BC.onVideoChatStartedEvent( * 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] 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 [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 */ @@ -171,8 +177,9 @@ suspend fun BC.onVideoChatEndedEvent( * 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] 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 [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 */ @@ -190,8 +197,9 @@ suspend fun BC.onVideoChatParticipantsInvitedEvent( * 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] 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 [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 */ @@ -209,8 +217,9 @@ suspend fun BC.onMessageAutoDeleteTimerChangedEvent( * 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] 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 [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 */ @@ -228,8 +237,9 @@ suspend fun BC.onPublicChatEvent( * 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] 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 [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 */ @@ -247,8 +257,9 @@ suspend fun BC.onCommonEvent( * 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] 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 [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 */ @@ -266,8 +277,9 @@ suspend fun BC.onGroupEvent( * 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] 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 [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 */ @@ -285,8 +297,9 @@ suspend fun BC.onSupergroupEvent( * 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] 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 [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 */ @@ -304,8 +317,9 @@ suspend fun BC.onChannelChatCreated( * 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] 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 [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 */ @@ -323,8 +337,9 @@ suspend fun BC.onDeleteChatPhoto( * 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] 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 [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 */ @@ -342,8 +357,9 @@ suspend fun BC.onGroupChatCreated( * 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] 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 [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 */ @@ -361,8 +377,9 @@ suspend fun BC.onLeftChatMember( * 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] 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 [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 */ @@ -380,8 +397,9 @@ suspend fun BC.onNewChatMembers( * 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] 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 [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 */ @@ -399,8 +417,9 @@ suspend fun BC.onNewChatPhoto( * 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] 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 [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 */ @@ -418,8 +437,9 @@ suspend fun BC.onNewChatTitle( * 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] 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 [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 */ @@ -437,8 +457,9 @@ suspend fun BC.onPinnedMessage( * 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] 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 [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 */ @@ -456,8 +477,9 @@ suspend fun BC.onProximityAlertTriggered( * 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] 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 [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 */ @@ -478,8 +500,9 @@ suspend fun BC.onSupergroupChatCreated( * 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 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 [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 */ @@ -497,8 +520,9 @@ suspend fun BC.onSuccessfulPayment( * 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 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 [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 */ @@ -516,8 +540,9 @@ suspend fun BC.onUserLoggedIn( * 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 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 [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 */ @@ -535,8 +560,9 @@ suspend fun BC.onWebAppData( * 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 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 [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 */ @@ -554,8 +580,9 @@ suspend fun BC.onForumTopicClosed( * 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 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 [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 */ @@ -573,8 +600,9 @@ suspend fun BC.onForumTopicCreated( * 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 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 [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 */ @@ -593,8 +621,9 @@ suspend fun BC.onForumTopicReopened( * 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 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 [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 */ @@ -612,8 +641,9 @@ suspend fun BC.onForumTopicEdited( * 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 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 [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 */ @@ -631,8 +661,9 @@ suspend fun BC.onGeneralForumTopicHidden( * 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 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 [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 */ @@ -651,8 +682,9 @@ suspend fun BC.onGeneralForumTopicUnhidden( * 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 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 [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 */ @@ -671,8 +703,9 @@ suspend fun BC.onWriteAccessAllowed( * 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 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 [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 */ @@ -691,8 +724,9 @@ suspend fun BC.onWriteAccessAllowedFromRequest( * 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 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 [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 */ @@ -711,8 +745,9 @@ suspend fun BC.onWriteAccessAllowedFromAttachmentMenu( * 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 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 [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 */ @@ -731,8 +766,9 @@ suspend fun BC.onWriteAccessAllowedOther( * 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 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 [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 */ @@ -752,8 +788,9 @@ suspend fun BC.onWriteAccessAllowedFromWebAppLink( * 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 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 [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 */ @@ -772,8 +809,9 @@ suspend fun BC.onChatSharedRequest( * 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 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 [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 */ @@ -792,8 +830,9 @@ suspend fun BC.onUsersShared( * 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 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 [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 */ @@ -813,8 +852,9 @@ suspend fun BC.onUserShared( * 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 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 [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 */ @@ -834,8 +874,9 @@ suspend fun BC.onChatShared( * 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 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 [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 */ @@ -854,8 +895,9 @@ suspend fun BC.onChatBoostAdded( * 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 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt index b81d71c033..69518e093f 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/InlineQueryTriggers.kt @@ -25,8 +25,9 @@ internal suspend inline fun BC. * 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] 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 [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 */ @@ -45,8 +46,9 @@ suspend fun BC.onAnyInlineQuery( * 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] 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 [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 */ @@ -65,8 +67,9 @@ suspend fun BC.onBaseInlineQuery( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggers.kt index 2f705c4de6..ef23f4913d 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupMessagesTriggers.kt @@ -37,8 +37,9 @@ internal suspend inline fun BC.onMediaGroupMessages( * 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] 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 [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 */ @@ -75,8 +77,9 @@ suspend fun BC.onPlaylistMessages( * 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] 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 [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 */ @@ -94,8 +97,9 @@ suspend fun BC.onDocumentsGroupMessages( * 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] 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 [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 */ @@ -113,8 +117,9 @@ suspend fun BC.onVisualGalleryMessages( * 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] 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 [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 */ @@ -132,8 +137,9 @@ suspend fun BC.onVisualMediaGroupMessages( * 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] 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 [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 */ @@ -151,8 +157,9 @@ suspend fun BC.onPhotoGalleryMessages( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt index 95d2071332..ec5ea5f21b 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MediaGroupTriggers.kt @@ -37,8 +37,9 @@ internal suspend inline fun BC.onMediaGroup( * 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] 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 [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 */ @@ -75,8 +77,9 @@ suspend fun BC.onPlaylist( * 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] 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 [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 */ @@ -94,8 +97,9 @@ suspend fun BC.onDocumentsGroup( * 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] 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 [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 */ @@ -113,8 +117,9 @@ suspend fun BC.onVisualGallery( * 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] 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 [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 */ @@ -132,8 +137,9 @@ suspend fun BC.onVisualMediaGroup( * 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] 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 [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 */ @@ -151,8 +157,9 @@ suspend fun BC.onPhotoGallery( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MentionTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MentionTriggers.kt index 262371f8da..f93ac56d7f 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MentionTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/MentionTriggers.kt @@ -71,6 +71,11 @@ internal suspend inline fun B ) +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithAnyContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -79,6 +84,11 @@ suspend fun BC.onMentionWithAnyContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithAnyContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -87,6 +97,11 @@ suspend fun BC.onTextMentionWithAnyContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithAnyContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -97,6 +112,11 @@ suspend fun BC.onMentionWithAnyContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithVoiceContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -105,6 +125,11 @@ suspend fun BC.onMentionWithVoiceContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithVoiceContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -113,6 +138,11 @@ suspend fun BC.onTextMentionWithVoiceContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithVoiceContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -123,6 +153,11 @@ suspend fun BC.onMentionWithVoiceContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithMediaGroupContent( username: Username, initialFilter: CommonMessageFilter>? = null, @@ -131,6 +166,11 @@ suspend fun BC.onMentionWithMediaGroupContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver>> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithMediaGroupContent( userId: UserId, initialFilter: CommonMessageFilter>? = null, @@ -139,6 +179,11 @@ suspend fun BC.onTextMentionWithMediaGroupContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver>> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithMediaGroupContent( user: User, initialFilter: CommonMessageFilter>? = null, @@ -149,6 +194,11 @@ suspend fun BC.onMentionWithMediaGroupContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithMediaGroupPartContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -157,6 +207,11 @@ suspend fun BC.onMentionWithMediaGroupPartContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithMediaGroupPartContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -165,6 +220,11 @@ suspend fun BC.onTextMentionWithMediaGroupPartContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithMediaGroupPartContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -175,6 +235,11 @@ suspend fun BC.onMentionWithMediaGroupPartContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithAudioContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -183,6 +248,11 @@ suspend fun BC.onMentionWithAudioContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithAudioContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -191,6 +261,11 @@ suspend fun BC.onTextMentionWithAudioContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithAudioContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -201,6 +276,11 @@ suspend fun BC.onMentionWithAudioContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithDocumentContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -209,6 +289,11 @@ suspend fun BC.onMentionWithDocumentContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithDocumentContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -217,6 +302,11 @@ suspend fun BC.onTextMentionWithDocumentContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithDocumentContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -227,6 +317,11 @@ suspend fun BC.onMentionWithDocumentContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithVisualMediaGroupPartContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -235,6 +330,11 @@ suspend fun BC.onMentionWithVisualMediaGroupPartContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithVisualMediaGroupPartContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -243,6 +343,11 @@ suspend fun BC.onTextMentionWithVisualMediaGroupPartCont scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithVisualMediaGroupPartContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -253,6 +358,11 @@ suspend fun BC.onMentionWithVisualMediaGroupPartContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithVideoContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -261,6 +371,11 @@ suspend fun BC.onMentionWithVideoContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithVideoContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -269,6 +384,11 @@ suspend fun BC.onTextMentionWithVideoContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithVideoContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -279,6 +399,11 @@ suspend fun BC.onMentionWithVideoContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithPhotoContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -287,6 +412,11 @@ suspend fun BC.onMentionWithPhotoContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithPhotoContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -295,6 +425,11 @@ suspend fun BC.onTextMentionWithPhotoContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithPhotoContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -305,6 +440,11 @@ suspend fun BC.onMentionWithPhotoContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithAnimationContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -313,6 +453,11 @@ suspend fun BC.onMentionWithAnimationContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithAnimationContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -321,6 +466,11 @@ suspend fun BC.onTextMentionWithAnimationContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithAnimationContent( user: User, initialFilter: CommonMessageFilter? = null, @@ -331,6 +481,11 @@ suspend fun BC.onMentionWithAnimationContent( +/** + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + */ suspend fun BC.onMentionWithTextContent( username: Username, initialFilter: CommonMessageFilter? = null, @@ -339,6 +494,11 @@ suspend fun BC.onMentionWithTextContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onMention(username, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onTextMentionWithTextContent( userId: UserId, initialFilter: CommonMessageFilter? = null, @@ -347,6 +507,11 @@ suspend fun BC.onTextMentionWithTextContent( scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onTextMention(userId, initialFilter, subcontextUpdatesFilter, markerFactory, 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" + */ suspend fun BC.onMentionWithTextContent( user: User, initialFilter: CommonMessageFilter? = null, diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PassportTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PassportTriggers.kt index 592fec7e31..608690b12f 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PassportTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PassportTriggers.kt @@ -28,8 +28,9 @@ internal suspend inline fun BC.onPollAnswered( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt index a0a98a5445..f7ce9810b5 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt @@ -26,8 +26,9 @@ internal suspend inline fun BC.onPollU * 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] 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 [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 */ @@ -50,8 +51,9 @@ suspend fun BC.onPollUpdates( * 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] 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 [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 */ @@ -74,8 +76,9 @@ suspend fun BC.onRegularPollUpdates( * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PreCheckoutQueryTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PreCheckoutQueryTriggers.kt index 463ea3e6fd..8b2bb853e7 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PreCheckoutQueryTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PreCheckoutQueryTriggers.kt @@ -20,8 +20,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */ diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ShippingQueryTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ShippingQueryTriggers.kt index 160ead60f5..bc2aa01ba5 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ShippingQueryTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/ShippingQueryTriggers.kt @@ -20,8 +20,9 @@ import dev.inmo.tgbotapi.types.update.abstracts.Update * 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] 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 [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 */