By default, the text or voice channels created in Discord are open to all members. So anyone could join them.
To keep some semblance of order in your server, it’s a good idea to set up roles with different privileges/permissions.
Of course, you may have a particular server that you want to lock from everyone on your channel (except owners/admins). This article will show you how to do that.
Locking A Voice/Text Channel
To lock access for everyone of a particular voice channel, open your server, right-click the voice or text channel and select Edit Channel.
From there, head over to the Permissions tab, select @everyone under roles/members, scroll to the bottom and look for the Connect permission. Click the X to disable the permission.
With that, the channel should be locked to everyone on your server, as desired. We recommend ensuring that this solution worked by viewing the server through a particular role.
You can do that by going into Server Settings, Roles, and then click on the three dots on any role and select View Server as Role.
By doing this, you know exactly how the server will look for all of your members.
Look at the text or voice channel and see whether it has a lock next to its name. This means that the channel is locked for that particular role and that you’ve properly implemented this solution.