user has a profile photo?
Here is my code:
sender = await event.get_sender()
settings.AVATARS_FOLDER.mkdir(exist_ok=True, parents=True)
file_path = await bot.download_profile_photo(
sender,
file=f"{str(settings.AVATARS_FOLDER.resolve())}/{user_id}.jpg",
)
print(file_path)
What is bot ? How do you know the user has profile photos?
Обсуждают сегодня