commonMain.dev.inmo.tgbotapi.extensions.utils.shortcuts.BusinessMessagesMappers.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tgbotapi.utils Show documentation
Show all versions of tgbotapi.utils Show documentation
Additional extensions for core part of tgbotapi
package dev.inmo.tgbotapi.extensions.utils.shortcuts
import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage
import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
import dev.inmo.tgbotapi.types.message.content.MessageContent
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filterIsInstance
inline fun Flow.businessMessages() = filterIsInstance>()
inline fun Flow>.businessMessagesWithType() = filterIsInstance>()
inline fun Flow>.allBusinessMessages() = businessMessagesWithType()