on-internet
← Community

How to copy other telegram channel messages to your telegram channel using aiogram

Stack Overflow ·

I want to forward messages from other telegram channels to my channel without being an admin of the other channels. This code below does not work because I can't add the bot to other channel. from aiogram import Bot, types, Dispatcher, executor bot = Bot(token='mybottoken') dp = Dispatcher(bot) @dp.message_handler(content_types=types.ContentType.ANY) async def copy_all_messages(message: types.Message): from_chat_id = message.chat.id # the ID of the channel from where messages are copied to_chat_id = '-##############' # the ID of the channel where messages are pasted message_id = message.messag

Comments

Sign in or sign up to comment and upvote.

No comments yet.