PromoteChatMemberRequest

data class PromoteChatMemberRequest(chat_id: String, user_id: Long, is_anonymous: Boolean?, can_manage_chat: Boolean?, can_post_messages: Boolean?, can_edit_messages: Boolean?, can_delete_messages: Boolean?, can_manage_voice_chats: Boolean?, can_restrict_members: Boolean?, can_promote_members: Boolean?, can_change_info: Boolean?, can_invite_users: Boolean?, can_pin_messages: Boolean?) : TelegramRequest

Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Returns True on success.

Constructors

PromoteChatMemberRequest
Link copied to clipboard
fun PromoteChatMemberRequest(chat_id: String, user_id: Long, is_anonymous: Boolean? = null, can_manage_chat: Boolean? = null, can_post_messages: Boolean? = null, can_edit_messages: Boolean? = null, can_delete_messages: Boolean? = null, can_manage_voice_chats: Boolean? = null, can_restrict_members: Boolean? = null, can_promote_members: Boolean? = null, can_change_info: Boolean? = null, can_invite_users: Boolean? = null, can_pin_messages: Boolean? = null)

Properties

can_change_info
Link copied to clipboard
val can_change_info: Boolean? = null
Pass True, if the administrator can change chat title, photo and other settings
can_delete_messages
Link copied to clipboard
val can_delete_messages: Boolean? = null
Pass True, if the administrator can delete messages of other users
can_edit_messages
Link copied to clipboard
val can_edit_messages: Boolean? = null
Pass True, if the administrator can edit messages of other users and can pin messages, channels only
can_invite_users
Link copied to clipboard
val can_invite_users: Boolean? = null
Pass True, if the administrator can invite new users to the chat
can_manage_chat
Link copied to clipboard
val can_manage_chat: Boolean? = null
Pass True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode.
can_manage_voice_chats
Link copied to clipboard
val can_manage_voice_chats: Boolean? = null
Pass True, if the administrator can manage voice chats
can_pin_messages
Link copied to clipboard
val can_pin_messages: Boolean? = null
Pass True, if the administrator can pin messages, supergroups only
can_post_messages
Link copied to clipboard
val can_post_messages: Boolean? = null
Pass True, if the administrator can create channel posts, channels only
can_promote_members
Link copied to clipboard
val can_promote_members: Boolean? = null
Pass 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 him)
can_restrict_members
Link copied to clipboard
val can_restrict_members: Boolean? = null
Pass True, if the administrator can restrict, ban or unban chat members
chat_id
Link copied to clipboard
val chat_id: String
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
is_anonymous
Link copied to clipboard
val is_anonymous: Boolean? = null
Pass True, if the administrator's presence in the chat is hidden
user_id
Link copied to clipboard
val user_id: Long
Unique identifier of the target user