我得到了以下代码行:
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
,但没有成功!
答案 0 :(得分:1)
使用异步并等待。
message.channel.send(upcomingEmbed).then(async embedMessage => {
await embedMessage.react('');
await embedMessage.react('');
});