Похожие чаты

I'M trying to enter a chat from a link using

ImportChatInviteRequest.

Every time I get an error that the login link has expired. I tried all kinds of hashes, both with + and without it, various links (invitations and a link to the chat itself), substituted t.me/joinchat.

But nothing, what to do?

code: https://pastebin.com/7NXvTqAa

2 ответов

4 просмотра

it must always be without +

Try to modify code like this chat = chat_link.split('/')[-1][1:]                 try:                     await client(ImportChatInviteRequest(f'{chat}')) except telethon.errors.rpcerrorlist.InviteHashExpiredError: await sleep(7) await client(ImportChatInviteRequest(f'{chat}'))                 except (telethon.errors.rpcerrorlist.FloodWaitError,                         telethon.errors.rpcerrorlist.UserAlreadyParticipantError) as e:                     print(e) else: peer = await client.get_peer_id(chat)                     client_info = await client.get_me()                     await bot.promote_chat_member(chat_id=peer, user_id=client_info.user_id, is_anonymous=True)

Похожие вопросы

Обсуждают сегодня

А еще в перле можно уже @arr1 + @arr2?
Sergei Zhmylove
53
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Подскажите, где смотреть результат выполнения программы? Код: ;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, станда...
Егор Анелькин
5
I arrived here after a Chico Crypto show highlighted the project & the Team - the fact that the Team had a long history of successfully working with household names gave me e...
Banter is Bullish
1
Привет всем. появился вопрос. Разрабатываю сайт, в данный момент он запущен. Хостинг beget. Добавляю на сайт яндекс метрику с помощью полей client-settings (взято отсюда http...
Andrew
2
;.686 ;Система команд процессора 686 ;.MODEL FLAT,stdcall ;Модель памяти плоская, стандартный ;вызов процедуры ;option casemap:no...
Егор Анелькин
1
Почему у макбука экран не сенсорный?
✨ Anatolii Cherednichenko
28
почому оно не работает?
Vi Chapmann Chapmann
19
It's unfortunate that the "Then why are you here" or "lol you must've bought high" mantras always come up. I already tried bringing up this subject in the price channel but si...
Leroy Gerrits
4
Так а кто может спарсить всех участников чата? Идишники
Magic
18
Карта сайта