mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
add MessageFilterForums
This commit is contained in:
parent
f700fab33f
commit
c4fdc350ce
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user