Search code examples
pythontelethonaiogram

Accept a request to subscribe to a private telegram channel via aiogram


There is a task to confirm subscription requests in the telegram channel using a bot. If anyone knows how to do this through aiogram or telethon


Solution

  • There are bound methods approve() and decline() that can be used with chat_join_request_handler()

    @dp.chat_join_request_handler()
    async def join(update: types.ChatJoinRequest):
        await update.approve()