mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 12:08:43 +00:00
added the new request SetChatAdministratorCustomTitle to manage the custom titles of administrators promoted by the bot.
This commit is contained in:
parent
4dd2a8437c
commit
b4e4bed622
@ -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
|
||||
|
@ -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()
|
||||
}
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user