command

suspend fun <BC : BehaviourContext> BC.command(commandRegex: Regex, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat, markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>): Job


suspend fun <BC : BehaviourContext> BC.command(command: String, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat, markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>): Job
suspend fun <BC : BehaviourContext> BC.command(botCommand: BotCommand, requireOnlyCommandInMessage: Boolean = true, initialFilter: CommonMessageFilter<TextContent>? = CommonMessageFilterExcludeMediaGroups, subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver<BC, Boolean, TextMessage, Update>? = MessageFilterByChat, markerFactory: MarkerFactory<in TextMessage, Any>? = ByChatMessageMarkerFactory, scenarioReceiver: CustomBehaviourContextAndTypeReceiver<BC, Unit, TextMessage>): 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"