Jipok / TelegramRetranslator

telegram client (telethon) that forwards all messages from the selected channels/chats to another one
MIT License
12 stars 3 forks source link

I have this error. Could not find the input entity for <telethon.tl.types.PeerUser object at 0x7f0fa6663cf8> #1

Closed eliafino closed 4 years ago

eliafino commented 4 years ago

root@server:/home/forward# python3 retranslator.py Traceback (most recent call last): File "retranslator.py", line 156, in <module> main() File "retranslator.py", line 147, in main client.send_message(BOT_ID, "/start") File "/usr/local/lib/python3.7/dist-packages/telethon/sync.py", line 39, in syncified return loop.run_until_complete(coro) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/usr/local/lib/python3.7/dist-packages/telethon/client/messages.py", line 697, in send_message entity = await self.get_input_entity(entity) File "/usr/local/lib/python3.7/dist-packages/telethon/client/users.py", line 437, in get_input_entity .format(peer) ValueError: Could not find the input entity for <telethon.tl.types.PeerUser object at 0x7f0fa6663cf8>. Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.

eliafino commented 4 years ago

Solved, just set right BOT ID

Jipok commented 4 years ago

In fact, there is no bot handler. And you can specify the id of any chat where you can write. Did you have a problem with my bot id?

eliafino commented 4 years ago

I have this error with this setting: BOT_ID = 355186733

With my ID BOT, working very good! Thank you very much for your job!!!

Jipok commented 4 years ago

Now the problem should be fixed