mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-12-22 14:07:14 +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.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.waitInlineMessageIdDataCallbackQuery
|
||||||
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.oneOf
|
||||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.parallel
|
import dev.inmo.tgbotapi.extensions.behaviour_builder.parallel
|
||||||
@ -155,14 +156,14 @@ object Plugin : Plugin {
|
|||||||
val answer = oneOf(
|
val answer = oneOf(
|
||||||
parallel {
|
parallel {
|
||||||
waitMessageDataCallbackQuery().filter {
|
waitMessageDataCallbackQuery().filter {
|
||||||
it.data == yesData
|
it.message.sameMessage(message)
|
||||||
}.first()
|
}.first()
|
||||||
},
|
},
|
||||||
parallel {
|
parallel {
|
||||||
waitMessageDataCallbackQuery().filter {
|
waitInlineMessageIdDataCallbackQuery().filter {
|
||||||
it.data == noData
|
it.data == yesData || it.data == noData
|
||||||
}.first()
|
}.first()
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (answer.data == yesData) {
|
if (answer.data == yesData) {
|
||||||
|
Loading…
Reference in New Issue
Block a user