commandWithNamedArgs

fun <BC : BehaviourContext> BC.commandWithNamedArgs(commandRegex: Regex, initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat, markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null, argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex, excludeCommandsToOtherBots: Boolean = true, scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>): Job
fun <BC : BehaviourContext> BC.commandWithNamedArgs(command: String, initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat, markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null, argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex, excludeCommandsToOtherBots: Boolean = true, scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>): Job
fun <BC : BehaviourContext> BC.commandWithNamedArgs(botCommand: BotCommand, initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat, markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory, additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, Update, TextMessage>? = null, argsSeparator: Regex = TelegramBotCommandsDefaults.defaultArgsSeparatorRegex, nameArgSeparator: Regex = TelegramBotCommandsDefaults.defaultNamesArgsSeparatorRegex, excludeCommandsToOtherBots: Boolean = true, scenarioReceiver: CustomBehaviourContextAndTwoTypesReceiver<BC, Unit, TextMessage, List<Pair<String, String>>>): Job

Parameters

markerFactory

Pass null to handle requests fully parallel. Will be used to identify different "stream". scenarioReceiver will be called synchronously in one "stream". Output of markerFactory will be used as a key for "stream"