Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

discord.js custom create channel

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.
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery change font color 
Javascript :: get url without query string 
Javascript :: add attribute selected jquery 
Javascript :: How do I check if an element is hidden in jQuery 
Javascript :: javascript endswith 
Javascript :: credit card regex javascript 
Javascript :: split the numbers js 
Javascript :: free json hosting 
Javascript :: npx create next app 
Javascript :: xss test 
Javascript :: “javascript factorial” Code Answer’s' 
Javascript :: how to check if enter is pressed javascript 
Javascript :: javascript random number between 
Javascript :: javascript replace multiple spaces with single space 
Javascript :: how to get uri segment in js 
Javascript :: ngmodeloptions standalone 
Javascript :: how to add react scroll scrollable link 
Javascript :: how to convert string to int a array in javascript 
Javascript :: setup ejs views directory in express 
Javascript :: useeffect will unmount 
Javascript :: html get selected option javascript 
Javascript :: javascript hex to binary 
Javascript :: the engine node is incompatible with this module 
Javascript :: javascript string to integer 
Javascript :: js replace all char in string 
Javascript :: how to find out if mongoose is connected or not 
Javascript :: js check file exist 
Javascript :: how to click button programmatically in jquery 
Javascript :: jquery serialize form data and submit 
Javascript :: nodejs to exe 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =