mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-12-22 05:57:13 +00:00
add support of inline messages with data callback query in common posts gc
This commit is contained in:
parent
fe96101631
commit
eef2bfce14
@ -23,6 +23,7 @@ import dev.inmo.tgbotapi.extensions.api.edit.edit
|
||||
import dev.inmo.tgbotapi.extensions.api.forwardMessage
|
||||
import dev.inmo.tgbotapi.extensions.api.send.send
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitInlineMessageIdDataCallbackQuery
|
||||
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
|
||||
@ -155,14 +156,14 @@ object Plugin : Plugin {
|
||||
val answer = oneOf(
|
||||
parallel {
|
||||
waitMessageDataCallbackQuery().filter {
|
||||
it.data == yesData
|
||||
it.message.sameMessage(message)
|
||||
}.first()
|
||||
},
|
||||
parallel {
|
||||
waitMessageDataCallbackQuery().filter {
|
||||
it.data == noData
|
||||
waitInlineMessageIdDataCallbackQuery().filter {
|
||||
it.data == yesData || it.data == noData
|
||||
}.first()
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
if (answer.data == yesData) {
|
||||
|
Loading…
Reference in New Issue
Block a user