DefaultBehaviourContext

class DefaultBehaviourContext(bot: TelegramBot, scope: CoroutineScope, broadcastChannelsSize: Int, onBufferOverflow: BufferOverflow, upstreamUpdatesFlow: Flow<Update>?, updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>?) : AbstractFlowsUpdatesFilter, RequestsExecutor, CoroutineScope, BehaviourContext

Functions

close
Link copied to clipboard
common
open override fun close()
copy
Link copied to clipboard
common
open override fun copy(bot: TelegramBot, scope: CoroutineScope, broadcastChannelsSize: Int, onBufferOverflow: BufferOverflow, upstreamUpdatesFlow: Flow<Update>?, updatesFilter: BehaviourContextAndTypeReceiver<Boolean, Update>?): BehaviourContext
execute
Link copied to clipboard
common
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

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

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

inlineQueriesFlow
Link copied to clipboard
common
open override val inlineQueriesFlow: Flow<InlineQueryUpdate>
messageMediaGroupsFlow
Link copied to clipboard
common
open override val messageMediaGroupsFlow: Flow<MessageMediaGroupUpdate>
messagesFlow
Link copied to clipboard
common
open override val messagesFlow: Flow<MessageUpdate>
myChatMemberUpdatesFlow
Link copied to clipboard
common
open override val myChatMemberUpdatesFlow: Flow<MyChatMemberUpdatedUpdate>
pollAnswersFlow
Link copied to clipboard
common
open override val pollAnswersFlow: Flow<PollAnswerUpdate>
pollsFlow
Link copied to clipboard
common
open override val pollsFlow: Flow<PollUpdate>
preCheckoutQueriesFlow
Link copied to clipboard
common
open override val preCheckoutQueriesFlow: Flow<PreCheckoutQueryUpdate>
scope
Link copied to clipboard
common
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.

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