节点js中标记消息作者的问题

问题描述

尝试制作一个命令,在使用时会标记使用该命令的用户标记角色并添加两个反应。角色标记和反应有效,但我无法标记使用命令的人。如果是简单的语法错误或此应用程序的 message.author 格式错误,请提供任何想法,谢谢。

    client.on('message',message => {
    if (message.content === '!rankup')
        message.channel.send(' ${message.author} <@&869746450794418186>,is looking for rankup').then(sentMessage => {
            sentMessage.react('☑️');
            sentMessage.react('✅');
        });
});

解决方法

使用反引号,即

   //(`${variable} other strings`)


   `${message.author} <@&869746450794418186>,is looking for rankup`

代替双引号("")或单引号('')