From eb879963f803730fdce1a39c26b820628845a936 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 5 Nov 2020 12:48:44 +0600 Subject: [PATCH] isAnonymous support in api --- CHANGELOG.md | 1 + .../extensions/api/chat/members/PromoteChatMember.kt | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a49e7c4a3d..cffb8bce66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ * `API`: * Extensions `TelegramBot#pinChatMessage` now support any `Chat` and `Message`s from any `Chat` * New extensions `TelegramBot#unpinAllChatMessages` + * Extensions `TelegramBot#promoteChatMember` got `isAnonymous` parameter ## 0.29.4 diff --git a/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/members/PromoteChatMember.kt b/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/members/PromoteChatMember.kt index 8ef88449ad..e3f1dc9721 100644 --- a/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/members/PromoteChatMember.kt +++ b/tgbotapi.extensions.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/chat/members/PromoteChatMember.kt @@ -9,6 +9,7 @@ suspend fun TelegramBot.promoteChatMember( chatId: ChatIdentifier, userId: UserId, untilDate: TelegramDate? = null, + isAnonymous: Boolean? = null, canChangeInfo: Boolean? = null, canPostMessages: Boolean? = null, canEditMessages: Boolean? = null, @@ -22,6 +23,7 @@ suspend fun TelegramBot.promoteChatMember( chatId, userId, untilDate, + isAnonymous, canChangeInfo, canPostMessages, canEditMessages, @@ -37,6 +39,7 @@ suspend fun TelegramBot.promoteChatMember( chat: PublicChat, userId: UserId, untilDate: TelegramDate? = null, + isAnonymous: Boolean? = null, canChangeInfo: Boolean? = null, canPostMessages: Boolean? = null, canEditMessages: Boolean? = null, @@ -49,6 +52,7 @@ suspend fun TelegramBot.promoteChatMember( chat.id, userId, untilDate, + isAnonymous, canChangeInfo, canPostMessages, canEditMessages, @@ -63,6 +67,7 @@ suspend fun TelegramBot.promoteChatMember( chatId: ChatId, user: User, untilDate: TelegramDate? = null, + isAnonymous: Boolean? = null, canChangeInfo: Boolean? = null, canPostMessages: Boolean? = null, canEditMessages: Boolean? = null, @@ -75,6 +80,7 @@ suspend fun TelegramBot.promoteChatMember( chatId, user.id, untilDate, + isAnonymous, canChangeInfo, canPostMessages, canEditMessages, @@ -89,6 +95,7 @@ suspend fun TelegramBot.promoteChatMember( chat: PublicChat, user: User, untilDate: TelegramDate? = null, + isAnonymous: Boolean? = null, canChangeInfo: Boolean? = null, canPostMessages: Boolean? = null, canEditMessages: Boolean? = null, @@ -101,6 +108,7 @@ suspend fun TelegramBot.promoteChatMember( chat.id, user.id, untilDate, + isAnonymous, canChangeInfo, canPostMessages, canEditMessages,