promoteChatMember

Promote a chat member.

Parameters

chatId: ID

The identifier of a chat.

userId: ID

The identifier of the user to promote.

isAnonymous?: boolean

Whether the admininistrator’s presence in the chat is hidden.

canManageChat?: boolean

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.

canDeleteMessages?: boolean

Whether the administrator can delete messages of other users.

canManageVideoChats?: boolean

Whether the administrator can manage video chats.

canRestrictMembers?: boolean

Whether the administrator can restrict, ban or unban chat members.

canPromoteMembers?: boolean

Whether the administrator can promote regular members to admininistrators.

canChangeInfo?: boolean

Whether the administrator can change the name of the chat, its photo, description and some other settings.

canInviteUsers?: boolean

Whether the administrator can invite users to the chat.

canPostMessages?: boolean

Whether the administrator can make posts in the channel. Only available for channels.

canEditMessages?: boolean

Whether the administrator can pin posts and edit posts they didn’t send. Only available for channels.

canPinMessages?: boolean

Whether the administrator can pin messages. Only available for groups and supergroups.

canManageTopics?: boolean

Whether the administrator can manage topics. Only available for supergroups.

canPostStories?: boolean

Whether the administrator can post stories.

canEditStories?: boolean

Whether the administrator can edit stories.

canDeleteStories?: boolean

Whether the administrator can delete stories.

canManageDirectMessages?: boolean

Whether the administrator manage direct messages.

title?: string

The custom title of the administrator.

Result

void

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,
});