parse_mode=types.ParseMode.MARKDOWN

34 Views Asked by At

I just started learning python, can you tell me why the display is not correct, the links are displayed as a string

@dp.message_handler(chat_type=[types.ChatType.SUPERGROUP, types.ChatType.GROUP], commands=['admins'],
                    commands_prefix='!/')
async def get_admin_list(message: types.Message):
    admins = await message.chat.get_administrators()
    msg = str("Админы :\n")
    
    for admin in admins:
        msg += f"<a href=tg://user?id={admin.user.id}>{admin.user.full_name}</a>,"
    await message.reply(msg, parse_mode=types.ParseMode.MARKDOWN)

I tried changing types.ParseMode.HTML, but nothing works for me

0

There are 0 best solutions below