hi, got a new error again. Here is the error msg
TypeError: Cannot read property 'ready' of undefined
at Object.run (/app/events/uncaughtException.js:5:15)
at process.emitter.(anonymous function).args (/app/lenoxbot.js:95:23)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:496:27)
It seems that the error was occured from events/uncaughtExeption.js. here is the code:
module.exports = {
emitter: process,
run: (error, client) => {
if (!client.ready || !client.settings || !client.settings.log_channels || !client.settings.log_channels.errors || !error) return;
let errorMsg = (error ? error.stack || error : '').toString().replace(new RegExp(`${__dirname}\/`, 'g'), './');
if (client.channels.has(client.settings.log_channels.errors)) client.channels.get(client.settings.log_channels.errors).send(null, {
embed: {
color: 15684432,
timestamp: new Date(),
title: 'Uncaught Exception',
description: `\`\`\`x86asm\n${errorMsg.slice(0, 2048)}\n\`\`\``,
fields: [
{
name: 'Error Name:',
value: `\`${error.name || 'N/A'}\``
}, {
name: 'Error Message:',
value: `\`${error.message || 'N/A'}\``
}
]
}
}).catch(console.error);
}
}