Files
arsam 970d34db3f Import source: set_pfp
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
2026-09-18 23:15:13 +03:30

20 lines
595 B
Python

import asyncio, os
from dotenv import load_dotenv
from pyrogram import Client
load_dotenv()
app = Client("gdrive_bot", api_id=int(os.getenv("API_ID")),
api_hash=os.getenv("API_HASH"), bot_token=os.getenv("BOT_TOKEN"))
async def main():
async with app:
me = await app.get_me()
print("Bot:", me.username, "| id:", me.id)
try:
await app.set_profile_photo(photo="bot_pfp.jpg")
print("RESULT: set_profile_photo OK")
except Exception as e:
print("RESULT: FAILED ->", type(e).__name__, str(e))
asyncio.run(main())