Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import telethon
- from telethon import sync, events
- from telethon.sync import TelegramClient
- from telethon.tl.functions.channels import JoinChannelRequest
- from telethon.tl.functions.messages import GetHistoryRequest
- api_id = 1067025
- api_hash = "33b7c948b0a65e795aee2effa51af4a7"
- tg_client = TelegramClient('89850736471', api_id, api_hash)
- while n != 1:
- @tg_client.on(events.NewMessage(chats=('@specially_for_Sanya')))
- async def normal_handler(event):
- print(event.message)
- tg_client.start()
Advertisement
Add Comment
Please, Sign In to add comment