簡體   English   中英

如何檢查原始消息發送者是否有反應 discord.js

[英]How to check if the original message sender reacts discord.js

我目前的代碼是

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

這會發送嵌入並做出反應,但我需要找出一種方法來檢查原始消息發件人是否做出反應,然后用另一個替換嵌入

我不確定你想要什么。
如果作者對他自己的信息做出反應,我們猜你想要

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 檢查反應用戶角色

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM