BanChatMemberRequest

data class BanChatMemberRequest(chat_id: String, user_id: Long, until_date: Long?, revoke_messages: Boolean?) : TelegramRequest

Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success.

Constructors

BanChatMemberRequest
Link copied to clipboard
fun BanChatMemberRequest(chat_id: String, user_id: Long, until_date: Long? = null, revoke_messages: Boolean? = null)

Properties

chat_id
Link copied to clipboard
val chat_id: String
Unique identifier for the target group or username of the target supergroup or channel (in the format @channelusername)
revoke_messages
Link copied to clipboard
val revoke_messages: Boolean? = null
Pass True to delete all messages from the chat for the user that is being removed.
until_date
Link copied to clipboard
val until_date: Long? = null
Date when the user will be unbanned, unix time.
user_id
Link copied to clipboard
val user_id: Long
Unique identifier of the target user