messages.SetChatWallPaper

class pyrogram.raw.functions.messages.SetChatWallPaper

Set a custom wallpaper » in a specific private chat with another user.

Details:
  • Layer: 223

  • ID: 8FFACAE1

Parameters:
  • peer (InputPeer) – The private chat where the wallpaper will be set

  • for_both (bool, optional) – Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user.

  • revert (bool, optional) – If we don’t like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag.

  • wallpaper (InputWallPaper, optional) – The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a messageActionSetChatWallPaper service message (id must be provided, instead).

  • settings (WallPaperSettings, optional) – Wallpaper settings, obtained as described in the wallpaper documentation » or from messageActionSetChatWallPaper.wallpaper.settings.

  • id (int 32-bit, optional) – If the wallpaper was obtained from a messageActionSetChatWallPaper service message, must contain the ID of that message.

Returns:

Updates

TL Schema

messages.setChatWallPaper#8ffacae1
flags:#
for_both:flags.3?true
revert:flags.4?true
peer:InputPeer
wallpaper:flags.0?InputWallPaper
settings:flags.2?WallPaperSettings
id:flags.1?int

= Updates

Parameter Tree

SetChatWallPaper
├── for_bothtrue (optional)
├── reverttrue (optional)
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── wallpaperInputWallPaper (optional)
│ ├── InputWallPaper
│ │ ├── idlong
│ │ └── access_hashlong
│ ├── InputWallPaperSlug
│ │ └── slugstring
│ └── InputWallPaperNoFile
│ └── idlong
├── settingsWallPaperSettings (optional)
│ └── WallPaperSettings
│ ├── 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)
└── idint (optional)

Example

await app.invoke(
    SetChatWallPaper(
        for_both=None,
        revert=None,
        peer=await app.resolve_peer(chat_id),
        wallpaper=InputWallPaper(
            id=0,
            access_hash=0
        ),
        settings=WallPaperSettings(
            blur=None,
            motion=None,
            background_color=None,
            second_background_color=None,
            third_background_color=None,
            fourth_background_color=None,
            intensity=None,
            rotation=None,
            emoticon=None
        ),
        id=0,
    )
)