account.CreateTheme

class pyrogram.raw.functions.account.CreateTheme

Create a theme

Details:
  • Layer: 227

  • ID: 652E4400

Parameters:
  • slug (str) – Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID.

  • title (str) – Theme name

  • document (InputDocument, optional) – Theme file

  • settings (List of InputThemeSettings, optional) – Theme settings, multiple values can be provided for the different base themes (day/night mode, etc).

Returns:

Theme

TL Schema

account.createTheme#652e4400
flags:#
slug:string
title:string
document:flags.2?InputDocument
settings:flags.3?Vector<InputThemeSettings>

= Theme

Parameter Tree

CreateTheme
├── slug → string
├── title → string
├── document → InputDocument (optional)
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── id → long
│ ├── access_hash → long
│ └── file_reference → bytes
└── settings → Vector < InputThemeSettings > (optional)
├── message_colors_animated → true (optional)
├── base_theme → BaseTheme
│ ├── BaseThemeClassic
│ ├── BaseThemeDay
│ ├── BaseThemeNight
│ ├── BaseThemeTinted
│ └── BaseThemeArctic
├── accent_color → int
├── outbox_accent_color → int (optional)
├── message_colors → Vector < int > (optional)
├── wallpaper → InputWallPaper (optional)
│ ├── InputWallPaper
│ │ ├── id → long
│ │ └── access_hash → long
│ ├── InputWallPaperSlug
│ │ └── slug → string
│ └── InputWallPaperNoFile
│ └── id → long
└── wallpaper_settings → WallPaperSettings (optional)
├── blur → true (optional)
├── motion → true (optional)
├── background_color → int (optional)
├── second_background_color → int (optional)
├── third_background_color → int (optional)
├── fourth_background_color → int (optional)
├── intensity → int (optional)
├── rotation → int (optional)
└── emoticon → string (optional)

Example

await app.invoke(
    CreateTheme(
        slug="text",
        title="text",
        document=InputDocumentEmpty(),
        settings=[
                InputThemeSettings(
                    message_colors_animated=None,
                    base_theme=BaseThemeClassic(),
                    accent_color=0,
                    outbox_accent_color=None,
                    message_colors=None,
                    wallpaper=None,
                    wallpaper_settings=None
                )
            ],
    )
)