Crear canal en discord.js (personalizado)

// Customization of creating channel.
const DiscordJS = require("Discord.js");

// When a message is sent, we will read a function having a Message type as parameter.
client.on("message", function(message)
{
  console.log("A message has been sent: " + message); // Log in the console the message sent.
  createMyChannel(message, client);
})

// Create an async function for treat commands.
createMyChannel: async function(message) 
{
  let channelName;
  let channelType;
  let allowPermissions = Array(BigInt); // BigInt is the type of a flag permission.
  let denyPermissions = Array(BigInt);
  let allowedMemberId;
  
  // Do some stuff here...
  
  // To the end of the function, add this last operation:

  message.guild.channels.create(channelName,
  {
    type: channelType        // The type of the channel.
    permissionOverwrites:
    [{
      id: message.author.id,  // With which user this channel can be seen ?
    						  // Use allowedMemberId instead to customize this id. message.author.id was written as an example.
      allow: [allowPermissions.keys()], // Allow some permissions to the user (Example: Write a message on the channel, to true).
      deny: [denyPermissions.keys()},   // Deny some permissions to the user (Example: Write a message on the channel, to false).
    }],
  });
}
Fine Fish