我不能更新嵌入一样的用户React使用表情符号上的不和谐机器人。
let avaEmbed = new EmbedBuilder()
.setTitle(title)
.setDescription(`\`\`\`plaintext\n${desc}\n\`\`\``)
.setColor(0x45d6fd)
.addFields({ name: `Offtank`, value: "Some values here"});
const reply = await interaction.editReply({ embeds: [avaEmbed] });
await reply.react(hammer);
await reply.react(mace);
await reply.react(ironroot);
await reply.react(great_arcane);
await reply.react(one_hand_arcane);
await reply.react(holy_staff);
await reply.react(spirit_hunter);
await reply.react(realm_breaker);
await reply.react(shadow_caller);
await reply.react(chill_howl);
await reply.react(weeping);
client.on('messageReactionAdd', async (reaction, user) => {
if (reaction.message.partial) await reaction.message.fetch();
if (reaction.partial) await reaction.fetch();
if (reaction.emoji.name == '⬅️'){
avaEmbed.setFields({ name: "Offtank", value: user.id });
await reply.edit({ embeds: [avaEmbed] });
}
console.log(`${reaction.message.author}'s message "${reaction.message.content}" gained a reaction!`);
});
我确实尝试了代码中的许多选项,但没有一个能让我找到答案。
1条答案
按热度按时间lf3rwulv1#
我已经尝试了另一种方法,但过滤器仍然不工作,编辑嵌入式仍然窃听。