MetaTrader5-Docker-Image/check_channel_ids.sh
bast 82fb1e2251
Some checks failed
MT5 Stack Deploy / deploy (push) Failing after 52s
update logging
2026-11-10 20:53:16 +01:00

18 lines
563 B
Bash
Executable file

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())
"