motiondevelopment.top-sdk
Version:
The new, official motiondevelopment.top SDK for Discord.js
17 lines (14 loc) • 433 B
JavaScript
const ApiError = require('./ApiError');
class ErrorHandler {
handleError(err) {
if (err instanceof ApiError) {
// do not handle ApiError, allow it to be thrown
throw err;
} else {
// handle other errors
console.error(`[Motionbotlist]: ` + err);
// send a message to the user if desired
}
}
}
module.exports = ErrorHandler;