我得到了以下代码行:

if (command === 'upcoming') {
  if (message.member.roles.find('name', 'Lúcifer')) {
    const change = args.join(' ');
    message.delete().catch(O_o => {});
    const upcomingEmbed = new Discord.RichEmbed()
      .setColor('#FFAA44')
      .setAuthor('Trench: Changelog and upcoming', `${client.user.avatarURL}`)
      .addField('Upcoming:',
        `${change}`)
      .setFooter('Powered by FullGaamer')
      .setTimestamp();

    message.channel.send(upcomingEmbed).then(embedMessage => {
      embedMessage.react('👍');
      embedMessage.react('👎');
    });
  } else {
    message.channel.send('Você não tem permissão para utilizar deste comando.');
  }
}


👍和👎反应会随机显示,但我希望它们始终按此顺序显示!

我尝试在await之前使用embedMessage并没有成功!

最佳答案

使用异步并等待。

message.channel.send(upcomingEmbed).then(async embedMessage => {
    await embedMessage.react('👍');
    await embedMessage.react('👎');
});

10-08 02:44