Carson1

Untitled

Nov 25th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. import telethon
  2. from telethon import sync, events
  3. from telethon.sync import TelegramClient
  4. from telethon.tl.functions.channels import JoinChannelRequest
  5. from telethon.tl.functions.messages import GetHistoryRequest
  6.  
  7. api_id = 1067025
  8. api_hash = "33b7c948b0a65e795aee2effa51af4a7"
  9. tg_client = TelegramClient('89850736471', api_id, api_hash)
  10. while n != 1:
  11.     @tg_client.on(events.NewMessage(chats=('@specially_for_Sanya')))
  12.     async def normal_handler(event):
  13.         print(event.message)
  14.  
  15. tg_client.start()
Advertisement
Add Comment
Please, Sign In to add comment