Error handling broke things
This commit is contained in:
parent
136fdaa221
commit
de0324c854
13
main.js
13
main.js
@ -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.');
|
||||
}
|
||||
|
||||
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);
|
Loading…
Reference in New Issue
Block a user