mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-27 20:48:44 +00:00
include revokeMessages in kickChatMember
This commit is contained in:
parent
3c5abac669
commit
c66d1e8665
@ -13,7 +13,9 @@ data class KickChatMember(
|
|||||||
@SerialName(userIdField)
|
@SerialName(userIdField)
|
||||||
override val userId: UserId,
|
override val userId: UserId,
|
||||||
@SerialName(untilDateField)
|
@SerialName(untilDateField)
|
||||||
override val untilDate: TelegramDate? = null
|
override val untilDate: TelegramDate? = null,
|
||||||
|
@SerialName(revokeMessagesField)
|
||||||
|
val revokeMessages: Boolean? = null
|
||||||
) : ChatMemberRequest<Boolean>, UntilDate {
|
) : ChatMemberRequest<Boolean>, UntilDate {
|
||||||
override fun method(): String = "kickChatMember"
|
override fun method(): String = "kickChatMember"
|
||||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||||
|
@ -162,6 +162,7 @@ const val optionIdsField = "option_ids"
|
|||||||
const val ipAddressField = "ip_address"
|
const val ipAddressField = "ip_address"
|
||||||
const val linkedChatIdField = "linked_chat_id"
|
const val linkedChatIdField = "linked_chat_id"
|
||||||
const val horizontalAccuracyField = "horizontal_accuracy"
|
const val horizontalAccuracyField = "horizontal_accuracy"
|
||||||
|
const val revokeMessagesField = "revoke_messages"
|
||||||
|
|
||||||
const val requestContactField = "request_contact"
|
const val requestContactField = "request_contact"
|
||||||
const val requestLocationField = "request_location"
|
const val requestLocationField = "request_location"
|
||||||
|
@ -8,23 +8,27 @@ import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
|||||||
suspend fun TelegramBot.kickChatMember(
|
suspend fun TelegramBot.kickChatMember(
|
||||||
chatId: ChatIdentifier,
|
chatId: ChatIdentifier,
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
untilDate: TelegramDate? = null
|
untilDate: TelegramDate? = null,
|
||||||
) = execute(KickChatMember(chatId, userId, untilDate))
|
revokeMessages: Boolean? = null
|
||||||
|
) = execute(KickChatMember(chatId, userId, untilDate, revokeMessages))
|
||||||
|
|
||||||
suspend fun TelegramBot.kickChatMember(
|
suspend fun TelegramBot.kickChatMember(
|
||||||
chat: PublicChat,
|
chat: PublicChat,
|
||||||
userId: UserId,
|
userId: UserId,
|
||||||
untilDate: TelegramDate? = null
|
untilDate: TelegramDate? = null,
|
||||||
) = kickChatMember(chat.id, userId, untilDate)
|
revokeMessages: Boolean? = null
|
||||||
|
) = kickChatMember(chat.id, userId, untilDate, revokeMessages)
|
||||||
|
|
||||||
suspend fun TelegramBot.kickChatMember(
|
suspend fun TelegramBot.kickChatMember(
|
||||||
chatId: ChatId,
|
chatId: ChatId,
|
||||||
user: User,
|
user: User,
|
||||||
untilDate: TelegramDate? = null
|
untilDate: TelegramDate? = null,
|
||||||
) = kickChatMember(chatId, user.id, untilDate)
|
revokeMessages: Boolean? = null
|
||||||
|
) = kickChatMember(chatId, user.id, untilDate, revokeMessages)
|
||||||
|
|
||||||
suspend fun TelegramBot.kickChatMember(
|
suspend fun TelegramBot.kickChatMember(
|
||||||
chat: PublicChat,
|
chat: PublicChat,
|
||||||
user: User,
|
user: User,
|
||||||
untilDate: TelegramDate? = null
|
untilDate: TelegramDate? = null,
|
||||||
) = kickChatMember(chat.id, user.id, untilDate)
|
revokeMessages: Boolean? = null
|
||||||
|
) = kickChatMember(chat.id, user.id, untilDate, revokeMessages)
|
||||||
|
Loading…
Reference in New Issue
Block a user