mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-01 07:25:23 +00:00
18 lines
489 B
Kotlin
18 lines
489 B
Kotlin
package dev.inmo.tgbotapi.extensions.utils.updates
|
|
|
|
import dev.inmo.tgbotapi.updateshandlers.FlowsUpdatesFilter
|
|
|
|
/**
|
|
* Non-suspendable function for easy-to-use creating of [FlowsUpdatesFilter] and applying the block to it
|
|
*
|
|
* @see flowsUpdatesFilter
|
|
*/
|
|
inline fun flowsUpdatesFilter(
|
|
internalChannelsSizes: Int = 100,
|
|
block: FlowsUpdatesFilter.() -> Unit
|
|
): FlowsUpdatesFilter {
|
|
val filter = FlowsUpdatesFilter(internalChannelsSizes)
|
|
filter.block()
|
|
return filter
|
|
}
|