client.delete_dialog(chat_id)
But if I already in this chat, this not work:
chat_id = client.get_entity(f'https://t.me/joinchat/{hash}').id
client.delete_dialog(chat_id)
chat_id in both cases returns same. What can be wrong? Error: <class 'telethon.errors.rpcerrorlist.PeerIdInvalidError'> An invalid Peer was used. Make sure to pass the right peer type and that the value is valid (for instance, bots cannot start conversations) (caused by DeleteHistoryRequest)
version 1.27.0, small group (2ppl)
What is the library version, and what the chat type, looks like small group
Обсуждают сегодня