mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
Better Error Handling
This commit is contained in:
@@ -24,7 +24,7 @@ module.exports = class CatCommand extends Command {
|
||||
return msg.channel.send({ files: [body.file] })
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
} catch(err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ module.exports = class DogCommand extends Command {
|
||||
return msg.channel.send({ files: [body.url] })
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
} catch(err) {
|
||||
return msg.say('An Unknown Error Occurred.');
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user