Official Telethon's chat! Rules: • Speak English • Stay on topic (questions about Telethon) • Be respectful • Don't ask to ask • Spam-related uses lead to ban • Read https://docs.telethon.dev before asking things here Read more about us @TelethonUpdates
async def connect(self: TelegramClient, timeout: int = 20) -> None:
sleep_time = 5
for attempt in range(2):
try:
await asyncio.wait_for(super().connect(), timeout)
return True
except OSError:
return print(f"Connection failed {self._phone}")
except TimeoutError:
self._proxy = None
print(
f"Connection timeout, retrying in {sleep_time}, {attempt} attempt."
)
await asyncio.sleep(sleep_time)
from telethon import functionsЧитать полностью…
link = 'your invite link'
hash = link.split('+')[-1]
result = await client(functions.messages.ImportChatInviteRequest(
hash=hash
))
print(result) # return Updates
How to mark private chat messages as read, with just the username of the entity, and not the message ids?
Читать полностью…Hey I am getting IncompleteReadError anyone can help ?
Читать полностью…Both can be used. Which one is more recommended under the user client
Читать полностью…When opening a conversation in telethon.tl.custom.conversation, does the group id need to start with -100 (-100123456789) or can it be 123456789? Which one is the least expensive or more recommended?
Читать полностью…My private vc joiner this issue coming can anyone please help
Читать полностью…To remove proxy from a telethon.TelegramClient object (Trying to connect without proxy after i tried with proxy)
Is it enough to just do obj._proxy = None
Or i have to init (create) the object again without the proxy?
Did you code the script? You'll need to edit a small part
Читать полностью…I have an issue I can't reproduce on my own
Receiving an album from a particular channel with a lot of subscribers only receives the first image from the album (at least that's what I think is happening) or is there anything like an album event?
telethon run get_entity for int
so that ,same for you
English please, this looks like advertisment and spam
Читать полностью…You're trying to join a private group with a method intended for public groups
Читать полностью…You joined your private group vc wrong, that username doesn't exist
Читать полностью…