Here is my code
const reaction = m.reactions.cache.find(r => r.emoji.name == '🎉');
const userss = reaction.users.cache.random(1);
message.channel.send(`${userss} has won the giveaway!`);
The problem is that it won't show the user who won the giveaway, it just shows this:
Any Idea how to fix?
I need to know the context, apparently you did not assign a try/catch
to know why you are not displaying the user. Try writing a console.log()
in the userss variable to see what is returning!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.