1let channelName = args.slice(0).join(' '); //Arguments to set the channel name
2message.guild.channels.create(channelName, {
3 type: "text", //This create a text channel, you can make a voice one too, by changing "text" to "voice"
4 permissionOverwrites: [
5 {
6 id: message.guild.roles.everyone, //To make it be seen by a certain role, user an ID instead
7 allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], //Allow permissions
8 deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] //Deny permissions
9 }
10 ],
11 })
12
13//Note, you cant have, for example, VIEW_CHANNEL, in both allow and deny.