set_bot_profile_photo()¶
- async Client.set_bot_profile_photo()¶
Set or remove the profile photo or video of a bot you own.
The
photoandvideoarguments are mutually exclusive. Pass neither to remove the current profile photo.Usable by Users Bots- Parameters:
bot_user_id (
int|str) – Unique identifier (int) or username (str) of the target bot.photo (
str|BinaryIO, optional) – Profile photo to set. Pass a file path as string to upload a new photo that exists on your local machine or pass a binary file-like object with its attribute “.name” set for in-memory uploads.video (
str|BinaryIO, optional) – Profile video to set. Pass a file path as string to upload a new video that exists on your local machine or pass a binary file-like object with its attribute “.name” set for in-memory uploads.
- Returns:
bool– True on success.
Example
# Set a new bot profile photo await app.set_bot_profile_photo("mybot", photo="new_photo.jpg") # Set a new bot profile video await app.set_bot_profile_photo("mybot", video="new_video.mp4") # Remove the bot profile photo await app.set_bot_profile_photo("mybot")