29
rated 0 times
[
35]
[
6]
/ answers: 1 / hits: 6805
/ 4 Years ago, fri, may 29, 2020, 12:00:00
I am trying to make a Discord.js giveaway command that send an embed, save it to the variable embedSent then collect the reactions after the TimeOut with the reactions.get()
method, but I keep getting the error TypeError: embedSent.reactions.get is not a function
Here is the part of my code :
var embed = new Discord.MessageEmbed();
embed.setColor(0x3333ff);
embed.setTitle("Nouveau Giveaway !");
embed.setDescription("**" + item + "**");
embed.addField(`Durรฉe : `, ms(ms(time), {
long: true
}), true);
embed.setFooter("Rรฉagissez ร ce message avec ๐ pour participer !");
var embedSent = await message.channel.send(embed);
embedSent.react("๐");
setTimeout(function () {
var peopleReacted = embedSent.reactions.get("๐").users.filter(user => user.id !== client.user.id).array()
}, time);
More From » bots