📅  最后修改于: 2022-03-11 15:03:31.383000             🧑  作者: Mango
let channelName = args.slice(0).join(' '); //Arguments to set the channel name
message.guild.channels.create(channelName, {
type: "text", //This create a text channel, you can make a voice one too, by changing "text" to "voice"
permissionOverwrites: [
{
id: message.guild.roles.everyone, //To make it be seen by a certain role, user an ID instead
allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'], //Allow permissions
deny: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY'] //Deny permissions
}
],
})
//Note, you cant have, for example, VIEW_CHANNEL, in both allow and deny.