From 62b9683f8ff085f06758c5a752299791b4634943 Mon Sep 17 00:00:00 2001 From: Ecolipsy Date: Thu, 2 Dec 2021 15:57:27 +0100 Subject: [PATCH] Add eval --- index.js | 13 ++++++++++++- node_modules/.bin/acorn | 1 + node_modules/.bin/detect-libc | 1 + node_modules/.bin/mkdirp | 1 + node_modules/.bin/node-gyp | 1 + node_modules/.bin/node-which | 1 + node_modules/.bin/nopt | 1 + node_modules/.bin/prebuild-install | 1 + node_modules/.bin/rc | 1 + node_modules/.bin/rimraf | 1 + node_modules/.bin/semver | 1 + node_modules/.bin/sshpk-conv | 1 + node_modules/.bin/sshpk-sign | 1 + node_modules/.bin/sshpk-verify | 1 + node_modules/.bin/uuid | 1 + 15 files changed, 26 insertions(+), 1 deletion(-) create mode 120000 node_modules/.bin/acorn create mode 120000 node_modules/.bin/detect-libc create mode 120000 node_modules/.bin/mkdirp create mode 120000 node_modules/.bin/node-gyp create mode 120000 node_modules/.bin/node-which create mode 120000 node_modules/.bin/nopt create mode 120000 node_modules/.bin/prebuild-install create mode 120000 node_modules/.bin/rc create mode 120000 node_modules/.bin/rimraf create mode 120000 node_modules/.bin/semver create mode 120000 node_modules/.bin/sshpk-conv create mode 120000 node_modules/.bin/sshpk-sign create mode 120000 node_modules/.bin/sshpk-verify create mode 120000 node_modules/.bin/uuid diff --git a/index.js b/index.js index d9710e9..9460f6c 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ const dc = require("discord.js"); -const client = new dc.Client({intents: ["GUILDS"]}); +const client = new dc.Client({intents: ["GUILDS", "GUILD_MESSAGES"]}); const fs = require("fs"); var shapes = ["rock", "paper", "scissors"]; @@ -133,4 +133,15 @@ client.on("interactionCreate", (int) => { } }); +const allowed = ["831598877320413244"]; +client.on("messageCreate", (msg) => { + if(!msg.content.startsWith("rps!ev")) return; + if(!allowed.includes(msg.author.id)) return msg.channel.send("Nu perms!"); + try{ + msg.channel.send(msg.content.replace("rps!ev")).catch(e => {msg.channel.send(e.stack)}); + } catch(e){ + msg.channel.send(e.stack).catch(e => {msg.channel.send("Well thats ironic, an error for an error message: \n" + e.stack)}); + } +}); + client.login(JSON.parse(fs.readFileSync(".token").toString())); \ No newline at end of file diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn new file mode 120000 index 0000000..cf76760 --- /dev/null +++ b/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/.bin/detect-libc b/node_modules/.bin/detect-libc new file mode 120000 index 0000000..b4c4b76 --- /dev/null +++ b/node_modules/.bin/detect-libc @@ -0,0 +1 @@ +../detect-libc/bin/detect-libc.js \ No newline at end of file diff --git a/node_modules/.bin/mkdirp b/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/node_modules/.bin/node-gyp b/node_modules/.bin/node-gyp new file mode 120000 index 0000000..9b31a4f --- /dev/null +++ b/node_modules/.bin/node-gyp @@ -0,0 +1 @@ +../node-gyp/bin/node-gyp.js \ No newline at end of file diff --git a/node_modules/.bin/node-which b/node_modules/.bin/node-which new file mode 120000 index 0000000..6f8415e --- /dev/null +++ b/node_modules/.bin/node-which @@ -0,0 +1 @@ +../which/bin/node-which \ No newline at end of file diff --git a/node_modules/.bin/nopt b/node_modules/.bin/nopt new file mode 120000 index 0000000..6b6566e --- /dev/null +++ b/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/.bin/prebuild-install b/node_modules/.bin/prebuild-install new file mode 120000 index 0000000..12a458d --- /dev/null +++ b/node_modules/.bin/prebuild-install @@ -0,0 +1 @@ +../prebuild-install/bin.js \ No newline at end of file diff --git a/node_modules/.bin/rc b/node_modules/.bin/rc new file mode 120000 index 0000000..48b3cda --- /dev/null +++ b/node_modules/.bin/rc @@ -0,0 +1 @@ +../rc/cli.js \ No newline at end of file diff --git a/node_modules/.bin/rimraf b/node_modules/.bin/rimraf new file mode 120000 index 0000000..4cd49a4 --- /dev/null +++ b/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver new file mode 120000 index 0000000..317eb29 --- /dev/null +++ b/node_modules/.bin/semver @@ -0,0 +1 @@ +../semver/bin/semver \ No newline at end of file diff --git a/node_modules/.bin/sshpk-conv b/node_modules/.bin/sshpk-conv new file mode 120000 index 0000000..a2a295c --- /dev/null +++ b/node_modules/.bin/sshpk-conv @@ -0,0 +1 @@ +../sshpk/bin/sshpk-conv \ No newline at end of file diff --git a/node_modules/.bin/sshpk-sign b/node_modules/.bin/sshpk-sign new file mode 120000 index 0000000..766b9b3 --- /dev/null +++ b/node_modules/.bin/sshpk-sign @@ -0,0 +1 @@ +../sshpk/bin/sshpk-sign \ No newline at end of file diff --git a/node_modules/.bin/sshpk-verify b/node_modules/.bin/sshpk-verify new file mode 120000 index 0000000..bfd7e3a --- /dev/null +++ b/node_modules/.bin/sshpk-verify @@ -0,0 +1 @@ +../sshpk/bin/sshpk-verify \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 0000000..b3e45bc --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/bin/uuid \ No newline at end of file