Updated interactionCreate.js

This commit is contained in:
Christer Warén 2021-09-05 06:59:24 +03:00
parent d2a6d70cf6
commit 4c731c1942

View File

@ -3,7 +3,12 @@ module.exports = {
async execute(client, interaction) { async execute(client, interaction) {
const permissions = interaction.channel.permissionsFor(interaction.client.user); 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()){ if(interaction.isCommand()){
const commandName = interaction.commandName; const commandName = interaction.commandName;