Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
817 B
2
Indexable
Never
from telethon import TelegramClient

# Use your own values from my.telegram.org
api_id = input("your api id")
api_hash = input("your api hash")

# The first parameter is the .session file name (absolute paths allowed)
# with TelegramClient('anon', api_id, api_hash) as client:
#      client.loop.run_until_complete(client.send_message('@Dogyuz_bot', 'hi'))
# with TelegramClient('84765207428', api_id, api_hash) as client:
#      client.loop.run_until_complete(client.send_message('@Dogyuz_bot', '/start'))

from telethon.sync import TelegramClient
from telethon.tl import functions


client = TelegramClient('84522668361', 3816657 , '5c4635003dec00ee8669f7a55d9bc08a',)
client.start('84522668361')
res = client(functions.messages.StartBotRequest('@Dogyuz_bot', '@Dogyuz_bot', 'start=r08501622270'))