NodeJS Telegraf.js bot创建用户链接,但不提及用户

x4shl7ld  于 11个月前  发布在  Node.js
关注(0)|答案(1)|浏览(131)

我试图通过机器人发送消息,其中包含一个链接到用户配置文件,但问题是,这个消息使用户一个恼人的通知,与一个'@'图标在聊天组,有没有办法避免?

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

bvpmtnay

bvpmtnay1#

"✅  <b><a href='https://t.me/user?id={$id}'>{$name}</a></b>"

字符串
一年后才明白

相关问题