setChatMemberRights

Set the rights of a chat member.

Parameters

chatId: ID

The identifier of the chat. Must be a supergroup.

memberId: ID

The identifier of a member.

The member’s new rights. All fields default to true if the chat’s default member rights allow. This means that this method is the same as unbanChatMember if this parameter is not provided or all of its fields are true.

untilDate?: Date

A point in time within the future in which the restriction will be reverted.

Result

void

Syntax

// Required parameters only.
await client.setChatMemberRights(chatId, memberId);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.setChatMemberRights(chatId, memberId, { rights, untilDate });