Discord.js 如何获得3次用户提及不和谐js

Discord.js 如何获得3次用户提及不和谐js,discord.js,Discord.js,我正在执行一个测试命令,其中bot将3次提到用户,然后再提到他们,但是,第二个用户(user2)总是返回undefined。 我试过几种方法,但都不管用 到目前为止我得到了什么: let user1=message.indications.users.first(); 让user2=message.indications.users.find((i)=>i==args[1]); 让user3=message.indications.users.last(); const embed=new Di

我正在执行一个测试命令,其中bot将3次提到用户,然后再提到他们,但是,第二个用户(user2)总是返回
undefined
。 我试过几种方法,但都不管用

到目前为止我得到了什么:

let user1=message.indications.users.first();
让user2=message.indications.users.find((i)=>i==args[1]);
让user3=message.indications.users.last();
const embed=new Discord.MessageEmbed()
.setColor(“绿色”)
.setDescription(`${user1}-${user2}${user3}`);
message.channel.send(嵌入);

您似乎在告诉代码在提及中查找提及,这是不可能的。为什么不直接将
user2
设置为
args[1]

const user2 = args[0];
这在理论上应该是可行的

更新:是的,将description设置为args本身确实会返回提及,我刚刚测试了它:

const testEmbed = new Discord.MessageEmbed()
  .setDescription(args[1]);
  message.channel.send(testEmbed);

在中查看我的答案,因为我没有考虑它“-”,谢谢@Kub_luk没问题,很乐意帮助!