Search code examples
pythontelegramtelegram-botpython-telegram-bot

Is it possible to forward whole chat/group posts using telegram bot?


I'm using the python-telegram-bot library to write a bot in Python that forwards all group posts to another group where the bot is administrator.

Is there any method that I could use to access all posts of a group/chat?

something like this?

async def forward_messages(update: Update, context: ContextTypes.DEFAULT_TYPE):
    chat = await context.bot.get_chat("<group-id>")
    #get_messages??

Solution

  • No, there is not. The methods available for bots are listed in Telegrams Bot API documentation.