Skip to content
Advertisement

How to add permissions to user to channel by command? Discord.js

How to give permissions to a specific channel by command? Sorry, I’m new at discord.js so any help would be appreciated.

JavaScript

Advertisement

Answer

You can use GuildChannel.updateOverwrites() to update the permissions on a channel.

JavaScript

(From example in the discord.js docs)

Using this function, you can provide a User or Role Object or ID of which to update permissions (in your case, you can use gRole).

Then, you can list the permissions to update followed by true, to allow, or false, to reject.

Here is a full list of permission flags you can use

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement