简体   繁体   中英

Why is it not showing the user? discord.js

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM