19 lines
563 B
Bash
19 lines
563 B
Bash
|
|
export $(grep '^API_\|^CHANNEL' bots.env | xargs)
|
||
|
|
|
||
|
|
docker compose run --rm \
|
||
|
|
-e API_ID=$API_ID \
|
||
|
|
-e API_HASH=$API_HASH \
|
||
|
|
live-trader python -c "
|
||
|
|
import asyncio
|
||
|
|
from telethon import TelegramClient
|
||
|
|
import os
|
||
|
|
|
||
|
|
async def main():
|
||
|
|
async with TelegramClient('/data/mysession', int(os.environ['API_ID']), os.environ['API_HASH']) as client:
|
||
|
|
async for dialog in client.iter_dialogs():
|
||
|
|
if any(x in dialog.name.lower() for x in ['hm', 'gold', 'xau', 'vip']):
|
||
|
|
print(f'ID: {dialog.id} Name: {dialog.name}')
|
||
|
|
|
||
|
|
asyncio.run(main())
|
||
|
|
"
|