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}`);
},
};
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}`);
},
};