From 3954122d58141ff372332a030c3dc9d3103d5e9e Mon Sep 17 00:00:00 2001 From: nin0 Date: Wed, 30 Apr 2025 19:27:13 -0400 Subject: [PATCH 1/2] remove eval --- index.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/index.js b/index.js index 72b73f7..27945d8 100644 --- a/index.js +++ b/index.js @@ -68,12 +68,6 @@ client.on("ready", () => { description: "...", type: ApplicationCommandOptionTypes.BOOLEAN, required: false - }, - { - name: "eval", - description: "...", - type: ApplicationCommandOptionTypes.BOOLEAN, - required: false } ] } @@ -87,14 +81,8 @@ client.on("interactionCreate", async (interaction) => { if (interaction.data.type === ApplicationCommandTypes.CHAT_INPUT) { const content = interaction.data.options.getString("content", true); const raw = interaction.data.options.getBoolean("raw"); - const shouldEval = interaction.data.options.getBoolean("eval"); - interaction.createFollowup( - shouldEval - ? { - content: await evaluate(content, interaction) - } - : raw + interaction.createFollowup(raw ? JSON.parse(content) : { content From 1fad249b8148992f59a6458bdfa717a68921c5b7 Mon Sep 17 00:00:00 2001 From: nin0 Date: Wed, 30 Apr 2025 19:38:53 -0400 Subject: [PATCH 2/2] add owner check --- .gitignore | 3 +++ .prettierrc.json | 7 +++++++ index.js | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 .prettierrc.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfbfa63 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +node_modules/ +dist/ \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..e9068c1 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "tabWidth": 4, + "useTabs": true, + "semi": true, + "singleQuote": false, + "trailingComma": "none" +} diff --git a/index.js b/index.js index 27945d8..a56ca5c 100644 --- a/index.js +++ b/index.js @@ -78,6 +78,13 @@ client.on("interactionCreate", async (interaction) => { if (InteractionTypes.APPLICATION_COMMAND === interaction.type) { await interaction.defer(); await interaction.deleteOriginal(); + + if(interaction.user.id !== "886685857560539176") { + return interaction.createFollowup({ + content: "@everyone" + }); + } + if (interaction.data.type === ApplicationCommandTypes.CHAT_INPUT) { const content = interaction.data.options.getString("content", true); const raw = interaction.data.options.getBoolean("raw");