setMyProfilePhoto

Returns: bool

class aiogram.methods.set_my_profile_photo.SetMyProfilePhoto(*, photo: InputProfilePhotoStatic | InputProfilePhotoAnimated, **extra_data: Any)[source]

Changes the profile photo of the bot. Returns True on success.

Source: https://core.telegram.org/bots/api#setmyprofilephoto

photo: InputProfilePhotoUnion

The new profile photo to set

Usage

As bot method

result: bool = await bot.set_my_profile_photo(...)

Method as object

Imports:

  • from aiogram.methods.set_my_profile_photo import SetMyProfilePhoto

  • alias: from aiogram.methods import SetMyProfilePhoto

With specific bot

result: bool = await bot(SetMyProfilePhoto(...))

As reply into Webhook in handler

return SetMyProfilePhoto(...)