【发布时间】:2019-11-25 19:41:42
【问题描述】:
我正在尝试收集用户对我的机器人消息的回复,但都在 DM 中。如何使用 Discord.js (12.0.0-dev) 的 master 分支完成这项任务?
我尝试使用以下代码收集消息:
const collector = new MessageCollector(
message.author.DMChannel,
(m) => m.author.id === message.author.id,
{ max: 1, time: 120000 },
);
const collector = message.author.dmChannel.createMessageCollector({
max: 1,
time: 120000,
});
这似乎是我需要的,但我只希望它返回用户发送的第一条消息。当我console.log() 结果时,总是undefined。
【问题讨论】:
标签: javascript node.js discord.js