diff --git a/deploy/Dockerfile b/deploy/Dockerfile new file mode 100644 index 0000000..9b43e8c --- /dev/null +++ b/deploy/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN apk add python3 py3-pip diff --git a/src/bot.py b/src/bot.py new file mode 100644 index 0000000..d6e73f3 --- /dev/null +++ b/src/bot.py @@ -0,0 +1,11 @@ +from telethon.sync import TelegramClient, events + +with TelegramClient('name', api_id, api_hash) as client: + client.send_message('me', 'Hello, myself!') + print(client.download_profile_photo('me')) + + @client.on(events.NewMessage(pattern='(?i).*Hello')) + async def handler(event): + await event.reply('Hey!') + + client.run_until_disconnected() \ No newline at end of file