From 970d34db3f68a4465bdd88510b6274ccff2504bf Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:15:13 +0330 Subject: [PATCH] Import source: set_pfp Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- set_pfp.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 set_pfp.py diff --git a/set_pfp.py b/set_pfp.py new file mode 100644 index 0000000..7c5d973 --- /dev/null +++ b/set_pfp.py @@ -0,0 +1,19 @@ +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())