From 63e864741ee7870482b8daac86791e50f8187217 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 11 Nov 2021 12:24:10 +0600 Subject: [PATCH] update changelog and several kdocs --- CHANGELOG.md | 7 +++++++ .../chat/invite_links/ChatJoinRequestAnswer.kt | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51d35250fd..72679751ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,13 @@ * `EditChatInviteLinkSimple` * `EditChatInviteLinkWithLimitedMembers` * `EditChatInviteLinkWithJoinRequest` + * New `BotAction`: `ChooseStickerAction` + * Now requester will throw exceptions related to responses decoding directly instead of wrapping in + `RequestException` + * +* `BehaviourBuilder FSM`: + * **Incompatible changes** (now generics are used in state machines) + * `strictlyOn` and `onStateOrSubstate` now are part of `BehaviourContextWithFSMBuilder` ## 0.36.1 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/invite_links/ChatJoinRequestAnswer.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/invite_links/ChatJoinRequestAnswer.kt index ab4c705187..67285cea62 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/invite_links/ChatJoinRequestAnswer.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/chat/invite_links/ChatJoinRequestAnswer.kt @@ -5,6 +5,9 @@ import dev.inmo.tgbotapi.types.* import kotlinx.serialization.* import kotlinx.serialization.builtins.serializer +/** + * Represent a join request answer. See inheritors for more info + */ sealed interface ChatJoinRequestAnswer : SimpleRequest { val chatId: ChatIdentifier val userId: UserId @@ -13,6 +16,10 @@ sealed interface ChatJoinRequestAnswer : SimpleRequest { get() = Boolean.serializer() } +/** + * Represent [approve](https://core.telegram.org/bots/api#approvechatjoinrequest) [ChatJoinRequestAnswer]. You may approve + * the requests retrieved in with [ChatJoinRequest] (in [dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate]) + */ @Serializable data class ApproveChatJoinRequest( @SerialName(chatIdField) @@ -26,6 +33,10 @@ data class ApproveChatJoinRequest( override fun method(): String = "approveChatJoinRequest" } +/** + * Represent [decline](https://core.telegram.org/bots/api#declinechatjoinrequest) [ChatJoinRequestAnswer]. You may approve + * the requests retrieved in with [ChatJoinRequest] (in [dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate]) + */ @Serializable data class DeclineChatJoinRequest( @SerialName(chatIdField)