Hi there! I'm currently working on building a key bot for my website, but I keep encountering this error UNCAUGHT EXCEPTION - keeping process alive: TypeError: Cannot read properties of undefined (reading 'client') along with another one related to 'type'. I've tried various solutions like removing code beforehand (I've tried to delete stuff like before it was), but the error persists. Here's the specific code snippet causing the issue:
let a = "`"
const tosend = new Discord.MessageEmbed(client)
.setColor('#0099ff')
.setTitle('Whitelist')
.setDescription(`Your Key Is ${a}${key}${a}`)
.setFooter("TIP: Always save your key, you cannot use until registered")
Below is the reported error message:
UNCAUGHT EXCEPTION - keeping process alive: TypeError: Cannot read properties of undefined (reading 'type')
at MessageEmbed.setup(...)
...
I managed to resolve the issue by updating discord.js and switching from Discord embed to RichEmbed. Thank you for all the assistance provided!