【问题标题】:How to check if the original message sender reacts discord.js如何检查原始消息发件人是否对 discord.js 做出反应
【发布时间】:2021-03-23 16:25:06
【问题描述】:

我当前的代码是

            message.channel.send(dungeonEmbed).then(sentEmbed => {
                sentEmbed.react("⚔️")
            })

这会发送嵌入并做出反应,但我需要找出一种方法来检查原始消息发送者是否做出反应,然后用另一个替换嵌入

【问题讨论】:

标签: javascript node.js discord discord.js


【解决方案1】:

我不确定你想要什么。
如果作者对他自己的信息做出反应,我们猜你想要

client.on("messageReactionAdd", (reaction, user) => {
    if(reaction.message.id == "The message ID" && user.id == reaction.message.author.id){
        //The author and the original message has reacted
        if(reaction.emoji.name == "?"){
            //The author has reacted the specified emoji
        }
    }else{
        //Just in case
    }
})

请也检查一下这个Discord js check reaction user role

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-14
    • 1970-01-01
    • 1970-01-01
    • 2021-07-02
    • 2020-12-10
    • 2020-03-28
    • 1970-01-01
    • 2021-04-04
    相关资源
    最近更新 更多