81
rated 0 times
[
87]
[
6]
/ answers: 1 / hits: 5643
/ 4 Years ago, thu, may 21, 2020, 12:00:00
I'm trying to move a user when they react with a watermelon emoji to my embed.
I can get their user id when I use user.id
, but it doesn't work with
user.id.voice.setChannel(712142435794550894);
The error I'm getting is:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'setChannel' of undefined
This is the code I'm using:
const check = new MessageEmbed()
.setTitle(AFK CHECK)
.setColor(0xFF0000)
.setDescription(React with a `watermelon 🍉` PLS);
message.channel.send(check).then(sentEmbed => {
sentEmbed.react(🍉);
})
bot.on('messageReactionAdd', async(reaction, user) => {
let msg = reaction.message,
emoji = reaction.emoji;
const person = user.id;
if (emoji.name == '🍉' && user.id != 711388151960043582) {
message.channel.send(HI)
user.id.voice.setChannel(712142435794550894);
}
});
How do I move the users based on their id?
More From » node.js