mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 03:28:44 +00:00
add support of BusinessConnection
This commit is contained in:
parent
b8061966be
commit
dbc69def0b
@ -1006,6 +1006,11 @@ public final class dev/inmo/tgbotapi/extensions/api/games/SetGameScoreByInlineMe
|
|||||||
public static synthetic fun setGameScore-zwYr1CI$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;JLjava/lang/String;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun setGameScore-zwYr1CI$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/CommonUser;JLjava/lang/String;ZZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/extensions/api/get/GetBusinessConnectionKt {
|
||||||
|
public static final fun getBusinessConnection (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static final fun getBusinessConnection-spp27rg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/api/get/GetCustomEmojiStickersKt {
|
public final class dev/inmo/tgbotapi/extensions/api/get/GetCustomEmojiStickersKt {
|
||||||
public static final fun getCustomEmojiStickerOrNull (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun getCustomEmojiStickerOrNull (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public static final fun getCustomEmojiStickerOrNull-fRZnA7w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun getCustomEmojiStickerOrNull-fRZnA7w (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
@ -92,6 +92,15 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/B
|
|||||||
public static synthetic fun expectOne$default (Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun expectOne$default (Ldev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter;Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitBusinessConnectionKt {
|
||||||
|
public static final fun waitBusinessConnection (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static synthetic fun waitBusinessConnection$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
|
public static final fun waitBusinessConnectionDisabled (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static synthetic fun waitBusinessConnectionDisabled$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
|
public static final fun waitBusinessConnectionEnabled (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static synthetic fun waitBusinessConnectionEnabled$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitCallbackQueryKt {
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitCallbackQueryKt {
|
||||||
public static final fun waitDataCallbackQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun waitDataCallbackQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public static synthetic fun waitDataCallbackQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun waitDataCallbackQuery$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
@ -722,6 +731,15 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/filters/Messag
|
|||||||
public static final fun getMessageFilterForums ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
public static final fun getMessageFilterForums ()Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/BusinessConnectionTriggersKt {
|
||||||
|
public static final fun onBusinessConnection (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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static synthetic fun onBusinessConnection$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/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
|
public static final fun onBusinessConnectionDisabled (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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static synthetic fun onBusinessConnectionDisabled$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/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
|
public static final fun onBusinessConnectionEnabled (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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public static synthetic fun onBusinessConnectionEnabled$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/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersKt {
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/CallbackQueryTriggersKt {
|
||||||
public static final fun onDataCallbackQuery (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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun onDataCallbackQuery (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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public static final fun onDataCallbackQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public static final fun onDataCallbackQuery (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ljava/lang/String;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/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
@ -1337,6 +1355,12 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_f
|
|||||||
public fun invoke-ErVIubg (Ldev/inmo/tgbotapi/types/polls/Poll;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public fun invoke-ErVIubg (Ldev/inmo/tgbotapi/types/polls/Poll;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBusinessConnectionUpdatedMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserBusinessConnectionUpdatedMarkerFactory;
|
||||||
|
public fun invoke (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
public synthetic fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserCallbackQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
|
public final class dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserCallbackQueryMarkerFactory : dev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory {
|
||||||
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserCallbackQueryMarkerFactory;
|
public static final field INSTANCE Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/ByUserCallbackQueryMarkerFactory;
|
||||||
public fun invoke (Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public fun invoke (Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.businessConnectionUpdateOrNull
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.disabledOrNull
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.enabledOrNull
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.shippingQueryUpdateOrNull
|
||||||
|
import dev.inmo.tgbotapi.requests.abstracts.Request
|
||||||
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||||
|
import dev.inmo.tgbotapi.types.payments.ShippingQuery
|
||||||
|
import kotlinx.coroutines.flow.Flow
|
||||||
|
|
||||||
|
suspend fun BehaviourContext.waitBusinessConnection(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
): Flow<BusinessConnection> = expectFlow(
|
||||||
|
initRequest,
|
||||||
|
errorFactory
|
||||||
|
) {
|
||||||
|
(it.businessConnectionUpdateOrNull() ?.data).let(::listOfNotNull)
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun BehaviourContext.waitBusinessConnectionEnabled(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
): Flow<BusinessConnection> = expectFlow(
|
||||||
|
initRequest,
|
||||||
|
errorFactory
|
||||||
|
) {
|
||||||
|
(it.businessConnectionUpdateOrNull() ?.data ?.enabledOrNull()).let(::listOfNotNull)
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun BehaviourContext.waitBusinessConnectionDisabled(
|
||||||
|
initRequest: Request<*>? = null,
|
||||||
|
errorFactory: NullableRequestBuilder<*> = { null }
|
||||||
|
): Flow<BusinessConnection> = expectFlow(
|
||||||
|
initRequest,
|
||||||
|
errorFactory
|
||||||
|
) {
|
||||||
|
(it.businessConnectionUpdateOrNull() ?.data ?.disabledOrNull()).let(::listOfNotNull)
|
||||||
|
}
|
@ -0,0 +1,81 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTwoTypesReceiver
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.CustomBehaviourContextAndTypeReceiver
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.ChatMemberUpdatedFilterByChat
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatChatJoinRequestMarkerFactory
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserBusinessConnectionUpdatedMarkerFactory
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.businessConnectionUpdateOrNull
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.chatJoinRequestUpdateOrNull
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.disabledOrNull
|
||||||
|
import dev.inmo.tgbotapi.extensions.utils.enabledOrNull
|
||||||
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||||
|
import dev.inmo.tgbotapi.types.chat.ChatJoinRequest
|
||||||
|
import dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate
|
||||||
|
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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 : BehaviourContext> BC.onBusinessConnection(
|
||||||
|
initialFilter: SimpleFilter<BusinessConnection>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection, Update>? = null,
|
||||||
|
markerFactory: MarkerFactory<in BusinessConnection, Any> = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessConnection>
|
||||||
|
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||||
|
(it.businessConnectionUpdateOrNull() ?.data) ?.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 : BehaviourContext> BC.onBusinessConnectionEnabled(
|
||||||
|
initialFilter: SimpleFilter<BusinessConnection.Enabled>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection.Enabled, Update>? = null,
|
||||||
|
markerFactory: MarkerFactory<in BusinessConnection.Enabled, Any> = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessConnection.Enabled>
|
||||||
|
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||||
|
(it.businessConnectionUpdateOrNull() ?.data ?.enabledOrNull()) ?.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 : BehaviourContext> BC.onBusinessConnectionDisabled(
|
||||||
|
initialFilter: SimpleFilter<BusinessConnection.Disabled>? = null,
|
||||||
|
subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, BusinessConnection.Disabled, Update>? = null,
|
||||||
|
markerFactory: MarkerFactory<in BusinessConnection.Disabled, Any> = ByUserBusinessConnectionUpdatedMarkerFactory,
|
||||||
|
scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, BusinessConnection.Disabled>
|
||||||
|
) = on(markerFactory, initialFilter, subcontextUpdatesFilter, scenarioReceiver) {
|
||||||
|
(it.businessConnectionUpdateOrNull() ?.data ?.disabledOrNull()) ?.let(::listOfNotNull)
|
||||||
|
}
|
||||||
|
|
@ -6,8 +6,11 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.*
|
|||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.ChatMemberUpdatedFilterByChat
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.filters.ChatMemberUpdatedFilterByChat
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatChatMemberUpdatedMarkerFactory
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByChatChatMemberUpdatedMarkerFactory
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.ByUserBusinessConnectionUpdatedMarkerFactory
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.MarkerFactory
|
||||||
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||||
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
import dev.inmo.tgbotapi.types.chat.member.ChatMemberUpdated
|
||||||
|
import dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.CommonChatMemberUpdatedUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.MyChatMemberUpdatedUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
import dev.inmo.tgbotapi.types.update.abstracts.ChatMemberUpdatedUpdate
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
package dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories
|
||||||
|
|
||||||
|
import dev.inmo.tgbotapi.types.boosts.ChatBoostUpdated
|
||||||
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||||
|
|
||||||
|
|
||||||
|
object ByUserBusinessConnectionUpdatedMarkerFactory : MarkerFactory<BusinessConnection, Any> {
|
||||||
|
override suspend fun invoke(data: BusinessConnection) = data.user
|
||||||
|
}
|
@ -4146,6 +4146,36 @@ public final class dev/inmo/tgbotapi/requests/games/abstracts/SetGameScore$Defau
|
|||||||
public static fun method (Ldev/inmo/tgbotapi/requests/games/abstracts/SetGameScore;)Ljava/lang/String;
|
public static fun method (Ldev/inmo/tgbotapi/requests/games/abstracts/SetGameScore;)Ljava/lang/String;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/requests/get/GetBusinessConnection : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection$Companion;
|
||||||
|
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public final fun component1-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public final fun copy-SYn5crI (Ljava/lang/String;)Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection;
|
||||||
|
public static synthetic fun copy-SYn5crI$default (Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public final fun getId-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy;
|
||||||
|
public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy;
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun method ()Ljava/lang/String;
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/requests/get/GetBusinessConnection$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection$$serializer;
|
||||||
|
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/get/GetBusinessConnection;)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/requests/get/GetBusinessConnection$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/requests/get/GetCustomEmojiStickers : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
|
public final class dev/inmo/tgbotapi/requests/get/GetCustomEmojiStickers : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest {
|
||||||
public static final field Companion Ldev/inmo/tgbotapi/requests/get/GetCustomEmojiStickers$Companion;
|
public static final field Companion Ldev/inmo/tgbotapi/requests/get/GetCustomEmojiStickers$Companion;
|
||||||
public fun <init> (Ljava/util/List;)V
|
public fun <init> (Ljava/util/List;)V
|
||||||
@ -7512,6 +7542,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
|||||||
public static final field canPostStoriesField Ljava/lang/String;
|
public static final field canPostStoriesField Ljava/lang/String;
|
||||||
public static final field canPromoteMembersField Ljava/lang/String;
|
public static final field canPromoteMembersField Ljava/lang/String;
|
||||||
public static final field canReadAllGroupMessagesField Ljava/lang/String;
|
public static final field canReadAllGroupMessagesField Ljava/lang/String;
|
||||||
|
public static final field canReplyField Ljava/lang/String;
|
||||||
public static final field canRestrictMembersField Ljava/lang/String;
|
public static final field canRestrictMembersField Ljava/lang/String;
|
||||||
public static final field canSendAudiosField Ljava/lang/String;
|
public static final field canSendAudiosField Ljava/lang/String;
|
||||||
public static final field canSendDocumentsField Ljava/lang/String;
|
public static final field canSendDocumentsField Ljava/lang/String;
|
||||||
@ -7640,6 +7671,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt {
|
|||||||
public static final field isBotField Ljava/lang/String;
|
public static final field isBotField Ljava/lang/String;
|
||||||
public static final field isClosedField Ljava/lang/String;
|
public static final field isClosedField Ljava/lang/String;
|
||||||
public static final field isDisabledField Ljava/lang/String;
|
public static final field isDisabledField Ljava/lang/String;
|
||||||
|
public static final field isEnabledField Ljava/lang/String;
|
||||||
public static final field isForumField Ljava/lang/String;
|
public static final field isForumField Ljava/lang/String;
|
||||||
public static final field isManualField Ljava/lang/String;
|
public static final field isManualField Ljava/lang/String;
|
||||||
public static final field isMemberField Ljava/lang/String;
|
public static final field isMemberField Ljava/lang/String;
|
||||||
@ -10886,6 +10918,7 @@ public final class dev/inmo/tgbotapi/types/UpdateId$Companion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/types/UpdateTypesKt {
|
public final class dev/inmo/tgbotapi/types/UpdateTypesKt {
|
||||||
|
public static final field UPDATE_BUSINESS_CONNECTION Ljava/lang/String;
|
||||||
public static final field UPDATE_CALLBACK_QUERY Ljava/lang/String;
|
public static final field UPDATE_CALLBACK_QUERY Ljava/lang/String;
|
||||||
public static final field UPDATE_CHANNEL_POST Ljava/lang/String;
|
public static final field UPDATE_CHANNEL_POST Ljava/lang/String;
|
||||||
public static final field UPDATE_CHAT_BOOST Ljava/lang/String;
|
public static final field UPDATE_CHAT_BOOST Ljava/lang/String;
|
||||||
@ -11461,6 +11494,166 @@ public final class dev/inmo/tgbotapi/types/boosts/UserChatBoosts$Companion {
|
|||||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract interface class dev/inmo/tgbotapi/types/business_connection/BusinessConnection {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Companion;
|
||||||
|
public abstract fun getCanReply ()Z
|
||||||
|
public abstract fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public abstract fun getId-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public abstract fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public abstract fun getUserChatId-tHkBKVM ()J
|
||||||
|
public abstract fun isEnabled ()Z
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Companion : kotlinx/serialization/KSerializer {
|
||||||
|
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)V
|
||||||
|
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled : dev/inmo/tgbotapi/types/business_connection/BusinessConnection {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled$Companion;
|
||||||
|
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public final fun component1-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public final fun component3-tHkBKVM ()J
|
||||||
|
public final fun component4 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public final fun component5 ()Z
|
||||||
|
public final fun copy-mMBKOjE (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Z)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;
|
||||||
|
public static synthetic fun copy-mMBKOjE$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public fun getCanReply ()Z
|
||||||
|
public fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public fun getId-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public fun getUserChatId-tHkBKVM ()J
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun isEnabled ()Z
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled$$serializer;
|
||||||
|
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;)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/business_connection/BusinessConnection$Disabled$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled : dev/inmo/tgbotapi/types/business_connection/BusinessConnection {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled$Companion;
|
||||||
|
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public final fun component1-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public final fun component3-tHkBKVM ()J
|
||||||
|
public final fun component4 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public final fun component5 ()Z
|
||||||
|
public final fun copy-mMBKOjE (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Z)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;
|
||||||
|
public static synthetic fun copy-mMBKOjE$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public fun getCanReply ()Z
|
||||||
|
public fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public fun getId-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public fun getUserChatId-tHkBKVM ()J
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun isEnabled ()Z
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled$$serializer;
|
||||||
|
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;)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/business_connection/BusinessConnection$Enabled$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnectionId {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnectionId$Companion;
|
||||||
|
public static final synthetic fun box-impl (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnectionId;
|
||||||
|
public static fun constructor-impl (Ljava/lang/String;)Ljava/lang/String;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public static fun equals-impl (Ljava/lang/String;Ljava/lang/Object;)Z
|
||||||
|
public static final fun equals-impl0 (Ljava/lang/String;Ljava/lang/String;)Z
|
||||||
|
public final fun getString ()Ljava/lang/String;
|
||||||
|
public fun hashCode ()I
|
||||||
|
public static fun hashCode-impl (Ljava/lang/String;)I
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
public static fun toString-impl (Ljava/lang/String;)Ljava/lang/String;
|
||||||
|
public final synthetic fun unbox-impl ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnectionId$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/business_connection/BusinessConnectionId$$serializer;
|
||||||
|
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun deserialize-s7fRnuc (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/String;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
|
||||||
|
public fun serialize-X6RVWW0 (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/String;)V
|
||||||
|
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnectionId$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/RawBusinessConnection {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection$Companion;
|
||||||
|
public fun <init> (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)V
|
||||||
|
public synthetic fun <init> (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZZLkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public final fun component1-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public final fun component3-tHkBKVM ()J
|
||||||
|
public final fun component4 ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public final fun component5 ()Z
|
||||||
|
public final fun component6 ()Z
|
||||||
|
public final fun copy-FubJ-Q0 (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZZ)Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection;
|
||||||
|
public static synthetic fun copy-FubJ-Q0$default (Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public final fun getAsBusinessConnection ()Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;
|
||||||
|
public final fun getCanReply ()Z
|
||||||
|
public final fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate;
|
||||||
|
public final fun getId-T-_HSQI ()Ljava/lang/String;
|
||||||
|
public final fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser;
|
||||||
|
public final fun getUserChatId-tHkBKVM ()J
|
||||||
|
public fun hashCode ()I
|
||||||
|
public final fun isEnabled ()Z
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/business_connection/RawBusinessConnection$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection$$serializer;
|
||||||
|
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/business_connection/RawBusinessConnection;)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/business_connection/RawBusinessConnection$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackDataInlineKeyboardButton : dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton {
|
public final class dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackDataInlineKeyboardButton : dev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/InlineKeyboardButton {
|
||||||
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackDataInlineKeyboardButton$Companion;
|
public static final field Companion Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardButtons/CallbackDataInlineKeyboardButton$Companion;
|
||||||
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
|
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
|
||||||
@ -23276,6 +23469,36 @@ public final class dev/inmo/tgbotapi/types/stories/Story$Companion {
|
|||||||
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/update/BusinessConnectionUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
|
||||||
|
public static final field Companion Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate$Companion;
|
||||||
|
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/business_connection/BusinessConnection;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
|
public final fun component1-4k5XoGU ()J
|
||||||
|
public final fun component2 ()Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;
|
||||||
|
public final fun copy-VElHuNg (JLdev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;
|
||||||
|
public static synthetic fun copy-VElHuNg$default (Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;JLdev/inmo/tgbotapi/types/business_connection/BusinessConnection;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;
|
||||||
|
public fun equals (Ljava/lang/Object;)Z
|
||||||
|
public fun getData ()Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;
|
||||||
|
public synthetic fun getData ()Ljava/lang/Object;
|
||||||
|
public fun getUpdateId-4k5XoGU ()J
|
||||||
|
public fun hashCode ()I
|
||||||
|
public fun toString ()Ljava/lang/String;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class dev/inmo/tgbotapi/types/update/BusinessConnectionUpdate$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
|
||||||
|
public static final field INSTANCE Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate$$serializer;
|
||||||
|
public fun childSerializers ()[Lkotlinx/serialization/KSerializer;
|
||||||
|
public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;
|
||||||
|
public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object;
|
||||||
|
public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor;
|
||||||
|
public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;)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/update/BusinessConnectionUpdate$Companion {
|
||||||
|
public final fun serializer ()Lkotlinx/serialization/KSerializer;
|
||||||
|
}
|
||||||
|
|
||||||
public final class dev/inmo/tgbotapi/types/update/CallbackQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
|
public final class dev/inmo/tgbotapi/types/update/CallbackQueryUpdate : dev/inmo/tgbotapi/types/update/abstracts/Update {
|
||||||
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
public synthetic fun <init> (JLdev/inmo/tgbotapi/types/queries/callback/CallbackQuery;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||||||
public final fun component1-4k5XoGU ()J
|
public final fun component1-4k5XoGU ()J
|
||||||
@ -23752,6 +23975,7 @@ public final class dev/inmo/tgbotapi/types/webapps/query/SentWebAppMessage$Compa
|
|||||||
public abstract class dev/inmo/tgbotapi/updateshandlers/AbstractFlowsUpdatesFilter : dev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter {
|
public abstract class dev/inmo/tgbotapi/updateshandlers/AbstractFlowsUpdatesFilter : dev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter {
|
||||||
public fun <init> ()V
|
public fun <init> ()V
|
||||||
public fun getAllowedUpdates ()Ljava/util/List;
|
public fun getAllowedUpdates ()Ljava/util/List;
|
||||||
|
public fun getBusinessConnectionUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public fun getCallbackQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
public fun getCallbackQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public fun getChannelPostMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
|
public fun getChannelPostMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public fun getChannelPostsFlow ()Lkotlinx/coroutines/flow/Flow;
|
public fun getChannelPostsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
@ -23788,6 +24012,7 @@ public final class dev/inmo/tgbotapi/updateshandlers/DefaultFlowsUpdatesFilter :
|
|||||||
public abstract interface class dev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter : dev/inmo/tgbotapi/updateshandlers/UpdatesFilter {
|
public abstract interface class dev/inmo/tgbotapi/updateshandlers/FlowsUpdatesFilter : dev/inmo/tgbotapi/updateshandlers/UpdatesFilter {
|
||||||
public abstract fun getAllUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
public abstract fun getAllUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public abstract fun getAllowedUpdates ()Ljava/util/List;
|
public abstract fun getAllowedUpdates ()Ljava/util/List;
|
||||||
|
public abstract fun getBusinessConnectionUpdatesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public abstract fun getCallbackQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
public abstract fun getCallbackQueriesFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public abstract fun getChannelPostMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
|
public abstract fun getChannelPostMediaGroupsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
public abstract fun getChannelPostsFlow ()Lkotlinx/coroutines/flow/Flow;
|
public abstract fun getChannelPostsFlow ()Lkotlinx/coroutines/flow/Flow;
|
||||||
|
@ -18,6 +18,7 @@ const val UPDATE_MESSAGE_REACTION = "message_reaction"
|
|||||||
const val UPDATE_MESSAGE_REACTION_COUNT = "message_reaction_count"
|
const val UPDATE_MESSAGE_REACTION_COUNT = "message_reaction_count"
|
||||||
const val UPDATE_CHAT_BOOST = "chat_boost"
|
const val UPDATE_CHAT_BOOST = "chat_boost"
|
||||||
const val UPDATE_REMOVE_CHAT_BOOST = "removed_chat_boost"
|
const val UPDATE_REMOVE_CHAT_BOOST = "removed_chat_boost"
|
||||||
|
const val UPDATE_BUSINESS_CONNECTION = "business_connection"
|
||||||
|
|
||||||
val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
|
val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
|
||||||
UPDATE_MESSAGE,
|
UPDATE_MESSAGE,
|
||||||
@ -35,7 +36,8 @@ val ALL_UPDATES_LIST_WITHOUT_REACTIONS = listOf(
|
|||||||
UPDATE_CHAT_MEMBER,
|
UPDATE_CHAT_MEMBER,
|
||||||
UPDATE_CHAT_JOIN_REQUEST,
|
UPDATE_CHAT_JOIN_REQUEST,
|
||||||
UPDATE_CHAT_BOOST,
|
UPDATE_CHAT_BOOST,
|
||||||
UPDATE_REMOVE_CHAT_BOOST
|
UPDATE_REMOVE_CHAT_BOOST,
|
||||||
|
UPDATE_BUSINESS_CONNECTION
|
||||||
)
|
)
|
||||||
|
|
||||||
val ALL_UPDATES_LIST = ALL_UPDATES_LIST_WITHOUT_REACTIONS + listOf(
|
val ALL_UPDATES_LIST = ALL_UPDATES_LIST_WITHOUT_REACTIONS + listOf(
|
||||||
|
@ -2,6 +2,7 @@ package dev.inmo.tgbotapi.types.business_connection
|
|||||||
|
|
||||||
import dev.inmo.tgbotapi.types.*
|
import dev.inmo.tgbotapi.types.*
|
||||||
import dev.inmo.tgbotapi.types.chat.PreviewUser
|
import dev.inmo.tgbotapi.types.chat.PreviewUser
|
||||||
|
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
|
||||||
import kotlinx.serialization.EncodeDefault
|
import kotlinx.serialization.EncodeDefault
|
||||||
import kotlinx.serialization.KSerializer
|
import kotlinx.serialization.KSerializer
|
||||||
import kotlinx.serialization.SerialName
|
import kotlinx.serialization.SerialName
|
||||||
@ -11,6 +12,7 @@ import kotlinx.serialization.encoding.Decoder
|
|||||||
import kotlinx.serialization.encoding.Encoder
|
import kotlinx.serialization.encoding.Encoder
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
@ClassCastsIncluded
|
||||||
sealed interface BusinessConnection {
|
sealed interface BusinessConnection {
|
||||||
val id: BusinessConnectionId
|
val id: BusinessConnectionId
|
||||||
val user: PreviewUser
|
val user: PreviewUser
|
||||||
|
@ -80,7 +80,7 @@ internal data class RawUpdate constructor(
|
|||||||
message_reaction_count != null -> ChatMessageReactionsCountUpdatedUpdate(updateId, message_reaction_count)
|
message_reaction_count != null -> ChatMessageReactionsCountUpdatedUpdate(updateId, message_reaction_count)
|
||||||
chat_boost != null -> ChatBoostUpdatedUpdate(updateId, chat_boost)
|
chat_boost != null -> ChatBoostUpdatedUpdate(updateId, chat_boost)
|
||||||
removed_chat_boost != null -> ChatBoostRemovedUpdate(updateId, removed_chat_boost)
|
removed_chat_boost != null -> ChatBoostRemovedUpdate(updateId, removed_chat_boost)
|
||||||
business_connection != null -> BusinessConnectionUpdate(updateId, removed_chat_boost)
|
business_connection != null -> BusinessConnectionUpdate(updateId, business_connection)
|
||||||
else -> UnknownUpdate(
|
else -> UnknownUpdate(
|
||||||
updateId,
|
updateId,
|
||||||
raw
|
raw
|
||||||
|
@ -4,7 +4,6 @@ import dev.inmo.micro_utils.coroutines.plus
|
|||||||
import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST
|
import dev.inmo.tgbotapi.types.ALL_UPDATES_LIST
|
||||||
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
|
import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage
|
||||||
import dev.inmo.tgbotapi.types.update.*
|
import dev.inmo.tgbotapi.types.update.*
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.BaseSentMessageUpdate
|
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate
|
import dev.inmo.tgbotapi.types.update.abstracts.UnknownUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||||
import kotlinx.coroutines.channels.*
|
import kotlinx.coroutines.channels.*
|
||||||
@ -30,7 +29,6 @@ interface FlowsUpdatesFilter : UpdatesFilter {
|
|||||||
val chosenInlineResultsFlow: Flow<ChosenInlineResultUpdate>
|
val chosenInlineResultsFlow: Flow<ChosenInlineResultUpdate>
|
||||||
val inlineQueriesFlow: Flow<InlineQueryUpdate>
|
val inlineQueriesFlow: Flow<InlineQueryUpdate>
|
||||||
val callbackQueriesFlow: Flow<CallbackQueryUpdate>
|
val callbackQueriesFlow: Flow<CallbackQueryUpdate>
|
||||||
val businessConnectionsFlow: Flow<BusinessConnectionUpdate>
|
|
||||||
val shippingQueriesFlow: Flow<ShippingQueryUpdate>
|
val shippingQueriesFlow: Flow<ShippingQueryUpdate>
|
||||||
val preCheckoutQueriesFlow: Flow<PreCheckoutQueryUpdate>
|
val preCheckoutQueriesFlow: Flow<PreCheckoutQueryUpdate>
|
||||||
val pollsFlow: Flow<PollUpdate>
|
val pollsFlow: Flow<PollUpdate>
|
||||||
@ -42,6 +40,7 @@ interface FlowsUpdatesFilter : UpdatesFilter {
|
|||||||
val chatMessageReactionsCountUpdatedUpdateFlow: Flow<ChatMessageReactionsCountUpdatedUpdate>
|
val chatMessageReactionsCountUpdatedUpdateFlow: Flow<ChatMessageReactionsCountUpdatedUpdate>
|
||||||
val chatBoostUpdatedUpdateFlow: Flow<ChatBoostUpdatedUpdate>
|
val chatBoostUpdatedUpdateFlow: Flow<ChatBoostUpdatedUpdate>
|
||||||
val chatBoostRemovedUpdateFlow: Flow<ChatBoostRemovedUpdate>
|
val chatBoostRemovedUpdateFlow: Flow<ChatBoostRemovedUpdate>
|
||||||
|
val businessConnectionUpdatesFlow: Flow<BusinessConnectionUpdate>
|
||||||
val unknownUpdatesFlow: Flow<UnknownUpdate>
|
val unknownUpdatesFlow: Flow<UnknownUpdate>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,6 +64,7 @@ abstract class AbstractFlowsUpdatesFilter : FlowsUpdatesFilter {
|
|||||||
override val unknownUpdatesFlow: Flow<UnknownUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
override val unknownUpdatesFlow: Flow<UnknownUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||||
override val chatBoostUpdatedUpdateFlow: Flow<ChatBoostUpdatedUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
override val chatBoostUpdatedUpdateFlow: Flow<ChatBoostUpdatedUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||||
override val chatBoostRemovedUpdateFlow: Flow<ChatBoostRemovedUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
override val chatBoostRemovedUpdateFlow: Flow<ChatBoostRemovedUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||||
|
override val businessConnectionUpdatesFlow: Flow<BusinessConnectionUpdate> by lazy { allUpdatesFlow.filterIsInstance() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1107,6 +1107,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun botOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/Bot;
|
public static final fun botOrThrow (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/Bot;
|
||||||
public static final fun bowlingDiceAnimationTypeOrNull (Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;)Ldev/inmo/tgbotapi/types/dice/BowlingDiceAnimationType;
|
public static final fun bowlingDiceAnimationTypeOrNull (Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;)Ldev/inmo/tgbotapi/types/dice/BowlingDiceAnimationType;
|
||||||
public static final fun bowlingDiceAnimationTypeOrThrow (Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;)Ldev/inmo/tgbotapi/types/dice/BowlingDiceAnimationType;
|
public static final fun bowlingDiceAnimationTypeOrThrow (Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;)Ldev/inmo/tgbotapi/types/dice/BowlingDiceAnimationType;
|
||||||
|
public static final fun businessConnectionUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;
|
||||||
|
public static final fun businessConnectionUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/BusinessConnectionUpdate;
|
||||||
public static final fun byAnonymousOrNull (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$ByAnonymous;
|
public static final fun byAnonymousOrNull (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$ByAnonymous;
|
||||||
public static final fun byAnonymousOrThrow (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$ByAnonymous;
|
public static final fun byAnonymousOrThrow (Ldev/inmo/tgbotapi/types/message/ForwardInfo;)Ldev/inmo/tgbotapi/types/message/ForwardInfo$ByAnonymous;
|
||||||
public static final fun byChatOrNull (Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;)Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated$ByChat;
|
public static final fun byChatOrNull (Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;)Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated$ByChat;
|
||||||
@ -1263,6 +1265,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun describedInlineQueryResultOrThrow (Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;)Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/DescribedInlineQueryResult;
|
public static final fun describedInlineQueryResultOrThrow (Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;)Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/DescribedInlineQueryResult;
|
||||||
public static final fun diceContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DiceContent;
|
public static final fun diceContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DiceContent;
|
||||||
public static final fun diceContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DiceContent;
|
public static final fun diceContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DiceContent;
|
||||||
|
public static final fun disabledOrNull (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;
|
||||||
|
public static final fun disabledOrThrow (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;
|
||||||
public static final fun documentContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DocumentContent;
|
public static final fun documentContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DocumentContent;
|
||||||
public static final fun documentContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DocumentContent;
|
public static final fun documentContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/DocumentContent;
|
||||||
public static final fun documentFileOrNull (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/DocumentFile;
|
public static final fun documentFileOrNull (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;)Ldev/inmo/tgbotapi/types/files/DocumentFile;
|
||||||
@ -1287,6 +1291,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun emailOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/Email;
|
public static final fun emailOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/Email;
|
||||||
public static final fun emojiOrNull (Ldev/inmo/tgbotapi/types/reactions/Reaction;)Ljava/lang/String;
|
public static final fun emojiOrNull (Ldev/inmo/tgbotapi/types/reactions/Reaction;)Ljava/lang/String;
|
||||||
public static final fun emojiOrThrow (Ldev/inmo/tgbotapi/types/reactions/Reaction;)Ljava/lang/String;
|
public static final fun emojiOrThrow (Ldev/inmo/tgbotapi/types/reactions/Reaction;)Ljava/lang/String;
|
||||||
|
public static final fun enabledOrNull (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;
|
||||||
|
public static final fun enabledOrThrow (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;
|
||||||
public static final fun encryptedAddressOrNull (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/EncryptedAddress;
|
public static final fun encryptedAddressOrNull (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/EncryptedAddress;
|
||||||
public static final fun encryptedAddressOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/EncryptedAddress;
|
public static final fun encryptedAddressOrThrow (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/EncryptedAddress;
|
||||||
public static final fun encryptedPassportElementTranslatableOrNull (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElementTranslatable;
|
public static final fun encryptedPassportElementTranslatableOrNull (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;)Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElementTranslatable;
|
||||||
@ -1444,6 +1450,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun ifBot (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifBot (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifBotCommandTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifBotCommandTextSource (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifBowlingDiceAnimationType (Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifBowlingDiceAnimationType (Ldev/inmo/tgbotapi/types/dice/DiceAnimationType;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun ifBusinessConnectionUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifByAnonymous (Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifByAnonymous (Ldev/inmo/tgbotapi/types/message/ForwardInfo;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifByChat (Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifByChat (Ldev/inmo/tgbotapi/types/chat/ChatMessageReactionUpdated;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifByUser (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifByUser (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
@ -1522,6 +1529,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun ifDeleteChatPhoto (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifDeleteChatPhoto (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifDescribedInlineQueryResult (Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifDescribedInlineQueryResult (Ldev/inmo/tgbotapi/types/InlineQueries/InlineQueryResult/abstracts/InlineQueryResult;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifDiceContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifDiceContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun ifDisabled (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifDocumentContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifDocumentContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifDocumentFile (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifDocumentFile (Ldev/inmo/tgbotapi/types/files/TelegramMediaFile;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifDocumentMediaGroupMemberTelegramMedia (Ldev/inmo/tgbotapi/types/media/TelegramMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifDocumentMediaGroupMemberTelegramMedia (Ldev/inmo/tgbotapi/types/media/TelegramMedia;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
@ -1534,6 +1542,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt {
|
|||||||
public static final fun ifEditMessageUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifEditMessageUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifEmail (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifEmail (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifEmoji (Ldev/inmo/tgbotapi/types/reactions/Reaction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifEmoji (Ldev/inmo/tgbotapi/types/reactions/Reaction;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
|
public static final fun ifEnabled (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifEncryptedAddress (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifEncryptedAddress (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifEncryptedPassportElementTranslatable (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifEncryptedPassportElementTranslatable (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
public static final fun ifEncryptedPassportElementWithData (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
public static final fun ifEncryptedPassportElementWithData (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
|
||||||
@ -2623,8 +2632,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/extensions/TelegramBotComm
|
|||||||
public final class dev/inmo/tgbotapi/extensions/utils/extensions/UpdateChatRetrieverKt {
|
public final class dev/inmo/tgbotapi/extensions/utils/extensions/UpdateChatRetrieverKt {
|
||||||
public static final fun sourceChat (Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;)Ldev/inmo/tgbotapi/types/chat/PreviewChat;
|
public static final fun sourceChat (Ldev/inmo/tgbotapi/types/queries/callback/CallbackQuery;)Ldev/inmo/tgbotapi/types/chat/PreviewChat;
|
||||||
public static final fun sourceChat (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/chat/Chat;
|
public static final fun sourceChat (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/chat/Chat;
|
||||||
public static final fun sourceChatWithConverters (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/types/chat/Chat;
|
public static final fun sourceChatWithConverters (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Ldev/inmo/tgbotapi/types/chat/Chat;
|
||||||
public static synthetic fun sourceChatWithConverters$default (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/Chat;
|
public static synthetic fun sourceChatWithConverters$default (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/Chat;
|
||||||
public static final fun sourceUser (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/chat/User;
|
public static final fun sourceUser (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/chat/User;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ import dev.inmo.tgbotapi.types.actions.UploadVideoAction
|
|||||||
import dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction
|
import dev.inmo.tgbotapi.types.actions.UploadVideoNoteAction
|
||||||
import dev.inmo.tgbotapi.types.actions.UploadVoiceAction
|
import dev.inmo.tgbotapi.types.actions.UploadVoiceAction
|
||||||
import dev.inmo.tgbotapi.types.boosts.ChatBoostSource
|
import dev.inmo.tgbotapi.types.boosts.ChatBoostSource
|
||||||
|
import dev.inmo.tgbotapi.types.business_connection.BusinessConnection
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackGameInlineKeyboardButton
|
||||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton
|
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton
|
||||||
@ -439,6 +440,7 @@ import dev.inmo.tgbotapi.types.request.ChatShared
|
|||||||
import dev.inmo.tgbotapi.types.request.ChatSharedRequest
|
import dev.inmo.tgbotapi.types.request.ChatSharedRequest
|
||||||
import dev.inmo.tgbotapi.types.request.RequestResponse
|
import dev.inmo.tgbotapi.types.request.RequestResponse
|
||||||
import dev.inmo.tgbotapi.types.request.UsersShared
|
import dev.inmo.tgbotapi.types.request.UsersShared
|
||||||
|
import dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
|
import dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.ChannelPostUpdate
|
import dev.inmo.tgbotapi.types.update.ChannelPostUpdate
|
||||||
import dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate
|
import dev.inmo.tgbotapi.types.update.ChatBoostRemovedUpdate
|
||||||
@ -1811,6 +1813,24 @@ public inline fun ChatBoostSource.unknownOrThrow(): ChatBoostSource.Unknown = th
|
|||||||
public inline fun <T> ChatBoostSource.ifUnknown(block: (ChatBoostSource.Unknown) -> T): T? =
|
public inline fun <T> ChatBoostSource.ifUnknown(block: (ChatBoostSource.Unknown) -> T): T? =
|
||||||
unknownOrNull() ?.let(block)
|
unknownOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun BusinessConnection.disabledOrNull(): BusinessConnection.Disabled? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled
|
||||||
|
|
||||||
|
public inline fun BusinessConnection.disabledOrThrow(): BusinessConnection.Disabled = this as
|
||||||
|
dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled
|
||||||
|
|
||||||
|
public inline fun <T> BusinessConnection.ifDisabled(block: (BusinessConnection.Disabled) -> T): T? =
|
||||||
|
disabledOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun BusinessConnection.enabledOrNull(): BusinessConnection.Enabled? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled
|
||||||
|
|
||||||
|
public inline fun BusinessConnection.enabledOrThrow(): BusinessConnection.Enabled = this as
|
||||||
|
dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled
|
||||||
|
|
||||||
|
public inline fun <T> BusinessConnection.ifEnabled(block: (BusinessConnection.Enabled) -> T): T? =
|
||||||
|
enabledOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrNull():
|
public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrNull():
|
||||||
UnknownInlineKeyboardButton? = this as?
|
UnknownInlineKeyboardButton? = this as?
|
||||||
dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton
|
dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton
|
||||||
@ -4881,6 +4901,15 @@ public inline fun RequestResponse.usersSharedOrThrow(): UsersShared = this as
|
|||||||
public inline fun <T> RequestResponse.ifUsersShared(block: (UsersShared) -> T): T? =
|
public inline fun <T> RequestResponse.ifUsersShared(block: (UsersShared) -> T): T? =
|
||||||
usersSharedOrNull() ?.let(block)
|
usersSharedOrNull() ?.let(block)
|
||||||
|
|
||||||
|
public inline fun Update.businessConnectionUpdateOrNull(): BusinessConnectionUpdate? = this as?
|
||||||
|
dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate
|
||||||
|
|
||||||
|
public inline fun Update.businessConnectionUpdateOrThrow(): BusinessConnectionUpdate = this as
|
||||||
|
dev.inmo.tgbotapi.types.update.BusinessConnectionUpdate
|
||||||
|
|
||||||
|
public inline fun <T> Update.ifBusinessConnectionUpdate(block: (BusinessConnectionUpdate) -> T): T?
|
||||||
|
= businessConnectionUpdateOrNull() ?.let(block)
|
||||||
|
|
||||||
public inline fun Update.callbackQueryUpdateOrNull(): CallbackQueryUpdate? = this as?
|
public inline fun Update.callbackQueryUpdateOrNull(): CallbackQueryUpdate? = this as?
|
||||||
dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
|
dev.inmo.tgbotapi.types.update.CallbackQueryUpdate
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ fun Update.sourceChatWithConverters(
|
|||||||
chatMessageReactionsCountUpdatedUpdateConverter: (ChatMessageReactionsCountUpdatedUpdate) -> Chat? = { it.data.chat },
|
chatMessageReactionsCountUpdatedUpdateConverter: (ChatMessageReactionsCountUpdatedUpdate) -> Chat? = { it.data.chat },
|
||||||
chatBoostUpdatedUpdateFlow: (ChatBoostUpdatedUpdate) -> Chat? = { it.data.chat },
|
chatBoostUpdatedUpdateFlow: (ChatBoostUpdatedUpdate) -> Chat? = { it.data.chat },
|
||||||
chatBoostRemovedUpdateFlow: (ChatBoostRemovedUpdate) -> Chat? = { it.data.chat },
|
chatBoostRemovedUpdateFlow: (ChatBoostRemovedUpdate) -> Chat? = { it.data.chat },
|
||||||
|
businessConnectionUpdateConverter: (BusinessConnectionUpdate) -> Chat? = { it.data.user },
|
||||||
commonChatMemberUpdatedUpdateConverter: (CommonChatMemberUpdatedUpdate) -> Chat? = { it.data.chat }
|
commonChatMemberUpdatedUpdateConverter: (CommonChatMemberUpdatedUpdate) -> Chat? = { it.data.chat }
|
||||||
): Chat? = when (this) {
|
): Chat? = when (this) {
|
||||||
is BaseMessageUpdate -> baseMessageUpdateConverter(this)
|
is BaseMessageUpdate -> baseMessageUpdateConverter(this)
|
||||||
@ -64,6 +65,7 @@ fun Update.sourceChatWithConverters(
|
|||||||
is ChatMessageReactionsCountUpdatedUpdate -> chatMessageReactionsCountUpdatedUpdateConverter(this)
|
is ChatMessageReactionsCountUpdatedUpdate -> chatMessageReactionsCountUpdatedUpdateConverter(this)
|
||||||
is ChatBoostUpdatedUpdate -> chatBoostUpdatedUpdateFlow(this)
|
is ChatBoostUpdatedUpdate -> chatBoostUpdatedUpdateFlow(this)
|
||||||
is ChatBoostRemovedUpdate -> chatBoostRemovedUpdateFlow(this)
|
is ChatBoostRemovedUpdate -> chatBoostRemovedUpdateFlow(this)
|
||||||
|
is BusinessConnectionUpdate -> businessConnectionUpdateConverter(this)
|
||||||
else -> {
|
else -> {
|
||||||
when (val data = data) {
|
when (val data = data) {
|
||||||
is FromUser -> data.from
|
is FromUser -> data.from
|
||||||
|
Loading…
Reference in New Issue
Block a user