photos.deletePhotos

Deletes profile photos.

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.photos.deletePhotos({
        id: [new Api.InputPhoto({...})],
        }));
    console.log(result); // prints the result
})();

TL schema

---functions---
photos.deletePhotos#87cf7f2f id:Vector<InputPhoto> = Vector<long>;

Parameters

Name

Type

Description

id

Input photos to delete

Result

Method returns a list of successfully deleted photos in Vector[long](https://core.telegram.org/type/long)

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated