From 477b4d4c745b05c465e130d7f3aa74f604f2d5dc Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 25 Aug 2017 16:50:45 -0400 Subject: New command error handler --- aleebot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aleebot.js b/aleebot.js index 7ae2248..3d8d210 100644 --- a/aleebot.js +++ b/aleebot.js @@ -100,8 +100,8 @@ client.on("message", function(message) { let commandFile = require(`./commands/${command}.js`); commandFile.run(client, message, args, config, abversion); } catch (err) { - message.reply(`:no_entry_sign: Error!\nThe command ${command} isn't found. (Reported to console.)`) - console.error(err); + message.channel.send(":no_entry_sign: Error!\n`"+ err +"` (Reported to console.)"); + log(err); } -- cgit v1.2.3