UpdateThemeRequest

Only users can use this request. See code examples.

---functions---
account.updateTheme#2bf40ccc flags:# format:string theme:InputTheme slug:flags.0?string title:flags.1?string document:flags.2?InputDocument settings:flags.3?Vector<InputThemeSettings> = Theme

Returns

Theme

This type can only be an instance of:

Theme

Parameters

formatstring
themeInputTheme
slugstringThis argument defaults to None and can be omitted.
titlestringThis argument defaults to None and can be omitted.
documentInputDocumentThis argument defaults to None and can be omitted.
settingsInputThemeSettingsThis argument defaults to None and can be omitted. Otherwise, a list must be supplied.

Known RPC errors

This request can cause 1 known error:

ThemeInvalidErrorTheme invalid.

You can import these from telethon.errors.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.account.UpdateThemeRequest(
        format='some string here',
        theme=types.InputTheme(
            id=-12398745604826,
            access_hash=-12398745604826
        ),
        slug='some string here',
        title='My awesome title',
        document=types.InputDocument(
            id=-12398745604826,
            access_hash=-12398745604826,
            file_reference=b'arbitrary\x7f data \xfa here'
        ),
        settings=[types.InputThemeSettings(
            base_theme=types.BaseThemeClassic(),
            accent_color=42,
            message_colors_animated=True,
            outbox_accent_color=42,
            message_colors=[42],
            wallpaper=types.InputWallPaper(
                id=-12398745604826,
                access_hash=-12398745604826
            ),
            wallpaper_settings=types.WallPaperSettings(
                blur=True,
                motion=True,
                background_color=42,
                second_background_color=42,
                third_background_color=42,
                fourth_background_color=42,
                intensity=42,
                rotation=42,
                emoticon='some string here'
            )
        )]
    ))
    print(result.stringify())