Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to copy restricted content. Works for non-restricted. #70

Open
PBhadoo opened this issue Jan 23, 2023 · 3 comments
Open

Comments

@PBhadoo
Copy link

PBhadoo commented Jan 23, 2023

[WARNING/2023-01-23 04:51:50,927] pyrogram.types.messages_and_media.message: Empty messages cannot be copied. 
[ERROR/2023-01-23 04:51:58,502] telethon.client.updates: Unhandled exception on sett
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/telethon/client/updates.py", line 467, in _dispatch_update
    await callback(event)
  File "/home/bhadoo/bot/main/plugins/start.py", line 19, in sett
    x = await conv.get_reply()
  File "/usr/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError
[WARNING/2023-01-23 04:52:40,858] pyrogram.types.messages_and_media.message: Empty messages cannot be copied.

Trying to copy https://t.me/jee_lecture_seller/393

Working for Private Channel. Not working for Public Channel with Restricted Content

recommended solution. use getChat to get chats id and then process link like.
https://t.me/c/1548412289/394 (https://t.me/jee_lecture_seller/393)

@PBhadoo
Copy link
Author

PBhadoo commented Jan 24, 2023

it is know to not work for some public chat groups bcuz msg of those groups cant be retrived by bots which are not admin in that group it works when trying to get msg using userbot ( you have to donwload(userbot) and upload(bot))

it is also know to not work on public channels with forword on when the forwords are closed for file (when file is sent using bot (protect_content=true) )

https://t.me/jee_lecture_seller/393 is same as https://t.me/c/1548412289/394

I've just updated chat id. it works if we use the channel id instead of username.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@PBhadoo and others