edrickrenan / telegram-forwarder

9 stars 7 forks source link

Messages Not Forwarding From Source "Bot" ! #4

Open mdm095 opened 2 years ago

mdm095 commented 2 years ago

Hello ! There !

new issue found !

List of issues:

  1. cant able to forward messages from the source bot (which having "coping and forwarding restriction" )!
  2. Forwarded message text shows "forwarded tag" on destination channel! (Pls Remove Forward Tag)
  3. Channels which are having "coping and forwarding restriction" not fowarding chats ! showing this below errors

2022-05-20 02:08:31 ERROR Telegram says: [400 CHAT_FORWARDS_RESTRICTED] - The chat restricts forwarding content (caused by "messages.ForwardMessages")

eliafino commented 2 years ago

Hi, have you last version? Please launch git pull 😉

mdm095 commented 2 years ago

Its already Up to date (Already Git Pulled)

eliafino commented 2 years ago
  1. Fixed by last version of main.py
  2. For me forwarded tag needed to know what channel the message comes from
  3. In new version of main.py in case of forward error, bot copy paste original message.
mdm095 commented 2 years ago

for your concern am testing the script right now ! still facing the same error ! Git pulled and repo is up to date ! 2022-05-20 03:35:34 ERROR Telegram says: [400 CHAT_FORWARDS_RESTRICTED] - The chat restricts forwarding content (caused by "messages.ForwardMessages")

  1. how can we remove the forward tag (i will change that locally)
  2. Still Same error
mdm095 commented 2 years ago

if i add line 21 : line21 Messages are not being forwarded ! getting below error !

Traceback (most recent call last):
  File "/home/mdm/.local/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 242, in handler_worker
    await self.loop.run_in_executor(
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "main.py", line 21, in run
    Logger.info(f"Message Incoming - from {message.sender_chat.id, message.sender_chat.title}")
AttributeError: 'NoneType' object has no attribute 'id'
'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "/home/mdm/.local/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 242, in handler_worker
    await self.loop.run_in_executor(
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "main.py", line 21, in run
    Logger.info(f"Message Incoming - from {message.sender_chat.id, message.sender_chat.title}")
AttributeError: 'NoneType' object has no attribute 'id'
'NoneType' object has no attribute 'id'
Traceback (most recent call last):
  File "/home/mdm/.local/lib/python3.8/site-packages/pyrogram/dispatcher.py", line 242, in handler_worker
    await self.loop.run_in_executor(
  File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "main.py", line 21, in run
    Logger.info(f"Message Incoming - from {message.sender_chat.id, message.sender_chat.title}")
AttributeError: 'NoneType' object has no attribute 'id'

if i remove this line : line21

Messages are being forwarded (works when no Copying forwarding restricted)

getting this error ERROR Telegram says: [400 CHAT_FORWARDS_RESTRICTED] - The chat restricts forwarding content (caused by "messages.ForwardMessages")

eliafino commented 2 years ago

Can you try to clone into new directory? You took a look at the contents of your current file main py?

eliafino commented 2 years ago

Mmm, are you trying to forward messages from another bot? Is the source a bot?

mdm095 commented 2 years ago

Mmm, are you trying to forward messages from another bot? Is the source a bot?

Yes ! am trying to forward the messages from the bot (source) ! and the source (bot) having "copying and forward restriction"

mdm095 commented 2 years ago

Can you try to clone into new directory? You took a look at the contents of your current file main py?

Manually copy pasted the Main.py to my local source still getting the same error!

eliafino commented 2 years ago

Mmm, are you trying to forward messages from another bot? Is the source a bot?

Yes ! am trying to forward the messages from the bot (source) ! and the source (bot) having "copying and forward restriction"

Oh, ok... from bot. This changes everything 😅

mdm095 commented 2 years ago

Mmm, are you trying to forward messages from another bot? Is the source a bot?

Yes ! am trying to forward the messages from the bot (source) ! and the source (bot) having "copying and forward restriction"

Oh, ok... from bot. This changes everything sweat_smile

some function is working fine! some messages are having "copy forward disabled" in same chat (source) which is getting forwarded from bot (source) unless i removed line21 !

some messages which are "copying forward restricted" not getting forward from bot (source)!

Note: iam mentioning about same chat scenario which is bot chat as (source channel)