Fix n?eval error outputting

master
Kit Kasune 4 years ago
parent 017c11c930
commit 62c861e9d5
  1. 9
      commands/eval.js

@ -1,4 +1,5 @@
const Discord = require('discord.js'); const Discord = require('discord.js');
const chalk = require('chalk');
module.exports = { module.exports = {
name: 'eval', name: 'eval',
@ -24,11 +25,11 @@ module.exports = {
.setColor('c375f0') .setColor('c375f0')
.setFooter(`Natsuki`, client.user.avatarURL()) .setFooter(`Natsuki`, client.user.avatarURL())
.setTimestamp()) .setTimestamp())
}); }).catch(error => {return message.channel.send(`Error: \`${error}\`.`);});
} catch (error) { } catch (error) {
//let date = new Date; date = date.toString().slice(date.toString().search(":") - 2, date.toString().search(":") + 6); let date = new Date; date = date.toString().slice(date.toString().search(":") - 2, date.toString().search(":") + 6);
//console.error(`\n${chalk.red('[ERROR]')} >> ${chalk.yellow(`At [${date}] | Occurred while trying to run n?eval`)}`, error); console.error(`\n${chalk.red('[ERROR]')} >> ${chalk.yellow(`At [${date}] | Occurred while trying to run n?eval`)}`, error);
return message.channel.send(`Error: \`${error}\`.`); return message.channel.send(`Error: \`${error}\`.`);
}; }
}, },
}; };
Loading…
Cancel
Save