Ошибка при создании секретного чата
Использую следующую библиотеку - https://github.com/painor/telethon-secret-chat
В контактах пользователь с которым хочу создать чат добавлен, сам юзербот успешно логинится.
Получаю ошибку telethon.errors.rpcerrorlist.PeerFloodError: Too many requests (caused by RequestEncryptionRequest)
from telethon import TelegramClient
from telethon_secret_chat import SecretChatManager
client = TelegramClient(app_name, api_id, api_hash)
async def new_chat(chat, created_by_me):
if created_by_me:
print("User {} has accepted our secret chat request".format(chat))
else:
print("We have accepted the secret chat request of {}".format(chat))
manager = SecretChatManager(client, auto_accept=True,
new_chat_created=new_chat)
async def main():
async def start_chat():
await manager.start_secret_chat(peer='some_user-')
await start_chat()
with client:
client.loop.run_until_complete(main())