Moderation Server only

/purge

Bulk delete messages in this channel

Usage

Generated
/purge <count> [member] [bots] [links] [attachments] [contains]
OptionTipoObligatorioDescripción
count whole number How many recent messages to look through (max 100)
member member No Only delete messages from this member
bots yes or no No Only delete messages from bots
links yes or no No Only delete messages with a link
attachments yes or no No Only delete messages with files or images
contains text No Only delete messages containing this text

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

Comportamiento

Checked against the code 2026-09-21

Bulk deletes recent messages in the channel where it is run. 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 count is clamped to 1 to 100 and is the number of recent messages the bot looks through, not the number it deletes. Filters narrow that down and combine with each other: member (only that member's messages), bots (only bot messages), links (an http or https address, a www. address, a Discord invite, or an embed with a link), attachments (files or images), and contains (text matched without regard to case, up to 100 characters). Pinned messages are never deleted.

With "Confirm before destructive actions" on, the bot first asks "Delete up to 50 messages in this channel?" with the active filters in brackets, and Confirm and Cancel buttons.

The reply is "Deleted 12 messages." followed by the filters, for example "(from bots, with links)". A "Purge" card goes to the moderation log channel with the channel, the count, the filters and who acted. A purge filtered to one member opens a purge case against that member, with the count and filters as the reason. A purge without a member filter opens no case, so it counts against nobody's record.

Good to know

  • /slowmode and /lockdown slow or stop a channel; /purge only removes what is already there.
  • 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