skip to Main Content

how i can restore sessions old in telethon telegram and connect this again(without send again code)) – Telegram API

i use this script for connect and create sessions in telethon from telethon import TelegramClient from telethon.tl.functions.messages import GetHistoryRequest from telethon.utils import get_input_peer api_id = 7**** api_hash = 'ef584d*****************' client = TelegramClient('+15159947451', api_id, api_hash) client.connect() if not client.is_user_authorized(): client.send_code_request('+15159947451') client.sign_in('+15159947451',…

VIEW QUESTION

how i can send message to my contact whit telethon API python telegram – Telegram API

when i use this command for see contact : result = client.invoke(GetContactsRequest("")) print(result) i see this result : (contacts.contacts (ID: 0x6f8b8cb2) = (contacts=['(contact (ID: 0xf911c994) = (user_id=334412783, mutual=False))'], users=['(user (ID: 0x2e13f4c3) = (is_self=None, contact=True, mutual_contact=None, deleted=None, bot=None, bot_chat_history=None, bot_nochats=None, verified=None,…

VIEW QUESTION

Telethon: delete a message – Telegram API

I am trying to delete a message using telegram API and Telethon. Here is my code: from telethon import InteractiveTelegramClient from telethon.tl.types.input_peer_channel import InputPeerChannel from telethon.tl.functions.messages.delete_messages import DeleteMessagesRequest #... total_count, messages, senders = client.get_message_history( chat, limit=1) msg = messages[0] result…

VIEW QUESTION
Back To Top
Search