I am currently writing a discord bot and i need it to create channel with specific permissions.
For example @everyone shouldn't have view_channel permission. What i have tried :
message.guild.channels.create("Channel Name", { type: "voice" })
.then((newChannel) => { newChannel.overwritePermissions(
everyone.id,
{
VIEW_CHANNEL: false
});
})
It creates the channel but permissions doesn't changing...
I am using "discord.js v12+" module.
everyoneRole
and usingeveryoneRole.id
, you can just usemessage.guild.id
. Fun fact, the @everyone role shares the same ID as the guild its in. - Lioness100