account.CreateTheme

class pyrogram.raw.functions.account.CreateTheme

Create a theme

Details:
  • Layer: 223

  • 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
├── slugstring
├── titlestring
├── documentInputDocument (optional)
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── idlong
│ ├── access_hashlong
│ └── file_referencebytes
└── settingsVector < InputThemeSettings > (optional)
├── message_colors_animatedtrue (optional)
├── base_themeBaseTheme
│ ├── BaseThemeClassic
│ ├── BaseThemeDay
│ ├── BaseThemeNight
│ ├── BaseThemeTinted
│ └── BaseThemeArctic
├── accent_colorint
├── outbox_accent_colorint (optional)
├── message_colorsVector < int > (optional)
├── wallpaperInputWallPaper (optional)
│ ├── InputWallPaper
│ │ ├── idlong
│ │ └── access_hashlong
│ ├── InputWallPaperSlug
│ │ └── slugstring
│ └── InputWallPaperNoFile
│ └── idlong
└── wallpaper_settingsWallPaperSettings (optional)
├── blurtrue (optional)
├── motiontrue (optional)
├── background_colorint (optional)
├── second_background_colorint (optional)
├── third_background_colorint (optional)
├── fourth_background_colorint (optional)
├── intensityint (optional)
├── rotationint (optional)
└── emoticonstring (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
                )
            ],
    )
)