LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
9.68k stars 1.38k forks source link

PeerFloodError #1399

Closed JepsonHerts closed 4 years ago

JepsonHerts commented 4 years ago

When i make new userbot and try to message an user, it give me this error:

  File "prova2.py", line 26, in <module>
    client(SendMessageRequest(peer="JepsonHerts", message="Sei un grande"))
  File "/root/.local/lib/python3.6/site-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/root/.local/lib/python3.6/site-packages/telethon/client/users.py", line 74, in __call__
    result = await future
telethon.errors.rpcerrorlist.PeerFloodError: Too many requests (caused by SendMessageRequest)
Lonami commented 4 years ago

Not a bug, RPC errors are raised as intended.

JepsonHerts commented 4 years ago

How can i resolve?