Error handling broke things

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

15
main.js
View File

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