skip to Main Content

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

2

Answers


  1. Chosen as BEST ANSWER

    Solved the problem like this:

        @dp.chat_join_request_handler()
        async def echo(message: types.Message):
             await bot.approve_chat_join_request(
                          message.chat.id,                                   
                          message.from_user.id)
    

  2. 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()
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search