I have a waifu command where it gets an image and a name and puts it in a embed, it also then reacts with the emoji. I wanted to make it so the first person who clicked the emoji would claim the waifu.
It works, but if for example I do /waifu, it sends the embed and says (waifuname) was claimed, but whenever I do /waifu again, everything is the same, but when I click the react button, it says that the previous and the current waifu was claimed.
your var mg = await message.channel.send(embed2); is not set up correctly and in turn is using message.channel.send(embed2) witch will resend your embed twice. hope this helped and sorry this is late
the only reason I know this is because I ran into the same problem in my code. Im still getting help form some of my friends and I will respond when I get a responce. Sorry about that. I will respond when I get answer.
try to put the var witch I would suggest changing to let or const somewhere else like in a if statment. my code that I am having a problem with I cant move anything because im also using a embed but cant move the embed for that will cause another problem and I cant move my mg react because it is on a .then so if you are able to move it into a if statment that should fix it. if not try adding it to a else statment. Hope this helped
Another way to fix I would to just get ride of the code that sends the embed in the first place and use your var mg = await message.channel.send(embed2); for both sending the embed and then also making it a var agin you should change this to let or const.
add await in front of mg.react(โโ) and also go into all of your code it looks like you have more than one folder and fine were u send the embed2 for the first time. because if your getting 2 responses your getting one from you await and one from something else and just altogether get rid of the first one
you havenโt said if it worked or not so im going to explain a little more. This is my code.
channel.send( <@&738598824385445938> <@&738597461597356053> \n ${message.author} application, exampleEmbed);
and after that is my
var msg = await message.channel.send( <@&738598824385445938> <@&738597461597356053> \n ${message.author} application, exampleEmbed); and after that is my msg.react(โโ)
What i ended up doing is removing my channel.send( <@&738598824385445938> <@&738597461597356053> \n ${message.author} application , exampleEmbed);
and kept my message await witch also sent the message. the only problem was then my reaction wouldnโt send so in front of your mg.react you need to add await mg.react witch should send it and fix your code. sorry that this is so long and I hoped it worked. -Carson