/* * ERROR: Collection(0) [Map] {} */ const captcha = new Captcha(); captcha.toBufferSync = false; captcha.addDecoy() captcha.drawTrace() captcha.drawCaptcha() const captchaAttachment = new MessageAttachment( await captcha.png, "captcha.png" ) const captchaEmbed = new MessageEmbed() .setTitle(`${captcha.text}`) .setDescription('Please Complete this captcha') .setImage('attachment://captcha.png') const msg = await member.send({ files: [captchaAttachment], embeds: [captchaEmbed] }).catch((err) => console.log) const filter = (message) => { if(message.author.id !== member.id) return; if(message.content === captcha.text) return true; else member.send("Wrong Captcha").catch((err) => console.log) } try { const response = await msg.channel.awaitMessages( { filter, max: 1, time: 10000, errors: ["time"]} ) if(response) { member.roles.add(`${req.roleID}`).catch((err) => console.log) member.send("You have been verified").catch((err) => console.log) } } catch (err){ await member.send("You have not verified and I need to kick you. If you wanted to join again. Please answer the captcha thanky you.").catch((err) => console.log) member.kick("Have not answered captcha").catch((err) => console.log) } }) /* after changing this code line: await member.send("You have not verified and I need to kick you. If you wanted to join again. Please answer the captcha thanky you.").catch((err) => console.log) member.kick("Have not answered captcha").catch((err) => console.log) to console.log(err) then this appeared ERROR: Collection(0) [Map] {} */