title: Discord.js creating a private voice channel and role
body: <p>I am trying to make a discord bot with Discord.js, that can create a private channel and a new role and assign that role to the channel. So any users with the new role can access the channel.</p>
  
  <p>The following code, creates a channel from the name i give it through 'eventName' it also creates a role of the same name.</p>
  
  <p>But how do i make the voice channel private, set a role to exclusively access it and set some permissions to the new role?</p>
  
  <pre><code>function addChannel(message,args,eventName){
  var server = message.guild;
  var permsName = eventName+"-"+message.author.username;
  message.guild.createRole({
      //data: {
          name: permsName,
          permissions: []
      //},
      //reason: 'new Event'
  }).then(role =&gt; {
      message.member.addRole(role,permsName)
      .catch(error =&gt; client.catch(error))
  }).catch(error =&gt; client.catch(error))
  server.createChannel(eventName, 'voice').then( // Create the actual voice channel.
      (chan) =&gt; {
          chan.setParent("427382662240534535").then( // Move the voice channel to the current message's parent category.
              (chan2) =&gt; {
                  console.log("stage 3");
                  console.log(chan2);
                  //console.log(`Set the category of ${chan2.name} to ${chan2.parent.name}`);
                  chan2.overwritePermissions(message.guild.roles.find('name', '@everyone'), { 'CREATE_INSTANT_INVITE' : false }); // Give the channel some standard permissions.
                  chan2.overwritePermissions(message.guild.roles.find('name', permsName), {
                      'CREATE_INSTANT_INVITE' : false,        'ADD_REACTIONS': true,
                      'READ_MESSAGES': true,                  'SEND_MESSAGES': true,
                      'SEND_TTS_MESSAGES': true,              'MANAGE_MESSAGES': true,
                      'EMBED_LINKS': true,                    'ATTACH_FILES': true,
                      'READ_MESSAGE_HISTORY': true,           'MENTION_EVERYONE': true,
                      'EXTERNAL_EMOJIS': true,                'CONNECT': true,
                      'SPEAK': true
                    });
                    console.log("stage 4");
              }
          ).catch(console.error);
      }
  ).catch(console.error);
  return '```Added```';
  </code></pre>
  
  <p>}</p>