forked from iw4p/telegram-cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,33 @@ | ||
from telethon import TelegramClient | ||
from shutil import move | ||
from pathlib import Path | ||
|
||
from .telegram_config import ( | ||
fetch_app_data, | ||
directory | ||
) | ||
from .utils.args import ( | ||
tgsend_args | ||
) | ||
from .utils.utils import ( | ||
target_username_handler, | ||
session_retriever | ||
) | ||
|
||
|
||
args = tgsend_args() | ||
|
||
# Get session name from CLI | ||
unique_name = args.name | ||
#username = args.username | ||
|
||
client = session_retriever(TelegramClient, unique_name) | ||
|
||
|
||
async def main(): | ||
await client.send_message('me', 'tgsend first message') | ||
|
||
|
||
def cli(): | ||
with client: | ||
client.loop.run_until_complete(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters