【发布时间】:2020-04-27 05:20:40
【问题描述】:
在我的不和谐机器人中,我有一个打乱单词的命令,第一个在聊天中做出响应的用户会获得奖励。我已经发出了等待消息回复的命令,但是我怎样才能保存回复的人呢?到目前为止,这是我的代码
authorID = msg.author.id;
const filter = response => {
return response.author.id === authorID;
}
msg.channel.awaitMessages(filter, {
max: 1,
time: 5000
})
.then(mg2 => {
if (mg2.first().content === "1") {
msg.channel.send("you said 1");
}
});
【问题讨论】:
标签: node.js discord.js