1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

add MessageFilterForums

This commit is contained in:
InsanusMokrassar 2022-11-08 22:02:49 +06:00
parent f700fab33f
commit c4fdc350ce

View File

@ -0,0 +1,12 @@
package dev.inmo.tgbotapi.extensions.behaviour_builder.filters
import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.SimpleFilter
import dev.inmo.tgbotapi.types.message.abstracts.*
import dev.inmo.tgbotapi.utils.extensions.threadIdOrNull
/**
* Allow only messages which are not in some forum
*/
val MessageFilterForums = SimpleFilter<Message> {
it.threadIdOrNull == null
}