diff --git a/src/commands.js b/src/commands.js index c032893..6faebc9 100755 --- a/src/commands.js +++ b/src/commands.js @@ -89,7 +89,8 @@ global.commands = { "eval": { op: true, - usage: "", + description: "Evaluate javascript", + usage: "", aliases: ['>'], exec: async function (message) { var msg = message, m = message, @@ -110,19 +111,16 @@ global.commands = { "exec": { op: true, + description: "Run a shell command", usage: "", aliases: ["$"], exec: async function (msg) { require("child_process").exec(msg.txt(1), function(error, stdout, stderr){ - if (error) msg.channel.send(error, {split:{char:''}}); - else { - var str = "" - if (stdout) msg.channel.send(stdout, {split:{char:''}}); - if (stderr) msg.channel.send(stderr, {split:{char:''}}); - } + if (error) msg.channel.send(error, {split:{char:'',maxLength:2000}}); + if (stdout) msg.channel.send(stdout, {split:{char:'',maxLength:2000}}); + if (stderr) msg.channel.send(stderr, {split:{char:'',maxLength:2000}}); }) } - }, "query": {