How to lock and unlock a Discord text channel

Updated · 7 min read

A channel lock is a quick way to pause one text conversation while moderators handle a raid, rule problem, or announcement. Build Discord Bots Moderation is free forever on the Free plan, and its commands lock or unlock the current channel only. This guide uses a disposable test channel first, then explains the exact @everyone permission change, who can run it, and why a member with a more specific permission may still be able to speak.

Start free

Start free. Pro is $9.99/month.

Before you start

  1. Choose one text channel and check its starting permissions

    This is a one-channel command, not slowmode and not a server-wide lockdown. Slowmode limits how often members can post; !lock changes one channel’s @everyone Send Messages permission. Anti-Raid lockdown is a separate server protection workflow, so use this guide only when you intend to pause the current text channel.

    Before changing a live channel, open its Discord channel permissions and note the current @everyone Send Messages setting plus any role or member overwrites. An explicit allow on a member or role can make that member behave differently from an ordinary @everyone member. Use a disposable test channel first so you can see the result without interrupting your community.

  2. Lock the current channel with a reason

    In the selected text channel, run !lock followed by an optional reason, for example !lock Reviewing raid reports. The registered usage is !lock [reason], and the command requires Manage Channels. The module edits the current channel’s @everyone overwrite to set Send Messages to false.

    The bot replies with a Channel Locked embed. It uses your supplied reason, or “Channel locked by moderator” when no reason is supplied, and identifies the moderator in its footer. For an ordinary member affected only by @everyone, the channel can remain visible but sending a message is denied because the command changes Send Messages, not View Channel or message history.

  3. Test the result as an ordinary member

    From the ordinary test account, open the same channel and try to send one harmless message. That account should be unable to send if it inherits the @everyone setting. Check the bot’s Channel Locked reply as well so staff know the command completed in the intended channel.

    Do not use the server owner or a moderator with Manage Channels as the only test account. Their role or member permissions can differ from an ordinary member’s permissions. If the ordinary test member can still send, leave the channel locked while you inspect that member’s roles and overwrites in the next step.

  4. Fix a lock that seems not to work

    First inspect the affected member’s Discord permissions for this channel. !lock writes only an @everyone Send Messages deny. A role or member-specific overwrite can still change that member’s effective access, so compare the ordinary test member with any role that is explicitly allowed to send. Remove or adjust the conflicting allow only if that matches your server policy, then test again with a new harmless message.

    If the bot replies Failed to lock or Failed to unlock, check its effective Manage Channels permission in the current channel. Review the bot role’s position and every channel/category override that applies to it: a role position or overwrite that leaves the bot without Manage Channels prevents Discord from accepting the overwrite edit. Restore the needed permission, then rerun the command in the channel you are checking.

  5. Unlock the same channel after the raid response

    When staff are ready to reopen that channel, send !unlock in that same channel. Its registered usage is !unlock and it also requires Manage Channels. The module clears the current channel’s @everyone Send Messages overwrite by setting it to null, then replies with a Channel Unlocked embed that names the moderator in its footer.

    Test again from the ordinary member account. If that member still cannot send, review the channel’s remaining category, role, and member overwrites rather than repeatedly running !unlock. If a member can send when you expected the pause to remain, revisit the conflicting role/member allow from the previous step. After a raid, reopen channels deliberately and keep any separate Anti-Raid protection settings under their own workflow.

  6. Use the right moderation control next time

    Use !lock and !unlock for an immediate, manual pause of the text channel you are in. Use the Slowmode guide when members should still be able to talk, just less frequently. Use the Anti-Raid guide when you need that module’s separate server-protection controls rather than a single-channel @everyone overwrite.

    If channel permissions are hard to trace, use the Missing Permissions guide for a broader check of role order and overrides before changing more access. The no-code setup guide can help you create and start a hosted bot if this is your first Moderation module. Compare the Dyno alternative only for product context; this guide does not use Dyno command syntax.

Frequently asked questions

What does !lock change in a Discord channel?

In the current channel, the Moderation module edits the @everyone permission overwrite to set Send Messages to false. It does not change View Channel or message history, and it does not take a snapshot of every role or member overwrite.

Who can lock or unlock a Discord channel?

The registered !lock [reason] and !unlock commands each require Manage Channels for the moderator who runs them. The bot also needs effective Manage Channels permission in that current channel to edit the @everyone overwrite.

Why can a member still send messages after !lock?

The command changes only @everyone Send Messages. Check that member’s channel-specific role and member overwrites, because a more specific allow can give that person different effective access. Test with an ordinary account that does not have Manage Channels.

Does !unlock restore the old channel permissions?

No. !unlock sets the current channel’s @everyone Send Messages overwrite to null. It does not restore a prior custom @everyone value or every role and member overwrite, so review those permissions after reopening the channel.

Compare Build Discord Bots and Dyno

Ready to configure your bot?

Start free

Start free. Pro is $9.99/month.