commonMain.dev.inmo.tgbotapi.extensions.utils.updates.BaseMessagesUpdatesConversations.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tgbotapi.utils-jvm Show documentation
Show all versions of tgbotapi.utils-jvm Show documentation
Additional extensions for core part of tgbotapi
package dev.inmo.tgbotapi.extensions.utils.updates
import dev.inmo.tgbotapi.types.update.abstracts.*
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filterIsInstance
fun Flow.onlyBaseMessageUpdates(): Flow = filterIsInstance()
/**
* Converts flow to [Flow] of [BaseSentMessageUpdate]
*/
fun Flow.onlySentMessageUpdates(): Flow = filterIsInstance()
/**
* Converts flow to [Flow] of [BaseSentMessageUpdate]
*/
fun Flow.onlyEditMessageUpdates(): Flow = filterIsInstance()