Default Behaviour Context With FSM
class DefaultBehaviourContextWithFSM<T : State>(behaviourContext: BehaviourContext, statesManager: StatesManager<T>, handlers: List<BehaviourWithFSMStateHandlerHolder<*, T>>) : BehaviourContext, BehaviourContextWithFSM<T>
Content copied to clipboard
Default realization of BehaviourContextWithFSM. It uses behaviourContext as a base for this object as BehaviourContext, but managing substates contexts updates for avoiding of updates lost between states
Constructors
Link copied to clipboard
fun <T : State> DefaultBehaviourContextWithFSM(behaviourContext: BehaviourContext, statesManager: StatesManager<T>, handlers: List<BehaviourWithFSMStateHandlerHolder<*, T>>)
Content copied to clipboard
Functions
Link copied to clipboard
open override fun copy(bot: TelegramBot, scope: CoroutineScope, broadcastChannelsSize: Int, onBufferOverflow: BufferOverflow, upstreamUpdatesFlow: Flow<Update>?, updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>?): BehaviourContextWithFSM<T>
Content copied to clipboard
Link copied to clipboard
Unsafe execution of incoming request. Can throw almost any exception. So, it is better to use something like dev.inmo.tgbotapi.extensions.utils.shortcuts.executeAsync or dev.inmo.tgbotapi.extensions.utils.shortcuts.executeUnsafe
Link copied to clipboard
Link copied to clipboard
open suspend fun launchStateHandling(state: T, handlers: List<CheckableHandlerHolder<in T, T>>): T?
Content copied to clipboard
open suspend fun launchStateHandling(state: T, contextUpdatesFlow: Flow<Update>, handlers: List<BehaviourWithFSMStateHandlerHolder<*, T>>): T?
Content copied to clipboard
Link copied to clipboard
Properties
Link copied to clipboard
open override val channelPostMediaGroupsFlow: Flow<ChannelPostMediaGroupUpdate>
Content copied to clipboard
Link copied to clipboard
open override val chatMemberUpdatesFlow: Flow<CommonChatMemberUpdatedUpdate>
Content copied to clipboard
Link copied to clipboard
open override val chosenInlineResultsFlow: Flow<ChosenInlineResultUpdate>
Content copied to clipboard
Link copied to clipboard
open override val editedChannelPostMediaGroupsFlow: Flow<EditChannelPostMediaGroupUpdate>
Content copied to clipboard
Link copied to clipboard
open override val editedMessageMediaGroupsFlow: Flow<EditMessageMediaGroupUpdate>
Content copied to clipboard
Link copied to clipboard
open override val myChatMemberUpdatesFlow: Flow<MyChatMemberUpdatedUpdate>
Content copied to clipboard