G
G
getaxe2022-01-31 12:13:55
Node.js
getaxe, 2022-01-31 12:13:55

How to configure channel access for users?

Hello, in general, to be honest, I rarely turn here, but the discord js documentation regarding rooms melted my brain.
I need:
1) the ability to give rights to the role room
with the command 2) the ability to give rights to the room to a specific user with the command
ps How to do this for everyone seems to have figured out.

message.guild.channels.create('Название', {
  type: 'GUILD_VOICE',
  parent: '935245955094155304',
  permissionOverwrites: [
          {
    parent: '935245955094155304',
    id: message.guild.id,
    deny: ['VIEW_CHANNEL'],
    },
  ],
  }).then(c => {
  console.log(c);//message.guild.members.cache.get(args[0]).roles.add(r.id);  
        }).catch(err => console.log(err));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-01-31
@getaxe

https://discordjs.guide/popular-topics/permissions...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question