1

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

kirill833
  • 23
  • 1
  • 5

2 Answers2

3

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()
W4RR10R
  • 101
  • 1
  • 4
1

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)
kirill833
  • 23
  • 1
  • 5