1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

added the new request SetChatAdministratorCustomTitle to manage the custom titles of administrators promoted by the bot.

This commit is contained in:
InsanusMokrassar 2020-01-01 21:45:39 +06:00
parent 4dd2a8437c
commit b4e4bed622
3 changed files with 27 additions and 0 deletions

View File

@ -2,6 +2,8 @@
## 0.21.0 TelegramBotAPI 4.5
* Added the new request `SetChatAdministratorCustomTitle` to manage the custom titles of administrators promoted by the
bot.
* Added the field `slowModeDelay` to the `ExtendedSupergroupChat` objects.
## 0.20.0 MPP Migration

View File

@ -0,0 +1,24 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import kotlinx.serialization.*
import kotlinx.serialization.internal.BooleanSerializer
@Serializable
data class SetChatAdministratorCustomTitle(
@SerialName(chatIdField)
override val chatId: ChatId,
@SerialName(userIdField)
override val userId: UserId,
@SerialName(customTitleField)
val customTitle: String
) : ChatMemberRequest<Boolean> {
override fun method(): String = "setChatAdministratorCustomTitle"
override val resultDeserializer: DeserializationStrategy<Boolean>
get() = BooleanSerializer
override val requestSerializer: SerializationStrategy<*>
get() = RestrictChatMember.serializer()
}

View File

@ -95,6 +95,7 @@ const val switchInlineQueryField = "switch_inline_query"
const val isAnimatedField = "is_animated"
const val inviteLinkField = "invite_link"
const val pinnedMessageField = "pinned_message"
const val customTitleField = "custom_title"
const val requestWriteAccessField = "request_write_access"