【发布时间】:2022-01-12 17:49:17
【问题描述】:
我想从对特定消息有反应的用户那里获取随机用户 ID。
await msg.react("<:SenkoSad:788848057844367411>")
setTimeout(()=> {
const winner = msg.reactions.cache.get("<:SenkoSad:788848057844367411>").users.cache.random().id
message.channel.send(`Random user from emotes: <@${winner}>`)
}, time-Date.now())
这里是错误:
TypeError: Cannot read properties of undefined (reading 'users')
在线const winner = msg.reactions.cache.get("<:SenkoSad:788848057844367411>").users.cache.random().id
【问题讨论】:
标签: node.js discord discord.js bots