mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
deprecate old API in Behaviour Builder
This commit is contained in:
parent
5f01e26377
commit
94ad758814
@ -16,6 +16,7 @@
|
|||||||
* All triggers have been changed to use two filters: filter for in subcontext data and filter for incoming data
|
* All triggers have been changed to use two filters: filter for in subcontext data and filter for incoming data
|
||||||
* New waiters for edited content
|
* New waiters for edited content
|
||||||
* New extension `BehaviourContext#followLocation`
|
* New extension `BehaviourContext#followLocation`
|
||||||
|
* Old API for triggers with the flags like `includeFilterByChatInBehaviourSubContext` have been deprecated
|
||||||
|
|
||||||
## 0.35.8
|
## 0.35.8
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ internal suspend inline fun <reified T : CallbackQuery> BehaviourContext.onCallb
|
|||||||
(it.asCallbackQueryUpdate() ?.data as? T) ?.let(::listOfNotNull)
|
(it.asCallbackQueryUpdate() ?.data as? T) ?.let(::listOfNotNull)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onDataCallbackQuery(
|
suspend fun BehaviourContext.onDataCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<DataCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<DataCallbackQuery>? = null,
|
||||||
@ -32,6 +32,7 @@ suspend fun BehaviourContext.onDataCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onGameShortNameCallbackQuery(
|
suspend fun BehaviourContext.onGameShortNameCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<GameShortNameCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<GameShortNameCallbackQuery>? = null,
|
||||||
@ -43,6 +44,7 @@ suspend fun BehaviourContext.onGameShortNameCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onInlineMessageIdCallbackQuery(
|
suspend fun BehaviourContext.onInlineMessageIdCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<InlineMessageIdCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<InlineMessageIdCallbackQuery>? = null,
|
||||||
@ -54,6 +56,7 @@ suspend fun BehaviourContext.onInlineMessageIdCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onInlineMessageIdDataCallbackQuery(
|
suspend fun BehaviourContext.onInlineMessageIdDataCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<InlineMessageIdDataCallbackQuery>? = null,
|
||||||
@ -65,6 +68,7 @@ suspend fun BehaviourContext.onInlineMessageIdDataCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onInlineMessageIdGameShortNameCallbackQuery(
|
suspend fun BehaviourContext.onInlineMessageIdGameShortNameCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<InlineMessageIdGameShortNameCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<InlineMessageIdGameShortNameCallbackQuery>? = null,
|
||||||
@ -76,6 +80,7 @@ suspend fun BehaviourContext.onInlineMessageIdGameShortNameCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMessageCallbackQuery(
|
suspend fun BehaviourContext.onMessageCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<MessageCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<MessageCallbackQuery>? = null,
|
||||||
@ -87,6 +92,7 @@ suspend fun BehaviourContext.onMessageCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMessageDataCallbackQuery(
|
suspend fun BehaviourContext.onMessageDataCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<MessageDataCallbackQuery>? = null,
|
||||||
@ -98,6 +104,7 @@ suspend fun BehaviourContext.onMessageDataCallbackQuery(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMessageGameShortNameCallbackQuery(
|
suspend fun BehaviourContext.onMessageGameShortNameCallbackQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<MessageGameShortNameCallbackQuery>? = null,
|
additionalFilter: SimpleFilter<MessageGameShortNameCallbackQuery>? = null,
|
||||||
|
@ -22,6 +22,7 @@ internal suspend inline fun <reified U : ChatMemberUpdatedUpdate> BehaviourConte
|
|||||||
((it as? U) ?.data) ?.let(::listOfNotNull)
|
((it as? U) ?.data) ?.let(::listOfNotNull)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onChatMemberUpdated(
|
suspend fun BehaviourContext.onChatMemberUpdated(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
additionalFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||||
@ -34,6 +35,7 @@ suspend fun BehaviourContext.onChatMemberUpdated(
|
|||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onCommonChatMemberUpdated(
|
suspend fun BehaviourContext.onCommonChatMemberUpdated(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
additionalFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||||
@ -46,6 +48,7 @@ suspend fun BehaviourContext.onCommonChatMemberUpdated(
|
|||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMyChatMemberUpdated(
|
suspend fun BehaviourContext.onMyChatMemberUpdated(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
additionalFilter: SimpleFilter<ChatMemberUpdated>? = null,
|
||||||
|
@ -15,6 +15,7 @@ import dev.inmo.tgbotapi.types.message.content.TextContent
|
|||||||
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.command(
|
suspend fun BehaviourContext.command(
|
||||||
commandRegex: Regex,
|
commandRegex: Regex,
|
||||||
requireOnlyCommandInMessage: Boolean = true,
|
requireOnlyCommandInMessage: Boolean = true,
|
||||||
@ -42,6 +43,7 @@ suspend fun BehaviourContext.command(
|
|||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.command(
|
suspend fun BehaviourContext.command(
|
||||||
command: String,
|
command: String,
|
||||||
requireOnlyCommandInMessage: Boolean = true,
|
requireOnlyCommandInMessage: Boolean = true,
|
||||||
@ -51,6 +53,7 @@ suspend fun BehaviourContext.command(
|
|||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, CommonMessage<TextContent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, CommonMessage<TextContent>>
|
||||||
) = command(command.toRegex(), requireOnlyCommandInMessage, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
) = command(command.toRegex(), requireOnlyCommandInMessage, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend inline fun BehaviourContext.onCommand(
|
suspend inline fun BehaviourContext.onCommand(
|
||||||
commandRegex: Regex,
|
commandRegex: Regex,
|
||||||
requireOnlyCommandInMessage: Boolean = true,
|
requireOnlyCommandInMessage: Boolean = true,
|
||||||
@ -60,6 +63,7 @@ suspend inline fun BehaviourContext.onCommand(
|
|||||||
noinline scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, CommonMessage<TextContent>>
|
noinline scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, CommonMessage<TextContent>>
|
||||||
): Job = command(commandRegex, requireOnlyCommandInMessage, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
): Job = command(commandRegex, requireOnlyCommandInMessage, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend inline fun BehaviourContext.onCommand(
|
suspend inline fun BehaviourContext.onCommand(
|
||||||
command: String,
|
command: String,
|
||||||
requireOnlyCommandInMessage: Boolean = true,
|
requireOnlyCommandInMessage: Boolean = true,
|
||||||
@ -69,6 +73,7 @@ suspend inline fun BehaviourContext.onCommand(
|
|||||||
noinline scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, CommonMessage<TextContent>>
|
noinline scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, CommonMessage<TextContent>>
|
||||||
): Job = onCommand(command.toRegex(), requireOnlyCommandInMessage, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
): Job = onCommand(command.toRegex(), requireOnlyCommandInMessage, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.commandWithArgs(
|
suspend fun BehaviourContext.commandWithArgs(
|
||||||
commandRegex: Regex,
|
commandRegex: Regex,
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
@ -89,6 +94,7 @@ suspend fun BehaviourContext.commandWithArgs(
|
|||||||
scenarioReceiver(it, args)
|
scenarioReceiver(it, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.commandWithArgs(
|
suspend fun BehaviourContext.commandWithArgs(
|
||||||
command: String,
|
command: String,
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
@ -103,6 +109,7 @@ suspend fun BehaviourContext.commandWithArgs(
|
|||||||
scenarioReceiver = scenarioReceiver
|
scenarioReceiver = scenarioReceiver
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend inline fun BehaviourContext.onCommandWithArgs(
|
suspend inline fun BehaviourContext.onCommandWithArgs(
|
||||||
commandRegex: Regex,
|
commandRegex: Regex,
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
@ -111,6 +118,7 @@ suspend inline fun BehaviourContext.onCommandWithArgs(
|
|||||||
noinline scenarioReceiver: BehaviourContextAndTwoTypesReceiver<Unit, CommonMessage<TextContent>, Array<String>>
|
noinline scenarioReceiver: BehaviourContextAndTwoTypesReceiver<Unit, CommonMessage<TextContent>, Array<String>>
|
||||||
): Job = commandWithArgs(commandRegex, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
): Job = commandWithArgs(commandRegex, includeFilterByChatInBehaviourSubContext, additionalFilter, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend inline fun BehaviourContext.onCommandWithArgs(
|
suspend inline fun BehaviourContext.onCommandWithArgs(
|
||||||
command: String,
|
command: String,
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
|
@ -37,6 +37,7 @@ internal suspend inline fun <reified T : MessageContent> BehaviourContext.onCont
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onContentMessage(
|
suspend fun BehaviourContext.onContentMessage(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<MessageContent>? = null,
|
additionalFilter: CommonMessageFilter<MessageContent>? = null,
|
||||||
@ -49,6 +50,7 @@ suspend fun BehaviourContext.onContentMessage(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onContact(
|
suspend fun BehaviourContext.onContact(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<ContactContent>? = null,
|
additionalFilter: CommonMessageFilter<ContactContent>? = null,
|
||||||
@ -60,6 +62,7 @@ suspend fun BehaviourContext.onContact(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onDice(
|
suspend fun BehaviourContext.onDice(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<DiceContent>? = null,
|
additionalFilter: CommonMessageFilter<DiceContent>? = null,
|
||||||
@ -71,6 +74,7 @@ suspend fun BehaviourContext.onDice(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onGame(
|
suspend fun BehaviourContext.onGame(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<GameContent>? = null,
|
additionalFilter: CommonMessageFilter<GameContent>? = null,
|
||||||
@ -82,6 +86,7 @@ suspend fun BehaviourContext.onGame(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onLocation(
|
suspend fun BehaviourContext.onLocation(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<LocationContent>? = null,
|
additionalFilter: CommonMessageFilter<LocationContent>? = null,
|
||||||
@ -93,6 +98,7 @@ suspend fun BehaviourContext.onLocation(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onPoll(
|
suspend fun BehaviourContext.onPoll(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<PollContent>? = null,
|
additionalFilter: CommonMessageFilter<PollContent>? = null,
|
||||||
@ -104,6 +110,7 @@ suspend fun BehaviourContext.onPoll(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onText(
|
suspend fun BehaviourContext.onText(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<TextContent>? = null,
|
additionalFilter: CommonMessageFilter<TextContent>? = null,
|
||||||
@ -115,6 +122,7 @@ suspend fun BehaviourContext.onText(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVenue(
|
suspend fun BehaviourContext.onVenue(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<VenueContent>? = null,
|
additionalFilter: CommonMessageFilter<VenueContent>? = null,
|
||||||
@ -126,6 +134,7 @@ suspend fun BehaviourContext.onVenue(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onAudioMediaGroup(
|
suspend fun BehaviourContext.onAudioMediaGroup(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<AudioMediaGroupContent>? = null,
|
additionalFilter: CommonMessageFilter<AudioMediaGroupContent>? = null,
|
||||||
@ -137,6 +146,7 @@ suspend fun BehaviourContext.onAudioMediaGroup(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onDocumentMediaGroupContent(
|
suspend fun BehaviourContext.onDocumentMediaGroupContent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = true,
|
includeMediaGroups: Boolean = true,
|
||||||
@ -149,6 +159,7 @@ suspend fun BehaviourContext.onDocumentMediaGroupContent(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMediaCollection(
|
suspend fun BehaviourContext.onMediaCollection(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = false,
|
includeMediaGroups: Boolean = false,
|
||||||
@ -161,6 +172,7 @@ suspend fun BehaviourContext.onMediaCollection(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMedia(
|
suspend fun BehaviourContext.onMedia(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = true,
|
includeMediaGroups: Boolean = true,
|
||||||
@ -173,6 +185,7 @@ suspend fun BehaviourContext.onMedia(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onAnimation(
|
suspend fun BehaviourContext.onAnimation(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<AnimationContent>? = null,
|
additionalFilter: CommonMessageFilter<AnimationContent>? = null,
|
||||||
@ -184,6 +197,7 @@ suspend fun BehaviourContext.onAnimation(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onAudio(
|
suspend fun BehaviourContext.onAudio(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = false,
|
includeMediaGroups: Boolean = false,
|
||||||
@ -196,6 +210,7 @@ suspend fun BehaviourContext.onAudio(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onDocument(
|
suspend fun BehaviourContext.onDocument(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = false,
|
includeMediaGroups: Boolean = false,
|
||||||
@ -208,6 +223,7 @@ suspend fun BehaviourContext.onDocument(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onPhoto(
|
suspend fun BehaviourContext.onPhoto(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = false,
|
includeMediaGroups: Boolean = false,
|
||||||
@ -220,6 +236,7 @@ suspend fun BehaviourContext.onPhoto(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onSticker(
|
suspend fun BehaviourContext.onSticker(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<StickerContent>? = null,
|
additionalFilter: CommonMessageFilter<StickerContent>? = null,
|
||||||
@ -231,6 +248,7 @@ suspend fun BehaviourContext.onSticker(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVideo(
|
suspend fun BehaviourContext.onVideo(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
includeMediaGroups: Boolean = false,
|
includeMediaGroups: Boolean = false,
|
||||||
@ -243,6 +261,7 @@ suspend fun BehaviourContext.onVideo(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVideoNote(
|
suspend fun BehaviourContext.onVideoNote(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<VideoNoteContent>? = null,
|
additionalFilter: CommonMessageFilter<VideoNoteContent>? = null,
|
||||||
@ -254,6 +273,7 @@ suspend fun BehaviourContext.onVideoNote(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVoice(
|
suspend fun BehaviourContext.onVoice(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<VoiceContent>? = null,
|
additionalFilter: CommonMessageFilter<VoiceContent>? = null,
|
||||||
@ -265,6 +285,7 @@ suspend fun BehaviourContext.onVoice(
|
|||||||
markerFactory,
|
markerFactory,
|
||||||
scenarioReceiver
|
scenarioReceiver
|
||||||
)
|
)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onInvoice(
|
suspend fun BehaviourContext.onInvoice(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: CommonMessageFilter<InvoiceContent>? = null,
|
additionalFilter: CommonMessageFilter<InvoiceContent>? = null,
|
||||||
|
@ -24,60 +24,70 @@ internal suspend inline fun <reified T : ChatEvent> BehaviourContext.onEvent(
|
|||||||
(it.asBaseSentMessageUpdate() ?.data ?.asChatEventMessage() ?.takeIf { it.chatEvent is T } as? ChatEventMessage<T>) ?.let(::listOfNotNull)
|
(it.asBaseSentMessageUpdate() ?.data ?.asChatEventMessage() ?.takeIf { it.chatEvent is T } as? ChatEventMessage<T>) ?.let(::listOfNotNull)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onChannelEvent(
|
suspend fun BehaviourContext.onChannelEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<ChannelEvent>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<ChannelEvent>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<ChannelEvent>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<ChannelEvent>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ChannelEvent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ChannelEvent>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onChatEvent(
|
suspend fun BehaviourContext.onChatEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<ChatEvent>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<ChatEvent>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<ChatEvent>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<ChatEvent>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ChatEvent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ChatEvent>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVoiceChatEvent(
|
suspend fun BehaviourContext.onVoiceChatEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatEvent>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatEvent>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatEvent>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatEvent>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatEvent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatEvent>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVoiceChatStartedEvent(
|
suspend fun BehaviourContext.onVoiceChatStartedEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatStarted>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatStarted>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatStarted>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatStarted>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatStarted>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatStarted>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVoiceChatEndedEvent(
|
suspend fun BehaviourContext.onVoiceChatEndedEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatEnded>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatEnded>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatEnded>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatEnded>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatEnded>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatEnded>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVoiceChatParticipantsInvitedEvent(
|
suspend fun BehaviourContext.onVoiceChatParticipantsInvitedEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatParticipantsInvited>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<VoiceChatParticipantsInvited>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatParticipantsInvited>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<VoiceChatParticipantsInvited>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatParticipantsInvited>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<VoiceChatParticipantsInvited>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMessageAutoDeleteTimerChangedEvent(
|
suspend fun BehaviourContext.onMessageAutoDeleteTimerChangedEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<MessageAutoDeleteTimerChanged>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<MessageAutoDeleteTimerChanged>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<MessageAutoDeleteTimerChanged>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<MessageAutoDeleteTimerChanged>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<MessageAutoDeleteTimerChanged>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<MessageAutoDeleteTimerChanged>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onCommonEvent(
|
suspend fun BehaviourContext.onCommonEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<CommonEvent>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<CommonEvent>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<CommonEvent>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<CommonEvent>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<CommonEvent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<CommonEvent>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onGroupEvent(
|
suspend fun BehaviourContext.onGroupEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<GroupEvent>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<GroupEvent>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<GroupEvent>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<GroupEvent>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<GroupEvent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<GroupEvent>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onSupergroupEvent(
|
suspend fun BehaviourContext.onSupergroupEvent(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<SupergroupEvent>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<SupergroupEvent>>? = null,
|
||||||
@ -85,60 +95,70 @@ suspend fun BehaviourContext.onSupergroupEvent(
|
|||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<SupergroupEvent>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<SupergroupEvent>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onChannelChatCreated(
|
suspend fun BehaviourContext.onChannelChatCreated(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<ChannelChatCreated>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<ChannelChatCreated>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<ChannelChatCreated>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<ChannelChatCreated>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ChannelChatCreated>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ChannelChatCreated>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onDeleteChatPhoto(
|
suspend fun BehaviourContext.onDeleteChatPhoto(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<DeleteChatPhoto>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<DeleteChatPhoto>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<DeleteChatPhoto>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<DeleteChatPhoto>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<DeleteChatPhoto>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<DeleteChatPhoto>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onGroupChatCreated(
|
suspend fun BehaviourContext.onGroupChatCreated(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<GroupChatCreated>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<GroupChatCreated>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<GroupChatCreated>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<GroupChatCreated>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<GroupChatCreated>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<GroupChatCreated>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onLeftChatMember(
|
suspend fun BehaviourContext.onLeftChatMember(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<LeftChatMember>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<LeftChatMember>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<LeftChatMember>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<LeftChatMember>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<LeftChatMember>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<LeftChatMember>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onNewChatMembers(
|
suspend fun BehaviourContext.onNewChatMembers(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<NewChatMembers>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<NewChatMembers>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<NewChatMembers>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<NewChatMembers>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<NewChatMembers>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<NewChatMembers>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onNewChatPhoto(
|
suspend fun BehaviourContext.onNewChatPhoto(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<NewChatPhoto>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<NewChatPhoto>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<NewChatPhoto>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<NewChatPhoto>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<NewChatPhoto>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<NewChatPhoto>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onNewChatTitle(
|
suspend fun BehaviourContext.onNewChatTitle(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<NewChatTitle>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<NewChatTitle>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<NewChatTitle>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<NewChatTitle>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<NewChatTitle>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<NewChatTitle>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onPinnedMessage(
|
suspend fun BehaviourContext.onPinnedMessage(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<PinnedMessage>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<PinnedMessage>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<PinnedMessage>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<PinnedMessage>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<PinnedMessage>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<PinnedMessage>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onProximityAlertTriggered(
|
suspend fun BehaviourContext.onProximityAlertTriggered(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<ProximityAlertTriggered>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<ProximityAlertTriggered>>? = null,
|
||||||
markerFactory: MarkerFactory<in ChatEventMessage<ProximityAlertTriggered>, Any> = ByChatMessageMarkerFactory,
|
markerFactory: MarkerFactory<in ChatEventMessage<ProximityAlertTriggered>, Any> = ByChatMessageMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ProximityAlertTriggered>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, ChatEventMessage<ProximityAlertTriggered>>
|
||||||
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onEvent(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessageFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onSupergroupChatCreated(
|
suspend fun BehaviourContext.onSupergroupChatCreated(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<ChatEventMessage<SupergroupChatCreated>>? = null,
|
additionalFilter: SimpleFilter<ChatEventMessage<SupergroupChatCreated>>? = null,
|
||||||
|
@ -19,6 +19,7 @@ internal suspend inline fun <reified T : InlineQuery> BehaviourContext.onInlineQ
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onAnyInlineQuery(
|
suspend fun BehaviourContext.onAnyInlineQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<InlineQuery>? = null,
|
additionalFilter: SimpleFilter<InlineQuery>? = null,
|
||||||
@ -26,6 +27,7 @@ suspend fun BehaviourContext.onAnyInlineQuery(
|
|||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, InlineQuery>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, InlineQuery>
|
||||||
) = onInlineQuery(additionalFilter, if (includeFilterByChatInBehaviourSubContext) InlineQueryFilterByUser else null, markerFactory, scenarioReceiver)
|
) = onInlineQuery(additionalFilter, if (includeFilterByChatInBehaviourSubContext) InlineQueryFilterByUser else null, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onBaseInlineQuery(
|
suspend fun BehaviourContext.onBaseInlineQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<BaseInlineQuery>? = null,
|
additionalFilter: SimpleFilter<BaseInlineQuery>? = null,
|
||||||
@ -33,6 +35,7 @@ suspend fun BehaviourContext.onBaseInlineQuery(
|
|||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, BaseInlineQuery>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, BaseInlineQuery>
|
||||||
) = onInlineQuery(additionalFilter, if (includeFilterByChatInBehaviourSubContext) InlineQueryFilterByUser else null, markerFactory, scenarioReceiver)
|
) = onInlineQuery(additionalFilter, if (includeFilterByChatInBehaviourSubContext) InlineQueryFilterByUser else null, markerFactory, scenarioReceiver)
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onLocationInlineQuery(
|
suspend fun BehaviourContext.onLocationInlineQuery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<LocationInlineQuery>? = null,
|
additionalFilter: SimpleFilter<LocationInlineQuery>? = null,
|
||||||
|
@ -7,6 +7,9 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
|
|||||||
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.update.abstracts.Update
|
import dev.inmo.tgbotapi.types.update.abstracts.Update
|
||||||
|
|
||||||
|
internal const val OldAPITriggersDeprecationText = "This signature of method has been deprecated. Use signature with the" +
|
||||||
|
" same name and subcontextUpdatesFilter/initialFilter instead"
|
||||||
|
|
||||||
internal suspend inline fun <reified T> BehaviourContext.on(
|
internal suspend inline fun <reified T> BehaviourContext.on(
|
||||||
markerFactory: MarkerFactory<in T, Any>,
|
markerFactory: MarkerFactory<in T, Any>,
|
||||||
noinline initialFilter: SimpleFilter<T>? = null,
|
noinline initialFilter: SimpleFilter<T>? = null,
|
||||||
|
@ -25,42 +25,49 @@ internal suspend inline fun <reified T : MediaGroupContent> BehaviourContext.bui
|
|||||||
(it.asSentMediaGroupUpdate() ?.data ?.takeIf { it.all { it is T } } as? List<MediaGroupMessage<T>>) ?.let(::listOfNotNull)
|
(it.asSentMediaGroupUpdate() ?.data ?.takeIf { it.all { it is T } } as? List<MediaGroupMessage<T>>) ?.let(::listOfNotNull)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onMediaGroup(
|
suspend fun BehaviourContext.onMediaGroup(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<MediaGroupContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<MediaGroupContent>>>? = null,
|
||||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<MediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
markerFactory: MarkerFactory<in List<MediaGroupMessage<MediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<MediaGroupContent>>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<MediaGroupContent>>>
|
||||||
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onPlaylist(
|
suspend fun BehaviourContext.onPlaylist(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<AudioMediaGroupContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<AudioMediaGroupContent>>>? = null,
|
||||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<AudioMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
markerFactory: MarkerFactory<in List<MediaGroupMessage<AudioMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<AudioMediaGroupContent>>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<AudioMediaGroupContent>>>
|
||||||
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onDocumentsGroup(
|
suspend fun BehaviourContext.onDocumentsGroup(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<DocumentMediaGroupContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<DocumentMediaGroupContent>>>? = null,
|
||||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<DocumentMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
markerFactory: MarkerFactory<in List<MediaGroupMessage<DocumentMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<DocumentMediaGroupContent>>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<DocumentMediaGroupContent>>>
|
||||||
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVisualGallery(
|
suspend fun BehaviourContext.onVisualGallery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<VisualMediaGroupContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<VisualMediaGroupContent>>>? = null,
|
||||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<VisualMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
markerFactory: MarkerFactory<in List<MediaGroupMessage<VisualMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<VisualMediaGroupContent>>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<VisualMediaGroupContent>>>
|
||||||
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVisualMediaGroup(
|
suspend fun BehaviourContext.onVisualMediaGroup(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<VisualMediaGroupContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<VisualMediaGroupContent>>>? = null,
|
||||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<VisualMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
markerFactory: MarkerFactory<in List<MediaGroupMessage<VisualMediaGroupContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<VisualMediaGroupContent>>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<VisualMediaGroupContent>>>
|
||||||
) = onVisualGallery(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
) = onVisualGallery(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onPhotoGallery(
|
suspend fun BehaviourContext.onPhotoGallery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<PhotoContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<PhotoContent>>>? = null,
|
||||||
markerFactory: MarkerFactory<in List<MediaGroupMessage<PhotoContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
markerFactory: MarkerFactory<in List<MediaGroupMessage<PhotoContent>>, Any> = ByChatMediaGroupMarkerFactory,
|
||||||
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<PhotoContent>>>
|
scenarioReceiver: BehaviourContextAndTypeReceiver<Unit, List<MediaGroupMessage<PhotoContent>>>
|
||||||
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
) = buildMediaGroupTrigger(additionalFilter, if (includeFilterByChatInBehaviourSubContext) MessagesFilterByChat else null, markerFactory, scenarioReceiver)
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onVideoGallery(
|
suspend fun BehaviourContext.onVideoGallery(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<List<MediaGroupMessage<VideoContent>>>? = null,
|
additionalFilter: SimpleFilter<List<MediaGroupMessage<VideoContent>>>? = null,
|
||||||
|
@ -20,6 +20,7 @@ internal suspend inline fun <reified T : EncryptedPassportElement> BehaviourCont
|
|||||||
(it.asMessageUpdate() ?.data ?.asPassportMessage() ?.takeIf { it.passportData.data.any { it is T } }) ?.let(::listOfNotNull)
|
(it.asMessageUpdate() ?.data ?.asPassportMessage() ?.takeIf { it.passportData.data.any { it is T } }) ?.let(::listOfNotNull)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(OldAPITriggersDeprecationText)
|
||||||
suspend fun BehaviourContext.onPassportMessage(
|
suspend fun BehaviourContext.onPassportMessage(
|
||||||
includeFilterByChatInBehaviourSubContext: Boolean,
|
includeFilterByChatInBehaviourSubContext: Boolean,
|
||||||
additionalFilter: SimpleFilter<PassportMessage>? = null,
|
additionalFilter: SimpleFilter<PassportMessage>? = null,
|
||||||
|
Loading…
Reference in New Issue
Block a user