我想为特定通道创建一个消息收集器以记录所有消息,问题是我获得了通道ID,并创建了一个收集器,但是它抛出了该函数不存在的错误。
client.once("ready", () => {
console.log(`Logged in as ${client.user.tag}!`);
btcValue().then((value) => {
client.user.setActivity(`BTC: ${value}`);
});
const filter = (m) => m.content.includes("discord");
const channelGeneral = client.channels.fetch("CHANNEL_ID");
console.log(channelgeneral);
const collector = channelGeneral.createMessageCollector(filter);
collector.on("collect", (m) => {
console.log(`Cocollector: ${m.content}`);
});
});