From 1f245ddb081b15fbd3287aedc4f8965782e1fcc0 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 21 Oct 2017 15:43:18 -0400 Subject: Starting to work on AleeBot 2.0.0 --- commands/eval.js | 80 -------------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 commands/eval.js (limited to 'commands/eval.js') diff --git a/commands/eval.js b/commands/eval.js deleted file mode 100644 index a2cdbb4..0000000 --- a/commands/eval.js +++ /dev/null @@ -1,80 +0,0 @@ -const Discord = require('discord.js'); -exports.run = (client, message, args, config) => { -if(message.author.id !== config.ownerID) return; -const clean = text => { - if (typeof(text) === "string") - return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203)); - else - return text; -} -const argseval = message.content.split(" ").slice(1); - try { - var code = argseval.join(" "); - var evaled = eval(code); - - if (typeof evaled !== "string") - evaled = require("util").inspect(evaled); - message.delete(); - - message.channel.send({ - embed: { - color: 3191350, - author: { - name: "Eval is working!", - icon_url: message.author.displayAvatarURL - }, - fields: [{ - name: '**:inbox_tray: Input**', - value: `\`\`\`js\n${code}\n\`\`\`` - }, - { - name: '**:outbox_tray: Output**', - value: `\`\`\`js\n${clean(evaled)}\n\`\`\`` - } - ], - } - }) - } catch (err) { - message.delete(); - - message.channel.send({ - embed: { - color: 3191350, - author: { - name: "Error", - icon_url: message.author.displayAvatarURL - }, - fields: [{ - name: '**Please check your code.**', - value: `\`\`\`xl\n${clean(err)}\n\`\`\`` - }, - { - name: '**Output**', - value: `\`\`\`js\n${clean(evaled)}\n\`\`\`` - } - ], - } - }) - } -} - -exports.conf = { - enabled: true, - - guildOnly: false, - - aliases: [], - - permLevel: 0 - -}; - -exports.help = { - - name: 'eval', - - description: 'It injects code but you cannot use it only the person host it is allow!', - - usage: 'eval [code]' - -}; -- cgit v1.2.3