const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('lockdown') .setDescription('Lockdown the selected channel') .addChannelOption(option => option.setName('channel').setDescription('Channel to lockdown').setRequired(true)) .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers) .setDMPermission(false), /** * @param {import('discord.js').ChatInputCommandInteraction} interaction * */ async execute(interaction) { const inv = await interaction.channel.createInvite(); console.log(inv.); }, };