vasusen-code / SaveRestrictedContentBot

Stable telegram bot to save Restricted content with custom thumbnail support.
GNU Affero General Public License v3.0
1.54k stars 2.77k forks source link

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

Open PBhadoo opened 1 year ago

PBhadoo commented 1 year ago
[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 commented 1 year ago

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.