© 2026 Hedgehog Software, LLC
const { SlashCommandBuilder,PermissionFlagsBits } = require('discord.js'); module.exports = { data: new SlashCommandBuilder() .setName('create') .setDescription('add'), async execute(interaction) { interaction.guild.channels.create({ name: 'testticket', reason: 'ticket', permissionOverwrites: [ { id: interaction.guild.roles.everyone, deny: [PermissionFlagsBits.ViewChannel], }, ], }); channels.fetch(); const newchannel = channel.id; await interaction.reply(` ${interaction.user.username} created a ticket at${newchannel}`); }, };
Join the Discord to ask follow-up questions and connect with the community
Support server for discord.js, a Node.js module to interact with Discord's apps API.
57,666 Members