setManagedBotAccessSettings

Set the access settings of a managed bot. BOT-ONLY

Parameters

userId: ID

The identifier of the bot user.

isAccessRestricted: boolean

Whether access is restricted to specific users.

usersWithAccess: ID[]

The identifiers of the users with access when access is restricted. The owner of the bot will always have access.

Result

void

Syntax

// Required parameters only.
await client.setManagedBotAccessSettings(userId, isAccessRestricted);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.setManagedBotAccessSettings(userId, isAccessRestricted, { usersWithAccess });