create channel doesn't return channel object
hello i want to create an text channel and store it in variable but after debug variable this value is null what i do incorrect?
let guildChannelId = interaction.guild.channels.create({
name: "informacja-" + channelId,
parent: category.id,
type: ChannelType.GuildText,
permissionOverwrites: [
{
id: interaction.guild.roles.everyone,
deny: [PermissionFlagsBits.ViewChannel],
},
{
id: interaction.user.id,
allow: [PermissionFlagsBits.ViewChannel],
}
]
});