promoteChatMember

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 administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success.

Arguments
Name Type Description Required
chat_id int | string | null | array Unique identifier for the target chat or username of the target channel (in the format @channelusername) no
user_id int | null Unique identifier of the target user no
is_anonymous bool | null Pass True if the administrator's presence in the chat is hidden no
can_manage_chat bool | 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. Implied by any other administrator privilege no
can_post_messages bool | null Pass True if the administrator can create channel posts, channels only no
can_edit_messages bool | null Pass True if the administrator can edit messages of other users and can pin messages, channels only no
can_delete_messages bool | null Pass True if the administrator can delete messages of other users no
can_manage_video_chats bool | null Pass True if the administrator can manage video chats no
can_restrict_members bool | null Pass True if the administrator can restrict, ban or unban chat members no
can_promote_members bool | null Pass True if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by him) no
can_change_info bool | null Pass True if the administrator can change chat title, photo and other settings no
can_invite_users bool | null Pass True if the administrator can invite new users to the chat no
can_pin_messages bool | null Pass True if the administrator can pin messages, supergroups only no
can_manage_topics bool | null Pass True if the user is allowed to create, rename, close, and reopen forum topics, supergroups only no
token string | null You can use this method on another bot with specify this parameter no
forgot bool | null You can set to not receive request result, dont set it or pass null for turn it off no
answer bool | null You can set to answer to webhook, dont set it or pass null for turn it off no

Output : bool | BPT\types\responseError

Static or normal : Static

Examples :

request::promoteChatMember(chat_id: int | string | null, user_id: int | null, is_anonymous: bool | null, can_manage_chat: bool | null, can_post_messages: bool | null, can_edit_messages: bool | null, can_delete_messages: bool | null, can_manage_video_chats: bool | null, can_restrict_members: bool | null, can_promote_members: bool | null, can_change_info: bool | null, can_invite_users: bool | null, can_pin_messages: bool | null, can_manage_topics: bool | null, token: String | null, forgot: Boolean | null, answer: Boolean | null);
request::promoteChatMember(['chat_id' => int | string | null, 'user_id' => int | null, 'is_anonymous' => bool | null, 'can_manage_chat' => bool | null, 'can_post_messages' => bool | null, 'can_edit_messages' => bool | null, 'can_delete_messages' => bool | null, 'can_manage_video_chats' => bool | null, 'can_restrict_members' => bool | null, 'can_promote_members' => bool | null, 'can_change_info' => bool | null, 'can_invite_users' => bool | null, 'can_pin_messages' => bool | null, 'can_manage_topics' => bool | null, 'token' => String | null, 'forgot' => Boolean | null, 'answer' => Boolean | null]);
request::promoteChatMember();