Discord.js我如何使漫游器对刚刚通过id不一致发送的消息作出反应?
我如何让漫游器对它刚通过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
}
});
回答如下:使用.then()
,如下:
message.channel.send(here).then(m => m..react("✅"))
more on .then() here
Discord.js我如何使漫游器对刚刚通过id不一致发送的消息作出反应?
我如何让漫游器对它刚通过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
}
});
回答如下:使用.then()
,如下:
message.channel.send(here).then(m => m..react("✅"))
more on .then() here