From 4c731c1942c56601e8f26c24ff8305772176a1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sun, 5 Sep 2021 06:59:24 +0300 Subject: [PATCH] Updated interactionCreate.js --- src/client/events/interactionCreate.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/events/interactionCreate.js b/src/client/events/interactionCreate.js index 64e06b9..65d7168 100644 --- a/src/client/events/interactionCreate.js +++ b/src/client/events/interactionCreate.js @@ -3,7 +3,12 @@ module.exports = { async execute(client, interaction) { const permissions = interaction.channel.permissionsFor(interaction.client.user); - if (!permissions.has('EMBED_LINKS')) return interaction.reply(client.messages.noPermsEmbed); + if (!permissions.has('VIEW_CHANNEL')) return; + + if (!permissions.has('EMBED_LINKS')) return interaction.reply({ + content: client.messages.noPermsEmbed, + ephemeral: true + }); if(interaction.isCommand()){ const commandName = interaction.commandName;