account.updateTheme

Update theme

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.updateTheme({
        format: 'random string here',
        theme: new Api.InputTheme({...}),
        slug: 'random string here',
        title: 'random string here',
        document: new Api.InputDocument({...}),
        settings: new Api.InputThemeSettings({...}),
        }));
    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.updateTheme#5cb367d5 flags:# format:string theme:InputTheme slug:flags.0?string title:flags.1?string document:flags.2?InputDocument settings:flags.3?InputThemeSettings = Theme;

Parameters

Name

Type

Description

flags

format

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

theme

Theme to update

slug

Unique theme ID

title

Theme name

document

Theme file

settings

Theme settings

Result

Theme

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Last updated