ChatMember

fun ChatMember(user: User, status: String, customTitle: String? = null, isAnonymous: Boolean = false, canBeEdited: Boolean = false, canPostMessages: Boolean = false, canEditMessages: Boolean = false, canDeleteMessages: Boolean = false, canRestrictMembers: Boolean = false, canPromoteMembers: Boolean = false, canChangeInfo: Boolean = false, canInviteUsers: Boolean = false, canPinMessages: Boolean = false, isMember: Boolean = false, canSendMessages: Boolean = false, canSendMediaMessages: Boolean = false, canSendPolls: Boolean = false, canSendOtherMessages: Boolean = false, canAddWebPagePreviews: Boolean = false, untilDate: Int? = null)

Parameters

user

Information about the user

status

The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”

customTitle

Optional. Owner and administrators only. Custom title for this user

isAnonymous

Optional. Owner and administrators only. True, if the user's presence in the chat is hidden

canBeEdited

Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user

canPostMessages

Optional. Administrators only. True, if the administrator can post in the channel; channels only

canEditMessages

Optional. Administrators only. True, if the administrator can edit messages of other users and can pin messages; channels only

canDeleteMessages

Optional. Administrators only. True, if the administrator can delete messages of other users

canRestrictMembers

Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members

canPromoteMembers

Optional. Administrators only. True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)

canChangeInfo

Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings

canInviteUsers

Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat

canPinMessages

Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only

isMember

Optional. Restricted only. True, if the user is a member of the chat at the moment of the request

canSendMessages

Optional. Restricted only. True, if the user is allowed to send text messages, contacts, locations and venues

canSendMediaMessages

Optional. Restricted only. True, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes

canSendPolls

Optional. Restricted only. True, if the user is allowed to send polls

canSendOtherMessages

Optional. Restricted only. True, if the user is allowed to send animations, games, stickers and use inline bots

canAddWebPagePreviews

Optional. Restricted only. True, if the user is allowed to add web page previews to their messages

untilDate

Optional. Restricted and kicked only. Date when restrictions will be lifted for this user; unix time