gpt4 book ai didi

javascript - Discord.js 如何让机器人对它刚刚通过 id 在 Discord 中发送的消息使用react?

转载 作者:行者123 更新时间:2023-12-02 22:51:36 30 4
gpt4 key购买 nike

如何让机器人对它刚刚通过 id 以不和谐的方式发送的消息使用react?

在本例中,我已经获得了消息 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

关于javascript - Discord.js 如何让机器人对它刚刚通过 id 在 Discord 中发送的消息使用react?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58160040/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com