mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-12-22 14:07:14 +00:00
change check of yes/no in checking of messages
This commit is contained in:
parent
7abb6efba3
commit
fe96101631
@ -24,6 +24,8 @@ import dev.inmo.tgbotapi.extensions.api.forwardMessage
|
|||||||
import dev.inmo.tgbotapi.extensions.api.send.send
|
import dev.inmo.tgbotapi.extensions.api.send.send
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitMessageDataCallbackQuery
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitMessageDataCallbackQuery
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.oneOf
|
||||||
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.parallel
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.triggers_handling.onCommand
|
||||||
import dev.inmo.tgbotapi.extensions.utils.extensions.sameMessage
|
import dev.inmo.tgbotapi.extensions.utils.extensions.sameMessage
|
||||||
import dev.inmo.tgbotapi.extensions.utils.types.buttons.dataButton
|
import dev.inmo.tgbotapi.extensions.utils.types.buttons.dataButton
|
||||||
@ -150,9 +152,18 @@ object Plugin : Plugin {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val answer = waitMessageDataCallbackQuery().filter {
|
val answer = oneOf(
|
||||||
it.message.sameMessage(message)
|
parallel {
|
||||||
|
waitMessageDataCallbackQuery().filter {
|
||||||
|
it.data == yesData
|
||||||
}.first()
|
}.first()
|
||||||
|
},
|
||||||
|
parallel {
|
||||||
|
waitMessageDataCallbackQuery().filter {
|
||||||
|
it.data == noData
|
||||||
|
}.first()
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
if (answer.data == yesData) {
|
if (answer.data == yesData) {
|
||||||
if (recheckActor.trySend(Unit).isSuccess) {
|
if (recheckActor.trySend(Unit).isSuccess) {
|
||||||
|
Loading…
Reference in New Issue
Block a user