Link Search Menu Expand Document

Method: messages.setChatWallPaper

Back to methods index

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

Parameters:

NameTypeDescriptionRequired
for_bothBoolOnly for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user.Optional
revertBoolIf 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.Optional
peerUsername, chat ID, Update, Message or InputPeerThe private chat where the wallpaper will be setOptional
wallpaperInputWallPaperThe 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).Optional
settingsWallPaperSettingsWallpaper settings, obtained as described in the wallpaper documentation » or from messageActionSetChatWallPaper.wallpaper.settings.Optional
idintIf the wallpaper was obtained from a messageActionSetChatWallPaper service message, must contain the ID of that message.Optional

Return type: Updates

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();

$Updates = $MadelineProto->messages->setChatWallPaper(for_both: $Bool, revert: $Bool, peer: $InputPeer, wallpaper: $InputWallPaper, settings: $WallPaperSettings, id: $int, );