account.createTheme

Create a 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.createTheme({
        slug: 'random string here',
        title: 'random string here',
        document: new Api.InputDocument({...}),
        settings: new Api.InputThemeSettings({...}),
        }));
    console.log(result); // prints the result
})();

TL schema

Parameters

Name

Type

Description

flags

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

Was this helpful?