setManagedBotAccessSettings()
Use this method to change the access settings of a managed bot. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
user_id | number | required | User identifier of the managed bot whose access settings will be changed |
is_access_restricted | boolean | required | Pass True, if only selected users can access the bot. The bot's owner can always access it. |
added_user_ids | number[] | optional | A JSON-serialized list of up to 10 identifiers of users who will have access to the bot in addition to its owner. Ignored if is_access_restricted is false. |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { SetManagedBotAccessSettingsParams } from "@yaebal/types";
await bot.api.call<boolean>("setManagedBotAccessSettings", {
user_id: 123456789,
is_access_restricted: true,
} satisfies SetManagedBotAccessSettingsParams);context shortcut
also available as ctx.setManagedBotAccessSettings() on
16
context types — see @yaebal/contexts.
/** Use this method to change the access settings of a managed bot. Returns *True* on success. */
ctx.setManagedBotAccessSettings(params: Omit<SetManagedBotAccessSettingsParams, "user_id">)official Bot API docs: https://core.telegram.org/bots/api/#setmanagedbotaccesssettings