1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-25 19:48:43 +00:00

change flowsUpdatesFilter signature

This commit is contained in:
InsanusMokrassar 2020-05-15 18:31:49 +06:00
parent e856dc4754
commit 735ed9fd86

View File

@ -4,20 +4,12 @@ import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.FlowsUpdatesFi
/**
* Non-suspendable function for easy-to-use creating of [FlowsUpdatesFilter] and applying the block to it
*/
fun flowsUpdatesFilter(
internalChannelsSizes: Int = 64,
block: FlowsUpdatesFilter.() -> Unit
): FlowsUpdatesFilter = FlowsUpdatesFilter(internalChannelsSizes).apply(block)
/**
* Suspend variation for [flowsUpdatesFilter] function
*
* @see flowsUpdatesFilter
*/
suspend fun flowsUpdatesFilter(
inline fun flowsUpdatesFilter(
internalChannelsSizes: Int = 64,
block: suspend FlowsUpdatesFilter.() -> Unit
block: FlowsUpdatesFilter.() -> Unit
): FlowsUpdatesFilter {
val filter = FlowsUpdatesFilter(internalChannelsSizes)
filter.block()