Error handling broke things

This commit is contained in:
Skylar Grant 2022-06-09 18:31:34 -04:00
parent 136fdaa221
commit de0324c854

13
main.js
View File

@ -191,14 +191,8 @@ client.on('messageCreate', message => {
if (lowerContent.includes('ligma')) message.reply('ligma balls, goteem'); if (lowerContent.includes('ligma')) message.reply('ligma balls, goteem');
// Break the message down into its components and analyze it // Break the message down into its components and analyze it
try {
const commandData = fn.dot.getCommandData(message); const commandData = fn.dot.getCommandData(message);
if(isDev) console.log(commandData); console.log(commandData);
} catch(error) {
console.error(error);
message.reply('There was an error trying to execute that command.');
}
if (commandData.isValid && commandData.isCommand) { if (commandData.isValid && commandData.isCommand) {
try { try {
@ -212,9 +206,4 @@ client.on('messageCreate', message => {
return; return;
}); });
process.on("uncaughtException", err => {
console.error('There was an uncaught error: ', err);
process.exit(1);
});
client.login(token); client.login(token);