aboutsummaryrefslogtreecommitdiff
path: root/commands/eval.js
diff options
context:
space:
mode:
authorAlee <alee14498@gmail.com>2018-02-25 14:54:37 -0500
committerAlee <alee14498@gmail.com>2018-02-25 14:54:37 -0500
commit3e06bff720bd660ef41ce2e149004836595b4e40 (patch)
tree0f66307832ceca562df3d13bbdd6fd46e4625ac5 /commands/eval.js
parent2297ebb012e5522ce3b8360c404f522ed30dd985 (diff)
parent94eeeec5b7d4d29ae9d372fc1b86ce5351112548 (diff)
downloadAleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.tar.gz
AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.tar.bz2
AleeBot-3e06bff720bd660ef41ce2e149004836595b4e40.zip
2.0 release (I hope it will work)
Diffstat (limited to 'commands/eval.js')
-rw-r--r--commands/eval.js80
1 files changed, 0 insertions, 80 deletions
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]'
-
-};