mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-03-03 09:22:22 +00:00
realize ChatOwnerLeft and ChatOwnerChanged
This commit is contained in:
@@ -632,6 +632,10 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
|
|||||||
public static synthetic fun waitChatBoostAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitChatBoostAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitChatEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitChatEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static synthetic fun waitChatEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitChatEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitChatOwnerChanged (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitChatOwnerChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitChatOwnerLeft (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitChatOwnerLeft$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitChatShared (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitChatShared (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static synthetic fun waitChatShared$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitChatShared$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitChatSharedRequest (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitChatSharedRequest (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
@@ -747,6 +751,10 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W
|
|||||||
public static synthetic fun waitChatBoostAddedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitChatBoostAddedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitChatEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitChatEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static synthetic fun waitChatEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitChatEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitChatOwnerChangedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitChatOwnerChangedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static final fun waitChatOwnerLeftEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
|
public static synthetic fun waitChatOwnerLeftEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitChatSharedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitChatSharedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static synthetic fun waitChatSharedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
public static synthetic fun waitChatSharedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/flow/Flow;
|
||||||
public static final fun waitChatSharedRequestEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
public static final fun waitChatSharedRequestEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/flow/Flow;
|
||||||
@@ -1358,6 +1366,10 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl
|
|||||||
public static synthetic fun onChatBoostAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
public static synthetic fun onChatBoostAdded$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
public static final fun onChatEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
public static final fun onChatEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
public static synthetic fun onChatEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
public static synthetic fun onChatEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onChatOwnerChanged (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onChatOwnerChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
|
public static final fun onChatOwnerLeft (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
public static synthetic fun onChatOwnerLeft$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
public static final fun onChatShared (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
public static final fun onChatShared (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
public static synthetic fun onChatShared$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
public static synthetic fun onChatShared$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
||||||
public static final fun onChatSharedRequest (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
public static final fun onChatSharedRequest (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;)Lkotlinx/coroutines/Job;
|
||||||
|
|||||||
@@ -239,6 +239,16 @@ fun BehaviourContext.waitChatBoostAdded(
|
|||||||
errorFactory: NullableRequestBuilder<*> = { null }
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
) = waitEvents<ChatBoostAdded>(initRequest, errorFactory)
|
) = waitEvents<ChatBoostAdded>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitChatOwnerLeft(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<ChatOwnerLeft>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitChatOwnerChanged(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEvents<ChatOwnerChanged>(initRequest, errorFactory)
|
||||||
|
|
||||||
fun BehaviourContext.waitChatBackgroundSet(
|
fun BehaviourContext.waitChatBackgroundSet(
|
||||||
initRequest: Request<*>? = null,
|
initRequest: Request<*>? = null,
|
||||||
errorFactory: NullableRequestBuilder<*> = { null }
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
|||||||
@@ -222,6 +222,16 @@ fun BehaviourContext.waitChatBoostAddedEventsMessages(
|
|||||||
errorFactory: NullableRequestBuilder<*> = { null }
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
) = waitEventsMessages<ChatBoostAdded>(initRequest, errorFactory)
|
) = waitEventsMessages<ChatBoostAdded>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitChatOwnerLeftEventsMessages(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEventsMessages<ChatOwnerLeft>(initRequest, errorFactory)
|
||||||
|
|
||||||
|
fun BehaviourContext.waitChatOwnerChangedEventsMessages(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
) = waitEventsMessages<ChatOwnerChanged>(initRequest, errorFactory)
|
||||||
|
|
||||||
fun BehaviourContext.waitChatBackgroundSetEventsMessages(
|
fun BehaviourContext.waitChatBackgroundSetEventsMessages(
|
||||||
initRequest: Request<*>? = null,
|
initRequest: Request<*>? = null,
|
||||||
errorFactory: NullableRequestBuilder<*> = { null }
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
|||||||
@@ -1011,6 +1011,50 @@ fun <BC : BehaviourContext> BC.onChatBoostAdded(
|
|||||||
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onChatOwnerLeft(
|
||||||
|
initialFilter: SimpleFilter<ChatEventMessage<ChatOwnerLeft>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChatOwnerLeft>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChatEventMessage<ChatOwnerLeft>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatOwnerLeft>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChatOwnerLeft>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
* this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage].
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own.
|
||||||
|
* Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times]
|
||||||
|
* to combinate several filters
|
||||||
|
* @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream".
|
||||||
|
* [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for
|
||||||
|
* "stream"
|
||||||
|
* @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that
|
||||||
|
* data
|
||||||
|
*/
|
||||||
|
fun <BC : BehaviourContext> BC.onChatOwnerChanged(
|
||||||
|
initialFilter: SimpleFilter<ChatEventMessage<ChatOwnerChanged>>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, ChatEventMessage<ChatOwnerChanged>, Update>? = MessageFilterByChat,
|
||||||
|
markerFactory: MarkerFactory<in ChatEventMessage<ChatOwnerChanged>, Any>? = ByChatMessageMarkerFactory,
|
||||||
|
additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, ChatEventMessage<ChatOwnerChanged>>? = null,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, ChatEventMessage<ChatOwnerChanged>>
|
||||||
|
) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
* @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call
|
||||||
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
* @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example,
|
||||||
|
|||||||
@@ -10580,6 +10580,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
|||||||
public static final field needsRepaintingField Ljava/lang/String;
|
public static final field needsRepaintingField Ljava/lang/String;
|
||||||
public static final field newChatMemberField Ljava/lang/String;
|
public static final field newChatMemberField Ljava/lang/String;
|
||||||
public static final field newOwnerChatIdField Ljava/lang/String;
|
public static final field newOwnerChatIdField Ljava/lang/String;
|
||||||
|
public static final field newOwnerField Ljava/lang/String;
|
||||||
public static final field newReactionField Ljava/lang/String;
|
public static final field newReactionField Ljava/lang/String;
|
||||||
public static final field nextLevelRatingField Ljava/lang/String;
|
public static final field nextLevelRatingField Ljava/lang/String;
|
||||||
public static final field nextOffsetField Ljava/lang/String;
|
public static final field nextOffsetField Ljava/lang/String;
|
||||||
@@ -23226,6 +23227,62 @@ public final class dev/inmo/tgbotapi/types/message/ChatEvents/ChatBoostAdded$Com
|
|||||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged$Companion;
|
||||||
|
public fun <init> (Ldev/inmo/tgbotapi/types/chat/CommonUser;)V
|
||||||
|
public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/CommonUser;
|
||||||
|
public final fun copy (Ldev/inmo/tgbotapi/types/chat/CommonUser;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;Ldev/inmo/tgbotapi/types/chat/CommonUser;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public final fun getNewOwner ()Ldev/inmo/tgbotapi/types/chat/CommonUser;
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final synthetic class dev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged$$serializer;
|
||||||
|
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;)V
|
||||||
|
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||||
|
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft$Companion;
|
||||||
|
public fun <init> ()V
|
||||||
|
public fun <init> (Ldev/inmo/tgbotapi/types/chat/CommonUser;)V
|
||||||
|
public synthetic fun <init> (Ldev/inmo/tgbotapi/types/chat/CommonUser;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/CommonUser;
|
||||||
|
public final fun copy (Ldev/inmo/tgbotapi/types/chat/CommonUser;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
|
public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;Ldev/inmo/tgbotapi/types/chat/CommonUser;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public final fun getNewOwner ()Ldev/inmo/tgbotapi/types/chat/CommonUser;
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final synthetic class dev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft$$serializer;
|
||||||
|
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;)V
|
||||||
|
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||||
|
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/types/message/ChatEvents/DeleteChatPhoto : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent {
|
public final class dev/inmo/tgbotapi/types/message/ChatEvents/DeleteChatPhoto : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/PublicChatEvent {
|
||||||
public fun <init> ()V
|
public fun <init> ()V
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -485,6 +485,7 @@ const val headingField = "heading"
|
|||||||
const val fromField = "from"
|
const val fromField = "from"
|
||||||
const val userChatIdField = "user_chat_id"
|
const val userChatIdField = "user_chat_id"
|
||||||
const val userField = "user"
|
const val userField = "user"
|
||||||
|
const val newOwnerField = "new_owner"
|
||||||
const val dateField = "date"
|
const val dateField = "date"
|
||||||
const val reactionsField = "reactions"
|
const val reactionsField = "reactions"
|
||||||
const val reactionField = "reaction"
|
const val reactionField = "reaction"
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.message.ChatEvents
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent
|
||||||
|
import dev.inmo.tgbotapi.types.newOwnerField
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ChatOwnerChanged(
|
||||||
|
@SerialName(newOwnerField)
|
||||||
|
val newOwner: CommonUser
|
||||||
|
) : PublicChatEvent
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package dev.inmo.tgbotapi.types.message.ChatEvents
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.PublicChatEvent
|
||||||
|
import dev.inmo.tgbotapi.types.newOwnerField
|
||||||
|
import kotlinx.serialization.SerialName
|
||||||
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
data class ChatOwnerLeft(
|
||||||
|
@SerialName(newOwnerField)
|
||||||
|
val newOwner: CommonUser? = null
|
||||||
|
) : PublicChatEvent
|
||||||
@@ -202,6 +202,8 @@ internal data class RawMessage(
|
|||||||
private val gift: GiftSentOrReceived.Regular? = null,
|
private val gift: GiftSentOrReceived.Regular? = null,
|
||||||
private val unique_gift: GiftSentOrReceived.Unique? = null,
|
private val unique_gift: GiftSentOrReceived.Unique? = null,
|
||||||
private val gift_upgrade_sent: GiftSentOrReceived? = null,
|
private val gift_upgrade_sent: GiftSentOrReceived? = null,
|
||||||
|
private val chat_owner_left: ChatOwnerLeft? = null,
|
||||||
|
private val chat_owner_changed: ChatOwnerChanged? = null,
|
||||||
) {
|
) {
|
||||||
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
@Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
|
||||||
private val checkedFrom = from ?.takeIf { !it.isFakeTelegramUser() }
|
private val checkedFrom = from ?.takeIf { !it.isFakeTelegramUser() }
|
||||||
@@ -300,6 +302,8 @@ internal data class RawMessage(
|
|||||||
forum_topic_reopened != null -> forum_topic_reopened
|
forum_topic_reopened != null -> forum_topic_reopened
|
||||||
video_chat_ended != null -> video_chat_ended
|
video_chat_ended != null -> video_chat_ended
|
||||||
video_chat_participants_invited != null -> video_chat_participants_invited
|
video_chat_participants_invited != null -> video_chat_participants_invited
|
||||||
|
chat_owner_left != null -> chat_owner_left
|
||||||
|
chat_owner_changed != null -> chat_owner_changed
|
||||||
delete_chat_photo -> DeleteChatPhoto()
|
delete_chat_photo -> DeleteChatPhoto()
|
||||||
group_chat_created -> GroupChatCreated(
|
group_chat_created -> GroupChatCreated(
|
||||||
migrate_to_chat_id
|
migrate_to_chat_id
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsKt {
|
|||||||
public static final fun asChatInviteLinkWithLimitedMembers (Ldev/inmo/tgbotapi/types/ChatInviteLink;)Ldev/inmo/tgbotapi/types/ChatInviteLinkWithLimitedMembers;
|
public static final fun asChatInviteLinkWithLimitedMembers (Ldev/inmo/tgbotapi/types/ChatInviteLink;)Ldev/inmo/tgbotapi/types/ChatInviteLinkWithLimitedMembers;
|
||||||
public static final fun asChatJoinRequestUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate;
|
public static final fun asChatJoinRequestUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate;
|
||||||
public static final fun asChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate;
|
public static final fun asChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate;
|
||||||
|
public static final fun asChatOwnerChanged (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public static final fun asChatOwnerLeft (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
public static final fun asChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
public static final fun asChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
||||||
public static final fun asChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;
|
public static final fun asChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;
|
||||||
public static final fun asCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource;
|
public static final fun asCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource;
|
||||||
@@ -391,6 +393,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsKt {
|
|||||||
public static final fun requireChatInviteLinkWithLimitedMembers (Ldev/inmo/tgbotapi/types/ChatInviteLink;)Ldev/inmo/tgbotapi/types/ChatInviteLinkWithLimitedMembers;
|
public static final fun requireChatInviteLinkWithLimitedMembers (Ldev/inmo/tgbotapi/types/ChatInviteLink;)Ldev/inmo/tgbotapi/types/ChatInviteLinkWithLimitedMembers;
|
||||||
public static final fun requireChatJoinRequestUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate;
|
public static final fun requireChatJoinRequestUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatJoinRequestUpdate;
|
||||||
public static final fun requireChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate;
|
public static final fun requireChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/abstracts/ChatMemberUpdatedUpdate;
|
||||||
|
public static final fun requireChatOwnerChanged (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public static final fun requireChatOwnerLeft (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
public static final fun requireChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
public static final fun requireChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;)Ldev/inmo/tgbotapi/types/actions/ChooseStickerAction;
|
||||||
public static final fun requireChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;
|
public static final fun requireChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChosenInlineResultUpdate;
|
||||||
public static final fun requireCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource;
|
public static final fun requireCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)Ldev/inmo/tgbotapi/types/message/textsources/CodeTextSource;
|
||||||
@@ -734,6 +738,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsKt {
|
|||||||
public static final fun whenChatInviteLinkWithLimitedMembers (Ldev/inmo/tgbotapi/types/ChatInviteLink;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun whenChatInviteLinkWithLimitedMembers (Ldev/inmo/tgbotapi/types/ChatInviteLink;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun whenChatJoinRequestUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun whenChatJoinRequestUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun whenChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun whenChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun whenChatOwnerChanged (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun whenChatOwnerLeft (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun whenChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun whenChooseStickerAction (Ldev/inmo/tgbotapi/types/actions/BotAction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun whenChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun whenChosenInlineResultUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun whenCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun whenCodeTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
@@ -1223,6 +1229,10 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun chatMessageReactionsCountUpdatedUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate;
|
public static final fun chatMessageReactionsCountUpdatedUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/ChatMessageReactionsCountUpdatedUpdate;
|
||||||
public static final fun chatOrNull (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;
|
public static final fun chatOrNull (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;
|
||||||
public static final fun chatOrThrow (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;
|
public static final fun chatOrThrow (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;
|
||||||
|
public static final fun chatOwnerChangedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public static final fun chatOwnerChangedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerChanged;
|
||||||
|
public static final fun chatOwnerLeftOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
|
public static final fun chatOwnerLeftOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/ChatOwnerLeft;
|
||||||
public static final fun chatSharedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/request/ChatShared;
|
public static final fun chatSharedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/request/ChatShared;
|
||||||
public static final fun chatSharedOrNull (Ldev/inmo/tgbotapi/types/request/RequestResponse;)Ldev/inmo/tgbotapi/types/request/ChatShared;
|
public static final fun chatSharedOrNull (Ldev/inmo/tgbotapi/types/request/RequestResponse;)Ldev/inmo/tgbotapi/types/request/ChatShared;
|
||||||
public static final fun chatSharedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/request/ChatShared;
|
public static final fun chatSharedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/request/ChatShared;
|
||||||
@@ -1646,6 +1656,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun ifChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifChatMemberUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifChatMessageReactionUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifChatMessageReactionUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifChatMessageReactionsCountUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifChatMessageReactionsCountUpdatedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun ifChatOwnerChanged (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun ifChatOwnerLeft (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifChatShared (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifChatShared (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifChatShared (Ldev/inmo/tgbotapi/types/request/RequestResponse;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifChatShared (Ldev/inmo/tgbotapi/types/request/RequestResponse;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifChatSharedRequest (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
|||||||
@@ -3275,6 +3275,24 @@ inline fun ChatEvent.asChannelEvent(): ChannelEvent? = this as? ChannelEvent
|
|||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun ChatEvent.requireChannelEvent(): ChannelEvent = this as ChannelEvent
|
inline fun ChatEvent.requireChannelEvent(): ChannelEvent = this as ChannelEvent
|
||||||
|
|
||||||
|
@PreviewFeature
|
||||||
|
inline fun <T> ChatEvent.whenChatOwnerLeft(block: (ChatOwnerLeft) -> T) = asChatOwnerLeft()?.let(block)
|
||||||
|
|
||||||
|
@PreviewFeature
|
||||||
|
inline fun ChatEvent.asChatOwnerLeft(): ChatOwnerLeft? = this as? ChatOwnerLeft
|
||||||
|
|
||||||
|
@PreviewFeature
|
||||||
|
inline fun ChatEvent.requireChatOwnerLeft(): ChatOwnerLeft = this as ChatOwnerLeft
|
||||||
|
|
||||||
|
@PreviewFeature
|
||||||
|
inline fun <T> ChatEvent.whenChatOwnerChanged(block: (ChatOwnerChanged) -> T) = asChatOwnerChanged()?.let(block)
|
||||||
|
|
||||||
|
@PreviewFeature
|
||||||
|
inline fun ChatEvent.asChatOwnerChanged(): ChatOwnerChanged? = this as? ChatOwnerChanged
|
||||||
|
|
||||||
|
@PreviewFeature
|
||||||
|
inline fun ChatEvent.requireChatOwnerChanged(): ChatOwnerChanged = this as ChatOwnerChanged
|
||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun <T> ChatEvent.whenPublicChatEvent(block: (PublicChatEvent) -> T) = asPublicChatEvent()?.let(block)
|
inline fun <T> ChatEvent.whenPublicChatEvent(block: (PublicChatEvent) -> T) = asPublicChatEvent()?.let(block)
|
||||||
|
|
||||||
|
|||||||
@@ -261,6 +261,8 @@ import dev.inmo.tgbotapi.types.media.WithCustomizableCaptionTelegramMedia
|
|||||||
import dev.inmo.tgbotapi.types.message.ChannelEventMessage
|
import dev.inmo.tgbotapi.types.message.ChannelEventMessage
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.ChannelChatCreated
|
import dev.inmo.tgbotapi.types.message.ChatEvents.ChannelChatCreated
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.ChatBoostAdded
|
import dev.inmo.tgbotapi.types.message.ChatEvents.ChatBoostAdded
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged
|
||||||
|
import dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerLeft
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto
|
import dev.inmo.tgbotapi.types.message.ChatEvents.DeleteChatPhoto
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
|
import dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
|
||||||
import dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
|
import dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
|
||||||
@@ -2544,6 +2546,12 @@ public inline fun ChatEvent.supergroupEventOrThrow(): SupergroupEvent = this as
|
|||||||
|
|
||||||
public inline fun <T> ChatEvent.ifSupergroupEvent(block: (SupergroupEvent) -> T): T? = supergroupEventOrNull() ?.let(block)
|
public inline fun <T> ChatEvent.ifSupergroupEvent(block: (SupergroupEvent) -> T): T? = supergroupEventOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatEvent.chatOwnerLeftOrNull(): ChatOwnerLeft? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerLeft
|
||||||
|
|
||||||
|
public inline fun ChatEvent.chatOwnerLeftOrThrow(): ChatOwnerLeft = this as dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerLeft
|
||||||
|
|
||||||
|
public inline fun <T> ChatEvent.ifChatOwnerLeft(block: (ChatOwnerLeft) -> T): T? = chatOwnerLeftOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun ChatEvent.groupChatCreatedOrNull(): GroupChatCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
|
public inline fun ChatEvent.groupChatCreatedOrNull(): GroupChatCreated? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
|
||||||
|
|
||||||
public inline fun ChatEvent.groupChatCreatedOrThrow(): GroupChatCreated = this as dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
|
public inline fun ChatEvent.groupChatCreatedOrThrow(): GroupChatCreated = this as dev.inmo.tgbotapi.types.message.ChatEvents.GroupChatCreated
|
||||||
@@ -2580,6 +2588,12 @@ public inline fun ChatEvent.migratedToSupergroupOrThrow(): MigratedToSupergroup
|
|||||||
|
|
||||||
public inline fun <T> ChatEvent.ifMigratedToSupergroup(block: (MigratedToSupergroup) -> T): T? = migratedToSupergroupOrNull() ?.let(block)
|
public inline fun <T> ChatEvent.ifMigratedToSupergroup(block: (MigratedToSupergroup) -> T): T? = migratedToSupergroupOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun ChatEvent.chatOwnerChangedOrNull(): ChatOwnerChanged? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged
|
||||||
|
|
||||||
|
public inline fun ChatEvent.chatOwnerChangedOrThrow(): ChatOwnerChanged = this as dev.inmo.tgbotapi.types.message.ChatEvents.ChatOwnerChanged
|
||||||
|
|
||||||
|
public inline fun <T> ChatEvent.ifChatOwnerChanged(block: (ChatOwnerChanged) -> T): T? = chatOwnerChangedOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun ChatEvent.leftChatMemberEventOrNull(): LeftChatMemberEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
|
public inline fun ChatEvent.leftChatMemberEventOrNull(): LeftChatMemberEvent? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
|
||||||
|
|
||||||
public inline fun ChatEvent.leftChatMemberEventOrThrow(): LeftChatMemberEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
|
public inline fun ChatEvent.leftChatMemberEventOrThrow(): LeftChatMemberEvent = this as dev.inmo.tgbotapi.types.message.ChatEvents.LeftChatMemberEvent
|
||||||
|
|||||||
Reference in New Issue
Block a user