UploadWallPaperRequest
Only users can use this method. See code examples.
---functions--- account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPaperSettings = WallPaper
Returns
WallPaper |
This type can be an instance of either:
WallPaper | WallPaperNoFile |
Parameters
file | InputFile | |
mime_type | string | |
settings | WallPaperSettings |
Known RPC errors
This request can cause 2 known errors:
WallpaperFileInvalidError | The given file cannot be used as a wallpaper. |
WallpaperMimeInvalidError | . |
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.UploadWallPaperRequest( file=client.upload_file('/path/to/file.jpg'), mime_type='some string here', 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 ) )) print(result.stringify())