/** * @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 */@file:Suppress("unused", "UNCHECKED_CAST") package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling import dev.inmo.tgbotapi.extensions.behaviour_builder.* import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.CommonMessageFilterExcludeMediaGroups import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.MessageFilterByChat import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatMessageMarkerFactory import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory import dev.inmo.tgbotapi.extensions.utils.asEditMessageUpdate import dev.inmo.tgbotapi.extensions.utils.withContent import dev.inmo.tgbotapi.types.files.abstracts.TelegramMediaFile import dev.inmo.tgbotapi.types.message.abstracts.CommonMessage import dev.inmo.tgbotapi.types.message.content.* import dev.inmo.tgbotapi.types.message.content.abstracts.* import dev.inmo.tgbotapi.types.message.content.media.* import dev.inmo.tgbotapi.types.message.payments.InvoiceContent import dev.inmo.tgbotapi.types.update.abstracts.BaseEditMessageUpdate import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.utils.PreviewFeature @PreviewFeature internal suspend inline fun BC.onEditedContent( noinline initialFilter: CommonMessageFilter? = null, noinline subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update>? = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, noinline scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) { when (it) { is BaseEditMessageUpdate -> (it.asEditMessageUpdate() ?.data ?.withContent()) else -> null } ?.let(::listOfNotNull) } /** * @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 */ suspend fun BC.onEditedContentMessage( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedContact( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedDice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedGame( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedLocation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver ) @Deprecated("Potentially, this trigger will never be used. Use `onPollUpdated` instead") suspend fun BC.onEditedPoll( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedText( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedVenue( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedAudioMediaGroup( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedDocumentMediaGroupContent( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedMediaCollection( initialFilter: CommonMessageFilter>? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver>, Update> = MessageFilterByChat, markerFactory: MarkerFactory>, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver>> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedMedia( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedAnimation( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedAudio( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedDocument( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedPhoto( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedSticker( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedVideo( initialFilter: CommonMessageFilter? = null, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedVideoNote( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedVoice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, 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 */ suspend fun BC.onEditedInvoice( initialFilter: CommonMessageFilter? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update> = MessageFilterByChat, markerFactory: MarkerFactory, Any> = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> )= onEditedContent( initialFilter, subcontextUpdatesFilter, markerFactory, scenarioReceiver )