promoteChatMember
Promote a chat member.
Parameters
The identifier of a chat.
The identifier of the user to promote.
Whether the admininistrator’s presence in the chat is hidden.
Whether the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and surpass slow mode.
Whether the administrator can delete messages of other users.
Whether the administrator can manage video chats.
Whether the administrator can restrict, ban or unban chat members.
Whether the administrator can promote regular members to admininistrators.
Whether the administrator can change the name of the chat, its photo, description and some other settings.
Whether the administrator can invite users to the chat.
Whether the administrator can make posts in the channel. Only available for channels.
Whether the administrator can pin posts and edit posts they didn’t send. Only available for channels.
Whether the administrator can pin messages. Only available for groups and supergroups.
Whether the administrator can manage topics. Only available for supergroups.
Whether the administrator can post stories.
Whether the administrator can edit stories.
Whether the administrator can delete stories.
Whether the administrator manage direct messages.
The custom title of the administrator.
Result
Syntax
// Required parameters only.
await client.promoteChatMember(chatId, userId);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.promoteChatMember(chatId, userId, {
isAnonymous,
canManageChat,
canDeleteMessages,
canManageVideoChats,
canRestrictMembers,
canPromoteMembers,
canChangeInfo,
canInviteUsers,
canPostMessages,
canEditMessages,
canPinMessages,
canManageTopics,
canPostStories,
canEditStories,
canDeleteStories,
canManageDirectMessages,
title,
});