DefaultBehaviourContext

class DefaultBehaviourContext(    val bot: TelegramBot,     val scope: CoroutineScope,     broadcastChannelsSize: Int = 100,     onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,     upstreamUpdatesFlow: Flow<Update>? = null,     val triggersHolder: TriggersHolder = TriggersHolder(),     updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>? = null) : AbstractFlowsUpdatesFilter, RequestsExecutor, CoroutineScope, BehaviourContext

Constructors

Link copied to clipboard
fun DefaultBehaviourContext(    bot: TelegramBot,     scope: CoroutineScope,     broadcastChannelsSize: Int = 100,     onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND,     upstreamUpdatesFlow: Flow<Update>? = null,     triggersHolder: TriggersHolder = TriggersHolder(),     updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>? = null)

Functions

Link copied to clipboard
expect open override fun close()
Link copied to clipboard
open override fun copy(    bot: TelegramBot,     scope: CoroutineScope,     broadcastChannelsSize: Int,     onBufferOverflow: BufferOverflow,     upstreamUpdatesFlow: Flow<Update>?,     triggersHolder: TriggersHolder,     updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>?): DefaultBehaviourContext
Link copied to clipboard
open suspend override fun <T : Any> execute(request: Request<T>): T

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

Properties

Link copied to clipboard
open override val allowedUpdates: List<String>
Link copied to clipboard
open override val allUpdatesFlow: Flow<Update>
Link copied to clipboard
open override val allUpdatesWithoutMediaGroupsGroupingFlow: Flow<Update>
Link copied to clipboard
open override val asUpdateReceiver: UpdateReceiver<Update>
Link copied to clipboard
open override val bot: TelegramBot
Link copied to clipboard
open override val callbackQueriesFlow: Flow<CallbackQueryUpdate>
Link copied to clipboard
open override val channelPostMediaGroupsFlow: Flow<ChannelPostMediaGroupUpdate>
Link copied to clipboard
open override val channelPostsFlow: Flow<ChannelPostUpdate>
Link copied to clipboard
open override val chatJoinRequestUpdateFlow: Flow<ChatJoinRequestUpdate>
Link copied to clipboard
open override val chatMemberUpdatesFlow: Flow<CommonChatMemberUpdatedUpdate>
Link copied to clipboard
open override val chosenInlineResultsFlow: Flow<ChosenInlineResultUpdate>
Link copied to clipboard
open override val coroutineContext: CoroutineContext
Link copied to clipboard
open override val editedChannelPostMediaGroupsFlow: Flow<EditChannelPostMediaGroupUpdate>
Link copied to clipboard
open override val editedChannelPostsFlow: Flow<EditChannelPostUpdate>
Link copied to clipboard
open override val editedMessageMediaGroupsFlow: Flow<EditMessageMediaGroupUpdate>
Link copied to clipboard
open override val editedMessagesFlow: Flow<EditMessageUpdate>
Link copied to clipboard
open val flowsUpdatesFilter: FlowsUpdatesFilter

This parameter will be used to subscribe on different types of update

Link copied to clipboard
open override val inlineQueriesFlow: Flow<InlineQueryUpdate>
Link copied to clipboard
open override val messageMediaGroupsFlow: Flow<MessageMediaGroupUpdate>
Link copied to clipboard
open override val messagesFlow: Flow<MessageUpdate>
Link copied to clipboard
open override val myChatMemberUpdatesFlow: Flow<MyChatMemberUpdatedUpdate>
Link copied to clipboard
open override val pollAnswersFlow: Flow<PollAnswerUpdate>
Link copied to clipboard
open override val pollsFlow: Flow<PollUpdate>
Link copied to clipboard
open override val preCheckoutQueriesFlow: Flow<PreCheckoutQueryUpdate>
Link copied to clipboard
open override val scope: CoroutineScope

Will be used for creating of some subscriptions inside of methods, updates listening and different other things in context of working with CoroutineScope and coroutines.

Link copied to clipboard
open override val shippingQueriesFlow: Flow<ShippingQueryUpdate>
Link copied to clipboard
open override val triggersHolder: TriggersHolder
Link copied to clipboard
open override val unknownUpdatesFlow: Flow<UnknownUpdate>