📜  discord.js 删除反应 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:54.657000             🧑  作者: Mango

代码示例2
const userReactions = message.reactions.cache.filter(reaction => reaction.users.cache.has(userId));

try {
    for (const reaction of userReactions.values()) {
        await reaction.users.remove(userId);
    }
} catch (error) {
    console.error('Failed to remove reactions.');
}