Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import telethon
- import asyncio
- import time
- from telethon import TelegramClient, sync
- from telethon.sync import TelegramClient, events
- my.telegram.org
- api_id =
- api_hash = ''
- message = '<füge Text ein>'
- client = TelegramClient('bebra', api_id, api_hash)
- client.start()
- print(client.get_me().stringify())
- print('Account is valid')
- @client.on(events.NewMessage)
- async def handler(event):
- time.sleep(3)
- await event.reply(message)
- time.sleep(10)
- client.run_until_disconnected()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement