Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js set role permissions for all channels

message.guild.channels.cache.forEach(ch => 
{
if(ch.type == "text")
  ch.overwritePermissions([
  {
     id: muteRole.id,
     deny: ['SEND_MESSAGES'],
  },
], 'Needed to change permissions');
}) 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #role #permissions #channels
ADD COMMENT
Topic
Name
5+8 =