K
Docs
API ReferencePiecesLock Channel
🔒

Lock Channel

mod.lock_channelThe Mod SquadModeration

Removes @everyone's Send Messages permission in a channel — effectively locking it. The channel remains visible and readable; nobody can post until you Unlock it. Great for announcements-only mode or emergency lockdowns.

When to use this
  • Only affects @everyone — users with explicit Send Messages permission can still post
  • Pair with Send Message to let users know the channel is locked and why
  • Use Unlock Channel to restore it once things calm down

On the canvas

This is what Lock Channel looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🔒
Lock Channel
mod.lock_channel
Moderation
channelIdrequired
{{channel.id}}
reason
Raid detected — locking down
output
error

Config fields

FieldTypeReqWhat it does
channelId
{{channel.id}}
textyesChannel ID 📍
reason
Raid detected — locking down
textReason 📋

Output ports

outputChannel locked
errorBot needs Manage Channels / Manage Roles
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const channel = await guild.channels.fetch(channelId);
if (channel?.isTextBased()) {
  await channel.permissionOverwrites.edit(guild.roles.everyone, {
    SendMessages: false,
  });
}