Discord.js我如何让机器人对刚刚通过id发出的信息作出反应?

时间:2019-09-29 23:41:16

标签: javascript node.js discord discord.js

我如何让漫游器对刚刚通过ID不和谐发送的消息做出反应?

在这种情况下,我已经收到消息ID:

        if(inf.t !== "MESSAGE_UPDATE") return
        let here = inf.d.id;
         if(inf.d.id === `${here}`){
        message.channel.send(`${here}`);
        message.react("✅"); //this react is just to this reaction is only in 
                            //the message that I sent the command
         }
        });

1 个答案:

答案 0 :(得分:1)

使用.then(),如下所示:

message.channel.send(here).then(m => m..react("✅"))

more on .then() here