Javascript 只对表情符号做出一次反应-Discord.js
我正在开发这个机器人,我希望用户能够在表情符号中只做出一次反应,如果他在其他时间做出反应,那么命令就不起作用。有人能帮我吗Javascript 只对表情符号做出一次反应-Discord.js,javascript,discord,discord.js,Javascript,Discord,Discord.js,我正在开发这个机器人,我希望用户能够在表情符号中只做出一次反应,如果他在其他时间做出反应,那么命令就不起作用。有人能帮我吗 let messagereturn = await message.channel.send(embed); await messagereturn.react('The createReactionCollector method has an optional options object, and it allows you to set the max react
let messagereturn = await message.channel.send(embed);
await messagereturn.react('The createReactionCollector
method has an optional options
object, and it allows you to set the max reactions to collect, which in your case is 1.
example:
const collector = messagereturn.createReactionCollector(filter, { max: 1 })
let messagereturn=wait message.channel.send(嵌入);
wait messagereturn.react('createReactionCollector
方法有一个可选的options
对象,它允许您设置要收集的最大反应,在您的情况下为1
例如:
Java和JavaScript是两种独立的语言