By default, text and voice channels created in Discord are open to all server members. This means anyone can join them.
To maintain some semblance of order in a large server, it is a good idea to set up roles with different privileges/permissions.
You might also have a particular channel that you want to lock for everyone on your server (except owners/admins). This guide will show you how to do that.
Table of ContentsShow
Locking A Voice/Text Channel
To lock access to a particular channel, open your server, right-click the voice or text channel and select Edit Channel.
From here, open the Permissions tab, select @everyone under roles/members, scroll to the bottom and look for the Connect permission. Click the cross (X) to disable the permission.
The channel should now be locked to everyone on your server. You can check that you did this successfully by viewing the server as a particular role.
To do that, open Server Settings, Roles, click the three dots next to any role, then select View Server as Role.
You can now see exactly how the server will appear for your server members.
Find the text or voice channel and see whether or not it has a lock next to its name.
If it has, this means the channel is locked for that particular role and that you have successfully implemented this solution.