diff --git a/main.js b/main.js index 42f29ce..d4d774d 100644 --- a/main.js +++ b/main.js @@ -39,6 +39,7 @@ client.once('ready', async () => { fn.collections.dotCommands(client); fn.collections.setvalidCommands(client); fn.collections.roaches(client); + fn.collections.memberships(client); await fn.download.gifs(client); await fn.download.pastas(client); await fn.download.joints(client); @@ -68,7 +69,11 @@ client.on('interactionCreate', async interaction => { } if (client.slashCommands.has(commandName)) { - client.slashCommands.get(commandName).execute(interaction); + if (fn.checkMembership(client, interaction.user.id)) { + client.slashCommands.get(commandName).execute(interaction); + } else { + interaction.reply(fn.embeds.noMembership()); + } } else { interaction.reply('Sorry, I don\'t have access to that command.'); console.error('Slash command attempted to run but not found: ' + commandName);