diff --git a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt index c5ebda5b65..dbbb7bd43b 100644 --- a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt +++ b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EditedContentTriggers.kt @@ -166,18 +166,7 @@ suspend fun BehaviourContext.onEditedLocation( scenarioReceiver ) -/** - * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call - * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, - * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. - * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. - * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] - * to combinate several filters - * @param [markerFactory] Will be used 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 - */ +@Deprecated("Potentially, this trigger will never be used. Use `onPollUpdated` instead") suspend fun BehaviourContext.onEditedPoll( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: BehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, diff --git a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt index 816848f547..f2a3782636 100644 --- a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt +++ b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/PollUpdatesTriggers.kt @@ -9,7 +9,7 @@ import dev.inmo.tgbotapi.extensions.utils.asPollUpdate import dev.inmo.tgbotapi.types.polls.* import dev.inmo.tgbotapi.types.update.abstracts.Update -internal suspend inline fun BehaviourContext.onPollBase( +internal suspend inline fun BehaviourContext.onPollUpdatedBase( noinline initialFilter: SimpleFilter? = null, noinline subcontextUpdatesFilter: BehaviourContextAndTwoTypesReceiver? = null, markerFactory: MarkerFactory = ByIdPollMarkerFactory, @@ -30,12 +30,12 @@ internal suspend inline fun BehaviourContext.onPollBase( * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that * data */ -suspend fun BehaviourContext.onPoll( +suspend fun BehaviourContext.onPollUpdated( initialFilter: SimpleFilter? = null, subcontextUpdatesFilter: BehaviourContextAndTwoTypesReceiver? = null, markerFactory: MarkerFactory = ByIdPollMarkerFactory, scenarioReceiver: BehaviourContextAndTypeReceiver -) = onPollBase( +) = onPollUpdatedBase( initialFilter, subcontextUpdatesFilter, markerFactory, @@ -54,12 +54,12 @@ suspend fun BehaviourContext.onPoll( * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that * data */ -suspend fun BehaviourContext.onRegularPoll( +suspend fun BehaviourContext.onRegularPollUpdated( initialFilter: SimpleFilter? = null, subcontextUpdatesFilter: BehaviourContextAndTwoTypesReceiver? = null, markerFactory: MarkerFactory = ByIdPollMarkerFactory, scenarioReceiver: BehaviourContextAndTypeReceiver -) = onPollBase( +) = onPollUpdatedBase( initialFilter, subcontextUpdatesFilter, markerFactory, @@ -78,12 +78,12 @@ suspend fun BehaviourContext.onRegularPoll( * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that * data */ -suspend fun BehaviourContext.onQuizPoll( +suspend fun BehaviourContext.onQuizPollUpdated( initialFilter: SimpleFilter? = null, subcontextUpdatesFilter: BehaviourContextAndTwoTypesReceiver? = null, markerFactory: MarkerFactory = ByIdPollMarkerFactory, scenarioReceiver: BehaviourContextAndTypeReceiver -) = onPollBase( +) = onPollUpdatedBase( initialFilter, subcontextUpdatesFilter, markerFactory,