From ddb8de2c2f036bb34b2411a5eb770e3e4d06dcbe Mon Sep 17 00:00:00 2001 From: Sergey Elpashev Date: Mon, 28 Jul 2025 17:44:23 +0300 Subject: [PATCH] Initial --- .gitignore | 4 ++++ config.py | 8 ++++++++ controllers.py | 0 main.py | 12 ++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 .gitignore create mode 100644 config.py create mode 100644 controllers.py create mode 100644 main.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c61028f --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +*.session +__pycache__/ +venv/ \ No newline at end of file diff --git a/config.py b/config.py new file mode 100644 index 0000000..d335332 --- /dev/null +++ b/config.py @@ -0,0 +1,8 @@ +import os + +from dotenv import load_dotenv + +load_dotenv() + +APP_ID = os.environ.get("APP_ID") +APP_HASH = os.environ.get("APP_HASH") diff --git a/controllers.py b/controllers.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py new file mode 100644 index 0000000..b6447b1 --- /dev/null +++ b/main.py @@ -0,0 +1,12 @@ +import asyncio + +from pyrogram import Client + +from config import APP_HASH, APP_ID + + +async def main(): + async with Client("my_account", APP_ID, APP_HASH) as app: + await app.send_message("me", "Hello, world2!") + +asyncio.run(main())