title: How to let the TelegramBot forward the channel's message to the specified group?
body: <p>The following code implements the forwarding of album to the specified group.</p>
  <p>The trigger in the comments section implements forwarding all messages to the specified group,
  but the &quot;<strong>grouped_id</strong>&quot; will be lost, preventing the images from being forwarded as a album.</p>
  <p>How do I modify this bot to have the same(almost?) forwarding effect as the Telegram associated groups feature?</p>
  <p>thanks every one!</p>
  <pre class="lang-py prettyprint-override"><code>import json
  from logging.config import listen
  from pyparsing import Forward
  from requests import session
  import telethon
  import asyncio
  from telethon import TelegramClient,events
  with open('d_forwardMessage.json') as f:
      config = json.load(f)
      api_id = config['api_id']
      api_hash = config['api_hash']
      bot_token = config['bot_token']
      sessionName = config['sessionName']
      listenChannel = config['listenChannel']
      ForwardTo = config['ForwardTo']
  
  
  bot = TelegramClient(sessionName, api_id, api_hash).start()
  
  
  async def send(listenChannel,ForwardTo):
  
  
      print('Start in {}'.format(ForwardTo))
  
      @bot.on(events.Album(chats=listenChannel))
      async def albumHandler(event):
          # print(event)
          print('albumHandler')
          sended = await event.forward_to(ForwardTo)
  
      # @bot.on(events.NewMessage(chats=listenChannel))
      # async def messageHandler(event):
      #     # print(event)
      #     sended=await event.forward_to(ForwardTo)
      #     print(sended)
        
  
  
    
      await bot.run_until_disconnected()
  
  asyncio.get_event_loop().run_until_complete(send(listenChannel,ForwardTo))
  </code></pre>