From 1fad249b8148992f59a6458bdfa717a68921c5b7 Mon Sep 17 00:00:00 2001 From: nin0 Date: Wed, 30 Apr 2025 19:38:53 -0400 Subject: [PATCH] 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");