Discord.js Help editing an embed

Hello, Currently I am trying to build an idea that I have had, the idea is a command is used and then a user is able to react to the embed that the command / bot will provide. I then want to be able to get the username for the user that reacted to the embed and then update the embed with the user and add them to the description.

This will be for users to then have a battle based on their current role that they clicked. This will not assign them a role I only want it to get the username and add it to the embed. However I am unsure on how to edit the embed with the user that reacted.

Client.on(“messageReaction”, async (reaction, user) => {
if (reaction.message.partial) await reaction.message.fetch();

if (user.Client) return;
if(!reaction.message.guild) return;

if(reaction.message.channel.id === “786271210585456670”) {
if (reaction.emoji.name === ‘:1st_place_medal:’){
await reaction.message.guild.members.cache.get(username)
}
}
if(reaction.message.channel.id === “786271210585456670”) {
if (reaction.emoji.name === ‘:2nd_place_medal:’){
await reaction.message.guild.members.cache.get(username)
}
}
if(reaction.message.channel.id === “786271210585456670”) {
if (reaction.emoji.name === ‘:3rd_place_medal:’){
await reaction.message.guild.members.cache.get(username)
}
}
if(reaction.message.channel.id === “786271210585456670”) {
if (reaction.emoji.name === ‘:medal_sports:’){
await reaction.message.guild.members.cache.get(username)
}
}
if(reaction.message.channel.id === “786271210585456670”) {
if (reaction.emoji.name === ‘:medal_military:’){
await reaction.message.guild.members.cache.get(username)
}
}
});

This is one part of the code that i have but as you can see I am stuck on the await reaction.message.guild.members.cache.get(username)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.