account.setGlobalPrivacySettings

Set global privacy settings

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.account.setGlobalPrivacySettings({
        settings: new Api.GlobalPrivacySettings({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

globalPrivacySettings#bea2f424 flags:# archive_and_mute_new_noncontact_peers:flags.0?Bool = GlobalPrivacySettings;
---functions---
account.setGlobalPrivacySettings#1edaaac2 settings:GlobalPrivacySettings = GlobalPrivacySettings;

Parameters

Name

Type

Description

settings

Global privacy settings

Result

GlobalPrivacySettings

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated