Docs / Sentinel / Comandos / /lockdown
Moderation Server only

/lockdown

Lock this channel, the whole server, a role, new joins or invites

Usage

Generated
/lockdown [scope] [reason] [role] [minutes]
OptionTipoObrigatórioDescrição
scope text Não What to lock (default: this channel)
channel - this channel (default)server - every text channelrole - one role, in every text channeljoins - raid hard mode for new joinsinvites - pause the server's invites
reason text Não Reason for the lockdown
role role Não Role to lock (scope: role)
minutes whole number Não Lift it automatically after this many minutes (1 to 1440; 0 or empty = until unlocked) (0 to 1440)

Who can run it

Generated
Discord defaultMembers with Manage Messages
Command Access presetModerator roles
Always allowedThe server owner and, by default, Administrators
Change itDashboard, Services, Sentinel, Commands

The Moderation preset limits it to the roles you mark as moderators. Server owners and Administrators can always run it. How Command Access works.

What the bot needs

Generated

Sentinel is granted these permissions by the invite link. A command that finds one missing replies privately with what it could not do and changes nothing.

Kick MembersBan MembersManage ServerView ChannelSend MessagesManage MessagesEmbed LinksManage NicknamesManage RolesTimeout Members

Comportamento

Checked against the code 2026-09-21

Locks one of five things and remembers exactly what it changed, so /unlockdown can put it back. Discord shows the command only to members with Manage Messages by default. The bot checks Command Access rules, that the Moderation service is enabled ("Sentinel is not enabled for this server."), and that the moderator is an Administrator or holds a moderator role from the Settings page ("No permission."). The scope defaults to channel and the reason to "Lockdown".

The scopes: channel denies Send Messages for @everyone in the channel where the command is run, which must be a text channel ("This is not a channel I can lock. Run it in a text channel."). server does the same in every text channel, leaving the service's own log channels open (the moderation log, the anti-nuke alert channel, the message log and the server log channels). role denies Send Messages for one role in every text channel; the role option is required ("Pick a role: the role scope needs the role option."). joins switches raid mode to hard when it is off, so every new join gets the raid join action (quarantine unless the server chose kick or ban). invites pauses the server's invites for up to 24 hours, which is Discord's limit; the bot needs Manage Server for that.

The minutes option (1 to 1440) lifts the lock automatically; 0 or empty keeps it until someone unlocks it. Invites keep Discord's 24 hour cap, so the shorter of the two wins. The reply is "Locked. Channel #general locked for @everyone. Reason: raid", then "It lifts in 30 min." when a timer is set, and "Lift it with /unlockdown channel." A "Lockdown" card with the scope, who acted, the reason, what changed and the timer goes to the moderation log channel.

When the bot lacks part of a channel's existing permissions it cannot preserve them all; the reply then warns which permissions were not kept. When Discord refuses the lock outright, the reply says what is missing: Manage Channels on every text channel for channel, server and role locks, and Manage Server for invites ("I couldn't pause invites: Discord refused it. I need Manage Server on this server. Until then you can pause them yourself in Server Settings > Invites.").

Good to know

  • Active locks are listed on the dashboard Overview page with an Unlock button, and the server, joins and invites locks can also be set from there.
  • A timed lock lifts only itself: a lock lifted by hand or replaced in the meantime is left alone.
  • The command changes the @everyone permission (or the chosen role's), not anyone else's overrides.
  • While an anti-nuke panic lockdown is on, only the server owner and the anti-nuke exempt users and roles can run it.
YourBot docs Reference tables are generated from the code that is running. Ask in Discord Suggest a correction