Telegraf.js 机器人创建用户链接而不提及用户

问题描述 投票:0回答:1

我正在尝试通过机器人发送包含用户个人资料链接的消息,但问题是,该消息向用户发出烦人的通知,并在聊天组中带有“@”图标,有没有办法避免这种情况?

        const msg = data?.sort((a, b) => b.rating - a.rating)
      .reduce((acc, item, index) => {
        if (index > 14) return acc;

        acc += `🌟 <a href="tg://user?id=${item.user_id}"><b>${item.user_name}</b></a> - ${item.rating}\n`;
  
        return acc;
      }, '');
    ctx.replyWithHTML(`Top 15 gamers:
${msg}`, { disable_notification: true }).catch((err) => console.error(err));

that icon

node.js bots telegram telegraf mention
1个回答
0
投票
"✅  <b><a href='https://t.me/user?id={$id}'>{$name}</a></b>"

一年后发现了

© www.soinside.com 2019 - 2024. All rights reserved.