Así que estoy tratando de hacer un sistema de modmail, pero por alguna razón el colector del canal está recopilando el mismo mensaje. ¡Cualquier ayuda sería genial!
const discord = require("discord.js") module.exports = { name: 'modmail', aliases: ['mail'], execute: async (client, message, args) => { const mes = await message.channel.send("I have sent you a dm.") const config = require("/home/runner/Bot2/Handlers/config.json") message.author.send("Start typing to chat with the moderators.") .then(async (msg) => { const filter = m => !m.author.bot; const collector = await msg.channel.createMessageCollector({ filter, }); const channel = await message.guild.channels.create(`${message.author.username}s-modmail`, { permissionOverwrites: [{ id: config.mainrole, deny: ["VIEW_CHANNEL"], }, ], }) collector.on("collect", m => { channel.send(`${m.author.tag}: ${m.content}`) const filter = mm => !mm.author.bot; const channelcollect = channel.createMessageCollector({ filter, max: 1, }); if (m.content == "?mmclose") { m.reply("Modmail will be closing.") collector.stop() } channelcollect.on("collect", async mm => { if (mm.content == "?mmclose") { return channel.delete() } m.author.send(`${mm.author.tag}: ${mm.content}`) console.log(mm.content) }) }) }) .catch(error => { mes.delete() message.reply("Something went wrong. Make sure your dms are open. If this happens if when your dms are on then dm !Kweeper#8053") }) } }No sé por qué sucede esto porque configuré los mensajes máximos en 1 y el colector dm max en 1, pero rompe el código.