From e1e2b93269c496ccd8a7f40a92575628afeaf231 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 3 Oct 2021 21:14:28 +0600 Subject: [PATCH] deprecate waitEditedPoll and rename poll updates waiters --- .../behaviour_builder/expectations/WaitEditedContent.kt | 4 +--- .../behaviour_builder/expectations/WaitPollUpdates.kt | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEditedContent.kt b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEditedContent.kt index fa5e162a68..8489961012 100644 --- a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEditedContent.kt +++ b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEditedContent.kt @@ -119,9 +119,7 @@ suspend fun BehaviourContext.waitEditedStaticLocation( filter: SimpleFilter>? = null, mapper: CommonMessageToContentMapper? = null ) = waitEditedContent(count, initRequest, false, errorFactory, filter, mapper) -/** - * This - */ +@Deprecated("Potentially, this trigger will never be used. Use `waitPollUpdates` instead") suspend fun BehaviourContext.waitEditedPoll( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null }, diff --git a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitPollUpdates.kt b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitPollUpdates.kt index fd1632107c..0aebcb4acd 100644 --- a/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitPollUpdates.kt +++ b/tgbotapi.extensions.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitPollUpdates.kt @@ -59,7 +59,7 @@ private suspend inline fun BehaviourContext.waitPolls( /** * This wait will be triggered only for stopped polls and polls, which are sent by the bot */ -suspend fun BehaviourContext.waitPollsUpdates( +suspend fun BehaviourContext.waitPollUpdates( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null }, count: Int = 1, @@ -70,7 +70,7 @@ suspend fun BehaviourContext.waitPollsUpdates( /** * This wait will be triggered only for stopped polls and polls, which are sent by the bot */ -suspend fun BehaviourContext.waitQuizPollsUpdates( +suspend fun BehaviourContext.waitQuizPollUpdates( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null }, count: Int = 1, @@ -81,7 +81,7 @@ suspend fun BehaviourContext.waitQuizPollsUpdates( /** * This wait will be triggered only for stopped polls and polls, which are sent by the bot */ -suspend fun BehaviourContext.waitRegularPollsUpdates( +suspend fun BehaviourContext.waitRegularPollUpdates( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null }, count: Int = 1,