【发布时间】:2020-07-21 21:37:52
【问题描述】:
我正在尝试通过向左或向右做出反应来使页面正常工作。这行得通,但我似乎无法撤消用户的反应。它告诉我删除是未定义的
.then(sentEmbed => {
sentEmbed.react("⬅️"),
sentEmbed.react("➡️")
const filterLeft = (reaction, user) => reaction.emoji.name === '⬅️' && user.id === author;
const filterRight = (reaction, user) => reaction.emoji.name === '➡️' && user.id === author;
const collectorLeft = sentEmbed.createReactionCollector(filterLeft, { time: 15000 });
const collectorRight = sentEmbed.createReactionCollector(filterRight, { time: 15000 });
collectorRight.on('collect', r => {
currentMessage = sentEmbed.id,
client.channels.cache.get(channel).send(currentMessage),
sentEmbed.reaction.remove(author),
【问题讨论】:
-
小错字:sentEmbed.reactions(以 s 结尾)
标签: javascript discord discord.js