aahnik / tgcf

The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
https://github.com/aahnik/tgcf/wiki
MIT License
1.34k stars 796 forks source link

Channel Forward Bug #412

Open GeraldH88 opened 1 year ago

GeraldH88 commented 1 year ago

If Channel 1 Forward a Message/Video/Photo, the bot dont Forward it to Channel 2

aakash-code commented 1 year ago

i am facing same issue it is not working i dont know why because everthing is as described in video tutorial

karakuraizer commented 1 year ago

also there is no forwarding of messages sent by any other bot. if any user send\forward same message it works just fine. tried with and without user filter, same result and no logs on this(( upd FAQ sadly but bots cannot "see" other bots messages ( solved with human acc

and another one: when message contain some group of special symbols like '***' script catch an error and cannot send it. the only workaround is using replace filter (guess it is one of the reasons it exists)

log is in the end of comment

in my cases no attachments are used just text, using in live mode,with official docker image

and last but not least to make tgcf work i needed to gave my bot admin rights in supergroup it just do not have access to messages according to telegram app without those rights...still in live mode (may be you do not need a human acc to use tgcf in past mode , just make bot an admin and allow chat history for new members in group settings?)

log ``` ERROR Unhandled exception on updates.py:513 new_message_handler ╭─ Traceback (most recent call las─╮ │ /venv/lib/python3.10/site-packag │ │ es/telethon/client/updates.py:49 │ │ 7 in _dispatch_update │ │ │ │ 494 │ │ │ │ continue │ │ 495 │ │ │ │ │ 496 │ │ │ try: │ │ ❱ 497 │ │ │ │ await call │ │ 498 │ │ │ except errors. │ │ 499 │ │ │ │ name = get │ │ 500 │ │ │ │ self._log[ │ │ │ │ /venv/lib/python3.10/site-packag │ │ es/tgcf/live.py:53 in │ │ new_message_handler │ │ │ │ 50 │ for d in dest: │ │ 51 │ │ if event.is_reply │ │ 52 │ │ │ tm.reply_to = │ │ ❱ 53 │ │ fwded_msg = await │ │ 54 │ │ st.stored[event_ui │ │ 55 │ tm.clear() │ │ 56 │ │ │ │ /venv/lib/python3.10/site-packag │ │ es/tgcf/utils.py:43 in │ │ send_message │ │ │ │ 40 │ │ ) │ │ 41 │ │ return message │ │ 42 │ tm.message.text = tm.te │ │ ❱ 43 │ return await client.sen │ │ 44 │ │ 45 │ │ 46 def cleanup(*files: str) -> │ │ │ │ /venv/lib/python3.10/site-packag │ │ es/telethon/client/messages.py:8 │ │ 89 in send_message │ │ │ │ 886 │ │ │ │ schedule_ │ │ 887 │ │ │ ) │ │ 888 │ │ │ │ ❱ 889 │ │ result = await se │ │ 890 │ │ if isinstance(res │ │ 891 │ │ │ message = typ │ │ 892 │ │ │ │ id=result │ │ │ │ /venv/lib/python3.10/site-packag │ │ es/telethon/client/users.py:30 │ │ in __call__ │ │ │ │ 27 │ │ 28 class UserMethods: │ │ 29 │ async def __call__(sel │ │ flood_sleep_threshold=None │ │ ❱ 30 │ │ return await self. │ │ 31 │ │ │ 32 │ async def _call(self: │ │ flood_sleep_threshold=None │ │ 33 │ │ if flood_sleep_thr │ │ │ │ /venv/lib/python3.10/site-packag │ │ es/telethon/client/users.py:84 │ │ in _call │ │ │ │ 81 │ │ │ │ │ else: │ │ 82 │ │ │ │ │ │ re │ │ 83 │ │ │ │ else: │ │ ❱ 84 │ │ │ │ │ result │ │ 85 │ │ │ │ │ self.s │ │ 86 │ │ │ │ │ self._ │ │ 87 │ │ │ │ │ return │ ╰──────────────────────────────────╯ EntityBoundsInvalidError: Some of provided entities have invalid bounds (length is zero or out of the boundaries of the string) (caused by SendMessageRequest) ```
MaxAks commented 10 months ago

I have the same issue in my case problem was with this group of symbols in text of message '__' - it is 6 symbols of _ and only this code helped me if '______' in vacansy: # '______' problem symbols. vacansy = vacansy.replace("______", " _ _ _ ")