account.getTheme

Get theme information

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.getTheme({
        format: 'random string here',
        theme: new Api.InputTheme({...}),
        documentId: 5205056,
        }));
    console.log(result); // prints the result
})();

TL schema

theme#28f1114 flags:# creator:flags.0?true default:flags.1?true id:long access_hash:long slug:string title:string document:flags.2?Document settings:flags.3?ThemeSettings installs_count:int = Theme;
---functions---
account.getTheme#8d9d742b format:string theme:InputTheme document_id:long = Theme;

Parameters

Name

Type

Description

format

Theme format, a string that identifies the theming engines supported by the client

theme

Theme

document_id

Document ID

Result

Theme

Possible errors

Code

Type

Description

400

THEME_FORMAT_INVALID

Invalid theme format provided

400

THEME_INVALID

Invalid theme provided

Can bots use this methd ?

yes

Last updated